-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/example-sveltekit
- Loading branch information
Showing
62 changed files
with
1,199 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.external { | ||
display: none; | ||
} | ||
@media (min-width: 650px) { | ||
.external { | ||
display: block; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export default function ExternalLink( | ||
{ href, children }: { href: string; children: string }, | ||
) { | ||
return ( | ||
<a | ||
href={href} | ||
className="external blocklink" | ||
target="_blank" | ||
> | ||
{children} | ||
</a> | ||
); | ||
} | ||
|
||
export const css = "@import './_components/ExternalLink.css';"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
footer { | ||
padding: 3rem; | ||
border-top: 1px solid hsl(var(--foreground-tertiary)); | ||
} | ||
|
||
.footer-nav { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); | ||
gap: 1rem; | ||
} | ||
|
||
.footer-section-heading { | ||
margin-bottom: 1rem; | ||
font-size: 1rem; | ||
font-weight: bold; | ||
color: hsl(var(--foreground-secondary)); | ||
} | ||
|
||
.footer-list { | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
} | ||
|
||
.footer-link { | ||
display: block; | ||
margin-bottom: 0.5rem; | ||
color: hsl(var(--foreground-secondary)); | ||
&:hover { | ||
color: var(--primary); | ||
} | ||
} | ||
|
||
.copyright { | ||
margin: 4rem auto 0; | ||
text-align: center; | ||
font-size: 0.9rem; | ||
color: hsl(var(--foreground-secondary)); | ||
} | ||
|
||
@media screen and (min-width: 1240px) { | ||
footer { | ||
padding: 2vw 3vw; | ||
} | ||
.footer-nav { | ||
max-width: 1240px; | ||
margin: 0 auto; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.hamburger-checkbox { | ||
display: none; | ||
} | ||
|
||
.hamburger-label { | ||
position: fixed; | ||
top: 0rem; | ||
left: 0rem; | ||
height: 4rem; | ||
width: 3rem; | ||
} | ||
|
||
.hamburger-icon { | ||
:focus { | ||
border: 2px solid var(--foreground-primary); | ||
} | ||
} | ||
|
||
.hamburger-bar { | ||
display: block; | ||
position: absolute; | ||
top: 50%; | ||
margin-top: -1px; | ||
left: 1rem; | ||
width: 1.3rem; | ||
height: 2px; | ||
background-color: var(--foreground-primary); | ||
transition: all 0.3s ease; | ||
} | ||
|
||
.hamburger-bar--top { | ||
transform: translate(0, -7px); | ||
} | ||
.hamburger-bar--bottom { | ||
transform: translate(0, 7px); | ||
} | ||
|
||
.hamburger-label:has(+ .hamburger-checkbox:checked) { | ||
.hamburger-bar--top { | ||
transform: translate(0, 0) rotate(45deg); | ||
} | ||
.hamburger-bar--middle { | ||
opacity: 0; | ||
} | ||
.hamburger-bar--bottom { | ||
transform: translate(0, 0) rotate(-45deg); | ||
} | ||
} | ||
|
||
@media screen and (min-width: 1240px) { | ||
.hamburger-label { | ||
display: none; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export default function (data: Lume.Data) { | ||
return ( | ||
<> | ||
<label htmlFor="hamburger" className="hamburger-label"> | ||
<span class="hamburger-bar hamburger-bar--top"></span> | ||
<span class="hamburger-bar hamburger-bar--middle"></span> | ||
<span class="hamburger-bar hamburger-bar--bottom"></span> | ||
</label> | ||
<input type="checkbox" id="hamburger" className="hamburger-checkbox" /> | ||
</> | ||
); | ||
} | ||
|
||
export const css = "@import './_components/Hamburger.css';"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
header { | ||
position: sticky; | ||
top: 0; | ||
display: flex; | ||
gap: 1rem; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: 0.75rem; | ||
padding-left: 3rem; | ||
border-bottom: 1px solid hsl(var(--foreground-tertiary)); | ||
background-color: hsl(var(--background-primary)); | ||
|
||
nav { | ||
display: none; | ||
} | ||
|
||
.external { | ||
margin-left: auto; | ||
} | ||
|
||
.logo-link { | ||
display: flex; | ||
height: 2.3rem; | ||
} | ||
|
||
.logo { | ||
width: 100%; | ||
max-height: 2.5rem; | ||
} | ||
} | ||
|
||
@media (min-width: 1240px) { | ||
header { | ||
padding-left: 1rem; | ||
nav { | ||
display: flex; | ||
} | ||
} | ||
.header-nav-link[data-active="true"] { | ||
color: hsl(var(--primary)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.main-nav { | ||
display: flex; | ||
flex-direction: column; | ||
margin: 0.5rem 0.5rem 1rem; | ||
padding: 0.5rem; | ||
border-radius: 0.5rem; | ||
border: 1px solid hsl(var(--background-tertiary)); | ||
background-color: hsl(var(--background-secondary)); | ||
list-style: none; | ||
} | ||
|
||
.main-nav-link { | ||
display: block; | ||
padding: 0.5rem 0.75rem; | ||
border-radius: 0.25rem; | ||
color: hsl(var(--foreground-primary)); | ||
&:hover { | ||
background-color: hsl(var(--background-tertiary)); | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
.main-nav-link[data-active="true"] { | ||
font-weight: bold; | ||
background-color: hsl(var(--background-tertiary)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { NavData } from "../types.ts"; | ||
|
||
export default function (data: Lume.Data) { | ||
return ( | ||
<nav aria-labelledby="primary-navigation"> | ||
<ul className="main-nav"> | ||
{data.navigation.map((nav: NavData) => ( | ||
<li> | ||
<a | ||
href={nav.url} | ||
className="main-nav-link" | ||
data-active={data.currentUrl === nav.url} | ||
> | ||
{nav.name} | ||
</a> | ||
</li> | ||
))} | ||
</ul> | ||
</nav> | ||
); | ||
} | ||
|
||
export const css = "@import './_components/MainNav.css';"; |
Oops, something went wrong.