feat: auto hiding header bar in preview to enlarge the preview window (#3024)

pull/3058/head^2
niubility000 2024-03-07 18:25:01 +08:00 committed by GitHub
parent 8dddc8a450
commit d70650689c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 8 deletions

View File

@ -2,10 +2,6 @@
nav { nav {
width: 10em width: 10em
} }
/* Mobile Only fix div hidden by bottom navigation bar of mobile browser when using height: 100vh */
#previewer .preview {
height: calc(100% - 4em) !important;
}
} }
@media (max-width: 1024px) { @media (max-width: 1024px) {

View File

@ -153,7 +153,6 @@ main .spinner .bounce2 {
#previewer { #previewer {
background-color: rgba(0, 0, 0, 0.99); background-color: rgba(0, 0, 0, 0.99);
padding-top: 4em;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
@ -166,15 +165,25 @@ main .spinner .bounce2 {
#previewer header { #previewer header {
background: none; background: none;
color: #fff; color: #fff;
border-bottom: 0px;
box-shadow: 0px 0px 0px;
z-index: 19999;
} }
#previewer header > .action i { #previewer header > .action i {
color: #fff; color: #fff;
text-shadow: 1px 1px 1px #000000;
}
#previewer header > title {
white-space: nowrap;
text-shadow: 1px 1px 1px #000000;
} }
@media (min-width: 738px) { @media (min-width: 738px) {
#previewer header #dropdown .action i { #previewer header #dropdown .action i {
color: #fff; color: #fff;
text-shadow: 1px 1px 1px #000000;
} }
} }
@ -188,7 +197,7 @@ main .spinner .bounce2 {
#previewer .preview { #previewer .preview {
text-align: center; text-align: center;
height: calc(100vh - 4em); height: 100%;
} }
#previewer .preview pre { #previewer .preview pre {
@ -203,6 +212,12 @@ main .spinner .bounce2 {
margin: 0; margin: 0;
} }
#previewer .preview audio {
width: 95%;
height: 88%;
}
#previewer .preview video { #previewer .preview video {
height: 100%; height: 100%;
} }
@ -247,7 +262,7 @@ main .spinner .bounce2 {
#previewer > button { #previewer > button {
margin: 0; margin: 0;
position: fixed; position: fixed;
top: calc(50% + 1.85em); top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
background-color: rgba(80, 80, 80, 0.5); background-color: rgba(80, 80, 80, 0.5);
color: white; color: white;

View File

@ -6,7 +6,7 @@
@mousemove="toggleNavigation" @mousemove="toggleNavigation"
@touchstart="toggleNavigation" @touchstart="toggleNavigation"
> >
<header-bar> <header-bar v-if="showNav">
<action icon="close" :label="$t('buttons.close')" @action="close()" /> <action icon="close" :label="$t('buttons.close')" @action="close()" />
<title>{{ name }}</title> <title>{{ name }}</title>
<action <action