mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-05 08:50:38 +01:00
fix: sticky navbar
This commit is contained in:
1 parent
e48c57068f
commit
2fe0e9379e
4 files changed
+23
-25
No files matched your search
@@ -133,7 +133,7 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
BlitzKit
|
BlitzKit
|
||||||
{
|
{
|
||||||
isBranchNamed && (
|
isBranchNamed && (
|
||||||
<Code size="8" color="gray" highContrast variant="outline">
|
<Code size="8" color="gray" variant="outline">
|
||||||
{branchName}
|
{branchName}
|
||||||
</Code>
|
</Code>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -33,22 +33,21 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
height: var(--navbar-height);
|
height: var(--navbar-height);
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
position: sticky;
|
||||||
}
|
}
|
||||||
|
|
||||||
.expander {
|
.expander {
|
||||||
--navbar-height: 48px;
|
--navbar-height: 48px;
|
||||||
|
|
||||||
overflow: hidden;
|
/* overflow: hidden; */
|
||||||
transition-duration: 250ms;
|
transition-duration: 250ms;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
.expander[data-expanded='false'] {
|
.expander[data-expanded='false'] {
|
||||||
max-height: var(--navbar-height);
|
height: var(--navbar-height);
|
||||||
min-height: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.expander[data-expanded='false'] *[data-expanded] {
|
.expander[data-expanded='false'] *[data-expanded] {
|
||||||
@@ -56,14 +55,18 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.expander[data-expanded='true'] {
|
.expander[data-expanded='true'] {
|
||||||
max-height: 200vh;
|
height: 100vh;
|
||||||
min-height: 100vh;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.expander[data-expanded='true'] *[data-closed] {
|
.expander[data-expanded='true'] *[data-closed] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.expander div[data-radix-scroll-area-viewport] {
|
||||||
|
overflow-y: scroll !important;
|
||||||
|
overscroll-behavior: contain;
|
||||||
|
}
|
||||||
|
|
||||||
.hamburger {
|
.hamburger {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
}
|
}
|
||||||
@@ -85,12 +88,6 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
max-height: var(--navbar-height) !important;
|
max-height: var(--navbar-height) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-area {
|
|
||||||
max-height: 200px;
|
|
||||||
height: 200px;
|
|
||||||
background-color: red;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -112,12 +109,6 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
<Flex className="expander" data-expanded="false" direction="column" gap="2">
|
<Flex className="expander" data-expanded="false" direction="column" gap="2">
|
||||||
<Flex justify="center">
|
<Flex justify="center">
|
||||||
<Flex flexGrow="1" maxWidth="1024px" p="3" align="center">
|
<Flex flexGrow="1" maxWidth="1024px" p="3" align="center">
|
||||||
<Flex gap="3" align="center">
|
|
||||||
<IconButton variant="ghost" color="gray" className="hamburger">
|
|
||||||
<Cross1Icon data-expanded />
|
|
||||||
<HamburgerMenuIcon data-closed />
|
|
||||||
</IconButton>
|
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
color="gray"
|
color="gray"
|
||||||
highContrast
|
highContrast
|
||||||
@@ -129,14 +120,13 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
BlitzKit
|
BlitzKit
|
||||||
{
|
{
|
||||||
isBranchNamed && (
|
isBranchNamed && (
|
||||||
<Code color="gray" size="1" highContrast variant="outline">
|
<Code color="gray" size="1" variant="outline">
|
||||||
{branchName}
|
{branchName}
|
||||||
</Code>
|
</Code>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</Flex>
|
</Flex>
|
||||||
</Link>
|
</Link>
|
||||||
</Flex>
|
|
||||||
|
|
||||||
<Box flexGrow="1" />
|
<Box flexGrow="1" />
|
||||||
|
|
||||||
@@ -183,6 +173,7 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
>
|
>
|
||||||
<DiscordLogoIcon />
|
<DiscordLogoIcon />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
style={{ display: 'flex', alignContent: 'center' }}
|
style={{ display: 'flex', alignContent: 'center' }}
|
||||||
color="gray"
|
color="gray"
|
||||||
@@ -193,12 +184,18 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<NavbarAccount client:idle />
|
<NavbarAccount client:idle />
|
||||||
|
|
||||||
|
<IconButton variant="ghost" color="gray" className="hamburger">
|
||||||
|
<Cross1Icon data-expanded />
|
||||||
|
<HamburgerMenuIcon data-closed />
|
||||||
|
</IconButton>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
|
<ScrollArea scrollbars="vertical" style={{ height: '100%', width: '100%' }}>
|
||||||
<Grid
|
<Grid
|
||||||
columns="repeat(auto-fill, minmax(192px, 1fr))"
|
columns="repeat(auto-fill, minmax(12rem, 1fr))"
|
||||||
flow="dense"
|
flow="dense"
|
||||||
gap="2"
|
gap="2"
|
||||||
width="100%"
|
width="100%"
|
||||||
@@ -263,7 +260,7 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
WebkitBackdropFilter: 'blur(4rem)',
|
WebkitBackdropFilter: 'blur(4rem)',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text weight="medium">{tool.title}</Text>
|
<Text>{tool.title}</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Link>
|
</Link>
|
||||||
</Flex>
|
</Flex>
|
||||||
@@ -271,5 +268,6 @@ const isBranchNamed = branchName !== undefined;
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</ScrollArea>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
@@ -35,7 +35,7 @@ function Content() {
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
</Popover.Trigger>
|
</Popover.Trigger>
|
||||||
|
|
||||||
<BlitzKitTheme>
|
<BlitzKitTheme style={{ display: 'contents' }}>
|
||||||
<Popover.Content
|
<Popover.Content
|
||||||
align="end"
|
align="end"
|
||||||
width="320px"
|
width="320px"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ function Content() {
|
|||||||
<Flex direction="column" gap="3" align="center">
|
<Flex direction="column" gap="3" align="center">
|
||||||
<Text size="5">
|
<Text size="5">
|
||||||
BlitzKit{' '}
|
BlitzKit{' '}
|
||||||
<Code variant="outline" size="4" color="gray" highContrast>
|
<Code variant="outline" size="4" color="gray">
|
||||||
opentest
|
opentest
|
||||||
</Code>{' '}
|
</Code>{' '}
|
||||||
is available now{' '}
|
is available now{' '}
|
||||||
|
|||||||
Reference in new issue
Block a user