Compare commits
3 Commits
e58c8e46ef
...
a074fdc7e3
| Author | SHA1 | Date | |
|---|---|---|---|
|
a074fdc7e3
|
|||
|
dbf6744479
|
|||
|
28057e88d5
|
@@ -23,10 +23,9 @@ let underlineWidth = $state(0);
|
|||||||
let disableTransition = $state(false);
|
let disableTransition = $state(false);
|
||||||
|
|
||||||
function toggle_sidebar(state){
|
function toggle_sidebar(state){
|
||||||
// state: force hidden state (optional)
|
const checkbox = document.getElementById('nav-toggle')
|
||||||
const nav_el = document.querySelector("nav")
|
if(state === undefined) checkbox.checked = !checkbox.checked
|
||||||
if(state === undefined) nav_el.hidden = !nav_el.hidden
|
else checkbox.checked = !state
|
||||||
else nav_el.hidden = state
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateUnderline() {
|
function updateUnderline() {
|
||||||
@@ -93,16 +92,16 @@ nav{
|
|||||||
background-color: var(--nord0);
|
background-color: var(--nord0);
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
display: flex !important;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between !important;
|
justify-content: space-between !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-shadow: 0 1em 1rem 0rem rgba(0,0,0,0.4);
|
box-shadow: 0 1em 1rem 0rem rgba(0,0,0,0.4);
|
||||||
height: 4rem;
|
height: var(--header-h);
|
||||||
padding-left: 0.5rem;
|
padding-left: 0.5rem;
|
||||||
}
|
}
|
||||||
nav[hidden]{
|
.nav-toggle{
|
||||||
display:block;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.site_header li),
|
:global(.site_header li),
|
||||||
@@ -116,20 +115,20 @@ nav[hidden]{
|
|||||||
:global(.site_header li>a)
|
:global(.site_header li>a)
|
||||||
{
|
{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 1.2rem;
|
font-size: 1rem;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
border-radius: var(--radius-pill);
|
border-radius: var(--radius-pill);
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.4rem 0.6rem;
|
||||||
}
|
}
|
||||||
:global(a.entry),
|
:global(a.entry),
|
||||||
:global(a.entry:link),
|
:global(a.entry:link),
|
||||||
:global(a.entry:visited)
|
:global(a.entry:visited)
|
||||||
{
|
{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 1.2rem;
|
font-size: 1rem;
|
||||||
color: white !important;
|
color: white !important;
|
||||||
border-radius: var(--radius-pill);
|
border-radius: var(--radius-pill);
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.4rem 0.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.site_header li:hover),
|
:global(.site_header li:hover),
|
||||||
@@ -176,6 +175,9 @@ nav[hidden]{
|
|||||||
display: none;
|
display: none;
|
||||||
padding-inline: 0.5rem;
|
padding-inline: 0.5rem;
|
||||||
}
|
}
|
||||||
|
.header-shadow{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.right-buttons{
|
.right-buttons{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -187,9 +189,10 @@ nav[hidden]{
|
|||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
:global(svg.symbol){
|
:global(svg.symbol){
|
||||||
height: 4rem;
|
--symbol-size: calc(var(--header-h) - 1rem);
|
||||||
width: 4rem;
|
width: var(--symbol-size);
|
||||||
border-radius: 10000px;
|
border-radius: 10000px;
|
||||||
|
margin: 0.25rem;
|
||||||
}
|
}
|
||||||
/*:global(a:has(svg.symbol)){
|
/*:global(a:has(svg.symbol)){
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
@@ -198,6 +201,8 @@ nav[hidden]{
|
|||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
}*/
|
}*/
|
||||||
.wrapper{
|
.wrapper{
|
||||||
|
--header-h: 3rem;
|
||||||
|
--symbol-size: calc(var(--header-h) - 1rem);
|
||||||
display:flex;
|
display:flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100svh;
|
min-height: 100svh;
|
||||||
@@ -206,37 +211,51 @@ footer{
|
|||||||
padding-block: 1rem;
|
padding-block: 1rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
.button_wrapper{
|
.button_wrapper{
|
||||||
box-shadow: 0 1em 1rem 0rem rgba(0,0,0,0.4);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
background-color: var(--nord0);
|
background-color: var(--nord0);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 4rem;
|
height: var(--header-h);
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
}
|
}
|
||||||
.nav_button{
|
.header-shadow{
|
||||||
border: unset;
|
|
||||||
background-color: unset;
|
|
||||||
display: block;
|
display: block;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: var(--header-h);
|
||||||
|
margin-top: calc(-1 * var(--header-h));
|
||||||
|
box-shadow: 0 1em 1rem 0rem rgba(0,0,0,0.4);
|
||||||
|
z-index: 9997;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.nav_button{
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
fill: white;
|
fill: white;
|
||||||
margin-inline: 0.5rem;
|
margin-inline: 0.5rem;
|
||||||
width: 2rem;
|
width: 1.25rem;
|
||||||
aspect-ratio: 1;
|
height: 1.25rem;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.nav_button svg{
|
.nav_button svg{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
transition: var(--transition-fast);
|
transition: var(--transition-fast);
|
||||||
}
|
}
|
||||||
.nav_button:focus{
|
.nav_button:hover,
|
||||||
fill: var(--red);
|
.nav_button:active,
|
||||||
|
.nav-toggle:focus-visible + .nav_button{
|
||||||
|
fill: var(--nord8);
|
||||||
scale: 0.9;
|
scale: 0.9;
|
||||||
}
|
}
|
||||||
.nav_site{
|
.nav_site{
|
||||||
@@ -246,42 +265,44 @@ footer{
|
|||||||
height: 100vh; /* dvh does not work, breaks because of transition and only being applied after scroll ends*/
|
height: 100vh; /* dvh does not work, breaks because of transition and only being applied after scroll ends*/
|
||||||
margin-bottom: 50vh;
|
margin-bottom: 50vh;
|
||||||
width: min(95svw, 25em);
|
width: min(95svw, 25em);
|
||||||
transition: transform 100ms;
|
z-index: 9998;
|
||||||
z-index: 10;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start !important;
|
|
||||||
align-items: left;
|
|
||||||
justify-content: space-between!important;
|
|
||||||
padding-inline: 0.5rem;
|
padding-inline: 0.5rem;
|
||||||
}
|
}
|
||||||
|
.nav_site::before{
|
||||||
|
content: '';
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
:global(.nav_site ul){
|
:global(.nav_site ul){
|
||||||
width: 100% ;
|
width: 100% ;
|
||||||
}
|
}
|
||||||
.nav_site :first-child{
|
.nav_site :first-child{
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
.nav_site[hidden]{
|
.nav_site{
|
||||||
transform: translateX(100%);
|
transform: translateX(100%);
|
||||||
}
|
}
|
||||||
|
.wrapper:has(.nav-toggle:checked) .nav_site{
|
||||||
|
transform: translateX(0);
|
||||||
|
transition: transform 100ms;
|
||||||
|
}
|
||||||
:global(.nav_site a:last-child){
|
:global(.nav_site a:last-child){
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav_site .links-wrapper {
|
.nav_site .links-wrapper {
|
||||||
align-self: flex-start;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 2rem;
|
padding: 0 2rem;
|
||||||
}
|
}
|
||||||
:global(.site_header){
|
:global(.site_header){
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-top: min(10rem, 10vh);
|
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
:global(.site_header li, .site_header a){
|
:global(.site_header li, .site_header a){
|
||||||
font-size: 4rem;
|
font-size: 1.5rem;
|
||||||
}
|
}
|
||||||
:global(.site_header li > a, .site_header a){
|
:global(.site_header li > a, .site_header a){
|
||||||
font-size: 2rem;
|
font-size: 1.3rem;
|
||||||
}
|
}
|
||||||
:global(.site_header li:hover),
|
:global(.site_header li:hover),
|
||||||
:global(.site_header li:focus-within){
|
:global(.site_header li:focus-within){
|
||||||
@@ -314,10 +335,12 @@ footer{
|
|||||||
<a href="/" aria-label="Home"><Symbol></Symbol></a>
|
<a href="/" aria-label="Home"><Symbol></Symbol></a>
|
||||||
<div class="right-buttons">
|
<div class="right-buttons">
|
||||||
{@render language_selector_mobile?.()}
|
{@render language_selector_mobile?.()}
|
||||||
<button class=nav_button onclick={() => {toggle_sidebar()}} aria-label="Toggle navigation menu"><svg xmlns="http://www.w3.org/2000/svg" height="0.5em" viewBox="0 0 448 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg></button>
|
<input type="checkbox" id="nav-toggle" class="nav-toggle" aria-label="Toggle navigation menu" />
|
||||||
|
<label for="nav-toggle" class=nav_button aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" height="0.5em" viewBox="0 0 448 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<nav hidden class=nav_site>
|
<div class="header-shadow"></div>
|
||||||
|
<nav class=nav_site>
|
||||||
<a href="/" aria-label="Home"><Symbol></Symbol></a>
|
<a href="/" aria-label="Home"><Symbol></Symbol></a>
|
||||||
<div class="links-wrapper">
|
<div class="links-wrapper">
|
||||||
{@render links?.()}
|
{@render links?.()}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
}
|
}
|
||||||
.links_grid{
|
.links_grid{
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(min(250px, calc(50% - 1rem)), 1fr));
|
||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
max-width: 1000px;
|
max-width: 1000px;
|
||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
@@ -68,6 +68,38 @@
|
|||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 560px) {
|
||||||
|
.links_grid {
|
||||||
|
gap: 1rem;
|
||||||
|
padding: 1.5rem 0.75rem;
|
||||||
|
}
|
||||||
|
:global(.links_grid a :is(svg, img)) {
|
||||||
|
height: 72px;
|
||||||
|
}
|
||||||
|
:global(.links_grid h3) {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
:global(.links_grid a) {
|
||||||
|
padding: 0.75rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 410px) {
|
||||||
|
.links_grid {
|
||||||
|
gap: 0.5rem;
|
||||||
|
padding: 1rem 0.5rem;
|
||||||
|
}
|
||||||
|
:global(.links_grid a :is(svg, img)) {
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
:global(.links_grid h3) {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
:global(.links_grid a) {
|
||||||
|
padding: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark){
|
@media (prefers-color-scheme: dark){
|
||||||
:global(.links_grid h3){
|
:global(.links_grid h3){
|
||||||
color: white;
|
color: white;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
}
|
}
|
||||||
svg{
|
svg{
|
||||||
transition: var(--transition-fast);
|
transition: var(--transition-fast);
|
||||||
height: 3em;
|
height: var(--symbol-size, 3em);
|
||||||
}
|
}
|
||||||
svg:hover,
|
svg:hover,
|
||||||
svg:focus-visible
|
svg:focus-visible
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
/* ─── Hero parallax (same scaleY technique as TitleImgParallax) ─── */
|
/* ─── Hero parallax (same scaleY technique as TitleImgParallax) ─── */
|
||||||
.hero-section {
|
.hero-section {
|
||||||
--parallax-scale: 0.3;
|
--parallax-scale: 0.3;
|
||||||
margin-bottom: -20vh;
|
margin-bottom: calc(var(--parallax-scale) * (20vh - min(60vh, 520px)));
|
||||||
transform-origin: center top;
|
transform-origin: center top;
|
||||||
transform: translateY(-1rem) scaleY(calc(1 - var(--parallax-scale)));
|
transform: translateY(-1rem) scaleY(calc(1 - var(--parallax-scale)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user