mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
fix: navbar scrolling
This commit is contained in:
1 parent
9687720a83
commit
d165a1fc35
1 file changed
+19
-13
@@ -20,6 +20,7 @@ import {
|
|||||||
import { resolveBranchName } from '../core/blitzkit/branches';
|
import { resolveBranchName } from '../core/blitzkit/branches';
|
||||||
import { homeTool, TOOLS } from '../constants/tools';
|
import { homeTool, TOOLS } from '../constants/tools';
|
||||||
import { NavbarAccount } from './NavbarAccount';
|
import { NavbarAccount } from './NavbarAccount';
|
||||||
|
import { times } from 'lodash-es';
|
||||||
|
|
||||||
const toolsFiltered = TOOLS.filter((tool) => !('href' in tool));
|
const toolsFiltered = TOOLS.filter((tool) => !('href' in tool));
|
||||||
const tools = [homeTool, ...toolsFiltered];
|
const tools = [homeTool, ...toolsFiltered];
|
||||||
@@ -30,7 +31,6 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
<style>
|
<style>
|
||||||
.navbar {
|
.navbar {
|
||||||
height: var(--navbar-height);
|
height: var(--navbar-height);
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
@@ -38,29 +38,31 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
.expander {
|
.expander {
|
||||||
--navbar-height: 48px;
|
--navbar-height: 48px;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
transition-duration: 250ms;
|
transition-duration: 250ms;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* overflow: hidden; */
|
/* overflow: hidden; */
|
||||||
backdrop-filter: blur(4rem) brightness(0.75);
|
backdrop-filter: blur(4rem) brightness(0.75);
|
||||||
-webkit-backdrop-filter: blur(4rem) brightness(0.75);
|
-webkit-backdrop-filter: blur(4rem) brightness(0.75);
|
||||||
|
}
|
||||||
|
|
||||||
&[data-expanded='false'] {
|
.expander[data-expanded='false'] {
|
||||||
max-height: var(--navbar-height);
|
max-height: var(--navbar-height);
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
*[data-expanded] {
|
.expander[data-expanded='false'] *[data-expanded] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.expander[data-expanded='true'] {
|
||||||
|
max-height: 200vh;
|
||||||
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
&[data-expanded='true'] {
|
.expander[data-expanded='true'] *[data-closed] {
|
||||||
max-height: 100vh;
|
|
||||||
overscroll-behavior: contain;
|
|
||||||
|
|
||||||
*[data-closed] {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.hamburger {
|
.hamburger {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
@@ -80,9 +82,15 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.expander {
|
.expander {
|
||||||
max-height: var(--navbar-height);
|
max-height: var(--navbar-height) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scroll-area {
|
||||||
|
max-height: 200px;
|
||||||
|
height: 200px;
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -189,7 +197,6 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<ScrollArea>
|
|
||||||
<Grid
|
<Grid
|
||||||
columns="repeat(auto-fill, minmax(192px, 1fr))"
|
columns="repeat(auto-fill, minmax(192px, 1fr))"
|
||||||
flow="dense"
|
flow="dense"
|
||||||
@@ -264,6 +271,5 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollArea>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
Reference in new issue
Block a user