Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: auto hiding headerbar in preview to enlarge the preview window #3024

Merged

Conversation

niubility000
Copy link
Contributor

In the preview, the headerbar is always on the screen. It makes the pic can't show in full screen of browser. I change it to a common way, auto hide the transparent headerbar with the left and right arrow. and enlarge the preview box to show pic, video.

before:
pic1

after:
pic2

/* Mobile Only fix div hidden by bottom navigation bar of mobile browser when using height: 100vh */
#previewer .preview {
height: calc(100% - 4em) !important;
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to use 100vh in style.css anymore, so just delete this one.

@niubility000 niubility000 marked this pull request as draft February 27, 2024 07:07
@niubility000 niubility000 marked this pull request as ready for review February 27, 2024 07:17
@@ -153,7 +153,6 @@ main .spinner .bounce2 {

#previewer {
background-color: rgba(0, 0, 0, 0.99);
padding-top: 4em;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to enlarge the preview box, we don't need padding top any more.

@@ -166,15 +165,25 @@ main .spinner .bounce2 {
#previewer header {
background: none;
color: #fff;
border-bottom: 0px;
box-shadow: 0px 0px 0px;
z-index: 19999;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This z-index will show the headerbar above the preview box. Preview box's z-index is 9999.
And the border-bottom, box-shadow will show a tiny line in the bottom of headerbar. So just erase it.


#previewer header > title {
white-space: nowrap;
text-shadow: 1px 1px 1px #000000;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This add a shadow to the button and text in headerbar. Then we can see them clearly when browse white pics.

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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to enlarge the preview box to full screen.

@@ -247,7 +262,7 @@ main .spinner .bounce2 {
#previewer > button {
margin: 0;
position: fixed;
top: calc(50% + 1.85em);
top: 50%;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To adjust the left and right arrow's position since we don't have headerbar on the top.

#previewer .preview audio {
width: 95%;
height: 88%;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To adjust the audio player's position to the middle bottom.

@@ -6,7 +6,7 @@
@mousemove="toggleNavigation"
@touchstart="toggleNavigation"
>
<header-bar>
<header-bar v-if="showNav">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just hide the headerbar with the left and right arrow.

@niubility000 niubility000 marked this pull request as draft February 28, 2024 05:03
@niubility000 niubility000 marked this pull request as ready for review February 28, 2024 06:55
@o1egl o1egl merged commit d706506 into filebrowser:master Mar 7, 2024
8 checks passed
@andresbono andresbono mentioned this pull request May 31, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants