Skip to content

Commit

Permalink
Add nav
Browse files Browse the repository at this point in the history
  • Loading branch information
hirasso committed Dec 3, 2023
1 parent 0a130ed commit ee9698f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
9 changes: 8 additions & 1 deletion docs/src/layouts/Default.astro
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ const { title, description } = Astro.props;
<p class="is-h2">
Sync the scoll position of multiple elements on your page
</p>
<nav>
<ul class="navlist">
<li class="navlist_item"><a class="button" href="/scrollmirror">Demo</a></li>
<li class="navlist_item"><a class="button" href="/scrollmirror/docs">Docs</a></li>
<li class="navlist_item"><a class="button" href="https://github.com/hirasso/scrollmirror">GitHub</a></li>
</ul>
</nav>
</header>
<!-- <Header /> -->
<slot />
Expand All @@ -41,7 +48,7 @@ const { title, description } = Astro.props;
font-size: clamp(2rem, 7vw, 10rem);
/* color: hsl(0, var(--saturation), var(--lightness)); */
--_offset: 0.02em;
font-weight: 100 !important;
font-weight: 200;

/* text-shadow:
var(--_offset) var(--_offset) 0px
Expand Down
20 changes: 16 additions & 4 deletions docs/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
background: var(--background);
color: var(--color);
font-size: var(--text-default);
font-weight: 200;
font-weight: 300;
}
.tile, .cell {
font-weight: 300;
Expand All @@ -36,20 +36,32 @@
font-style: italic;
text-align: center;
}
.navlist {
margin-top: var(--gap);
display: flex;
gap: var(--half-gap);
justify-content: center;
}
.navlist_item {
display: flex;
}

.button {
appearance: none;
background: none;
color: var(--accent);
color: var(--color);
font-style: italic;
border: 1px solid var(--accent);
border: 1px solid var(--color);
border-radius: 2em;
padding: 0.5em 1.5em;
cursor: pointer;
transition: color 150ms, background 150ms;
text-decoration: none;
font-size: 1.2em;
}
.button:hover {
background: var(--accent);
background: var(--color);
border-color: var(--color);
color: var(--background);
}

Expand Down
3 changes: 3 additions & 0 deletions docs/src/styles/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
* {
font-size: inherit;
}
ul[class] {
list-style: none;
}

0 comments on commit ee9698f

Please sign in to comment.