Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 5 additions & 68 deletions photomap/frontend/static/css/control-and-search-panels.css
Original file line number Diff line number Diff line change
Expand Up @@ -245,75 +245,12 @@
display: none !important;
}

@media (max-width: 600px) {
#panelStackContainer {
position: fixed;
left: 0;
right: 0;
bottom: 0;
width: 100vw;
display: flex;
flex-direction: column;
align-items: stretch;
z-index: 4000;
pointer-events: none;
}

#searchPanel,
#controlPanel {
position: static !important;
width: 100vw;
/* Without this the side padding is added to 100vw, pushing the centred
icon row off the right-hand edge. */
box-sizing: border-box;
margin: 0;
border-radius: 0;
box-shadow: none;
pointer-events: auto;
/* Remove any max-width if present */
}

#searchPanel {
order: 0;
border-bottom: 1px solid #222;
}

#controlPanel {
order: 1;
border-top: 1px solid #222;
}

/* Keep icons in a horizontal row */
.control-icons-row,
.search-icons-row {
flex-direction: row !important;
align-items: center;
justify-content: center;
gap: 0.5em;
width: 100%;
}

#controlPanel button,
#searchPanel button {
width: 48px;
height: 48px;
min-width: 48px;
min-height: 48px;
font-size: 2em;
}

/* The rule above is less specific than #controlPanel button.menu-chevron, so
the chevron keeps its 16px width here; only the height needs restating to
stay flush with the 48px button it is attached to. */
#controlPanel button.menu-chevron {
height: 48px;
min-height: 48px;
}
}
/* On phones the two panels stack inside the bottom sheet, which slides up and
down; that layout lives in mobile-sheets.css. */

/* The two panels share the bottom edge until they stack at 600px, and with
seven icons in the Search panel they would run into each other on a tablet
in portrait (768-820px). The room comes out of the gaps between icons. Below
/* The two panels share the bottom edge until they move into the phone layout's
bottom sheet at 600px, and with seven icons in the Search panel they would
run into each other on a tablet in portrait (768-820px). The room comes out of the gaps between icons. Below
about 745px they still overlap, by less than they would otherwise. */
@media (min-width: 601px) and (max-width: 860px) {
.control-icons-row,
Expand Down
19 changes: 19 additions & 0 deletions photomap/frontend/static/css/grid-view.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@
height: calc(var(--visible-viewport-height, 100dvh) - var(--grid-top-reserve));
}

/* In the phone layout the badge is in the top sheet, which covers the grid
only by its handle unless the user pulls it open to seek. The bottom sheet
is another matter: open, it is two rows of buttons tall, and Swiper divides
the container's height between the grid rows, so the container has to stop
above it. --bottom-sheet-height follows the sheet as it opens and closes
(mobile-sheets.js), and grid-view.js re-counts the rows when it does. */
.mobile-sheets #gridViewSwiper {
--grid-top-reserve: calc(var(--top-sheet-peek) + 6px);
height: calc(
var(--visible-viewport-height, 100dvh) - var(--grid-top-reserve) - var(--bottom-sheet-height, 0px) - 6px
);
}

/* The sheets are hidden in fullscreen, so the grid gets the whole height. */
html.mobile-sheets:fullscreen #gridViewSwiper,
html.mobile-sheets:-webkit-full-screen #gridViewSwiper {
height: var(--visible-viewport-height, 100dvh);
}

/* The badge is hidden in fullscreen (seek-slider.css), so give the row back. */
:fullscreen #gridViewSwiper,
:-webkit-full-screen #gridViewSwiper {
Expand Down
Loading
Loading