Skip to content

Commit

Permalink
feat: auto hiding header bar in preview to enlarge the preview window (
Browse files Browse the repository at this point in the history
  • Loading branch information
niubility000 committed Mar 7, 2024
1 parent 8dddc8a commit d706506
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
4 changes: 0 additions & 4 deletions frontend/src/css/mobile.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
nav {
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) {
Expand Down
21 changes: 18 additions & 3 deletions frontend/src/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ main .spinner .bounce2 {

#previewer {
background-color: rgba(0, 0, 0, 0.99);
padding-top: 4em;
position: fixed;
top: 0;
left: 0;
Expand All @@ -166,15 +165,25 @@ main .spinner .bounce2 {
#previewer header {
background: none;
color: #fff;
border-bottom: 0px;
box-shadow: 0px 0px 0px;
z-index: 19999;
}

#previewer header > .action i {
color: #fff;
text-shadow: 1px 1px 1px #000000;
}

#previewer header > title {
white-space: nowrap;
text-shadow: 1px 1px 1px #000000;
}

@media (min-width: 738px) {
#previewer header #dropdown .action i {
color: #fff;
text-shadow: 1px 1px 1px #000000;
}
}

Expand All @@ -188,7 +197,7 @@ main .spinner .bounce2 {

#previewer .preview {
text-align: center;
height: calc(100vh - 4em);
height: 100%;
}

#previewer .preview pre {
Expand All @@ -203,6 +212,12 @@ main .spinner .bounce2 {
margin: 0;
}

#previewer .preview audio {
width: 95%;
height: 88%;
}


#previewer .preview video {
height: 100%;
}
Expand Down Expand Up @@ -247,7 +262,7 @@ main .spinner .bounce2 {
#previewer > button {
margin: 0;
position: fixed;
top: calc(50% + 1.85em);
top: 50%;
transform: translateY(-50%);
background-color: rgba(80, 80, 80, 0.5);
color: white;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/files/Preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@mousemove="toggleNavigation"
@touchstart="toggleNavigation"
>
<header-bar>
<header-bar v-if="showNav">
<action icon="close" :label="$t('buttons.close')" @action="close()" />
<title>{{ name }}</title>
<action
Expand Down

0 comments on commit d706506

Please sign in to comment.