Merge branch 'fix-filter-buttons' into 'master'

fix: put filter navigation buttons on the bottom

See merge request gk1623/drp-48!28

Co-authored-by: Gleb Koval <gleb@koval.net>
This commit is contained in:
Ling, Alex
2025-06-16 15:44:44 +00:00
3 changed files with 31 additions and 19 deletions

View File

@@ -12,6 +12,6 @@
%sveltekit.head% %sveltekit.head%
</head> </head>
<body data-sveltekit-preload-data="hover"> <body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div> <div style="display: contents; background: inherit">%sveltekit.body%</div>
</body> </body>
</html> </html>

View File

@@ -263,7 +263,7 @@
border: none; border: none;
color: #eaffeb; color: #eaffeb;
font-size: 1rem; font-size: 1rem;
margin-right: 1rem; margin-right: 0.5rem;
cursor: pointer; cursor: pointer;
} }
.fav-button:hover { .fav-button:hover {
@@ -274,13 +274,13 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-right: 2rem; margin-right: 0.5rem;
} }
.search { .search {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.5rem; gap: 0.3rem;
color: #eaffeb; color: #eaffeb;
font-size: 1rem; font-size: 1rem;
} }

View File

@@ -104,21 +104,6 @@
</Navbar> </Navbar>
<main> <main>
<div class="controls">
<Button type="link" href="/?{newSearchParams}">Show study spaces</Button>
<Button
style="red"
onclick={() => {
openAt.from = undefined;
openAt.to = undefined;
selectedTags = [];
sortNear = undefined;
tagFilter = "";
}}
>
Clear
</Button>
</div>
<h1>Search options</h1> <h1>Search options</h1>
<div class="time-filter-container"> <div class="time-filter-container">
<label> <label>
@@ -208,6 +193,23 @@
</div> </div>
<div class="sortMap" bind:this={sortMapElem}></div> <div class="sortMap" bind:this={sortMapElem}></div>
</main> </main>
<div class="controls">
<div class="controls-inner">
<Button type="link" href="/?{newSearchParams}">Back to study spaces</Button>
<Button
style="red"
onclick={() => {
openAt.from = undefined;
openAt.to = undefined;
selectedTags = [];
sortNear = undefined;
tagFilter = "";
}}
>
Clear
</Button>
</div>
</div>
<style> <style>
main { main {
@@ -219,9 +221,19 @@
margin: auto; margin: auto;
} }
.controls { .controls {
position: sticky;
background: inherit;
background-attachment: local;
padding: 0.5rem 1rem;
bottom: 0;
width: 100%;
}
.controls-inner {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
max-width: 32rem;
gap: 1rem; gap: 1rem;
margin: auto;
} }
.tag-filter-container { .tag-filter-container {
display: flex; display: flex;