Files
lena-schilling-website/packages/base/Resources/Public/Scss/components/_navigation.scss
Dominik Polakovics 16344b6994
All checks were successful
Build / build (push) Successful in 6m33s
Build / deploy-stage (push) Successful in 2m55s
Build / switch-stage (push) Successful in 2m0s
feat: many design changes
2024-12-14 00:03:09 +01:00

155 lines
2.9 KiB
SCSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Define a fixed height for the navigation and apply that as padding-top on the body
// so that when it becomes sticky, the content doesn't jump.
$nav-height: 60px; // Adjust as needed
// Use an absolute path to the extensions public folder to avoid rewriting of URLs by the build process.
// Ensure this path is correct for your TYPO3 installation.
// Typically: /typo3conf/ext/<extension_key>/Resources/Public/Images/...
header {
width: 100%;
height: $nav-height;
line-height: $nav-height;
background: url('../Images/background.jpg') repeat;
position: sticky;
top: 0;
z-index: 1000;
}
.main-nav {
.container {
display: flex;
align-items: center;
margin: 0 auto;
height: 100%;
padding: 0 1rem;
}
.nav-logo {
img {
display: block;
max-height: 50px;
height: auto;
width: auto;
}
}
.nav-toggle {
background: none;
border: none;
cursor: pointer;
display: none; // hidden by default on desktop
position: relative;
width: 30px;
height: 30px;
.nav-toggle-icon {
width: 100%;
height: 2px;
background: $primary-color;
display: block;
position: relative;
@include transition(all, 0.3s);
&::before,
&::after {
content: '';
width: 100%;
height: 2px;
background: $primary-color;
position: absolute;
left: 0;
@include transition(all, 0.3s);
}
&::before {
top: -8px;
}
&::after {
top: 8px;
}
}
&.active .nav-toggle-icon {
background: transparent;
&::before {
transform: rotate(45deg) translate(5px, 5px);
}
&::after {
transform: rotate(-45deg) translate(5px, -5px);
}
}
}
.nav-links {
display: flex;
list-style: none;
align-items: center;
margin: auto;
font-family: 'Hajime Sans', sans-serif;
font-size: 1.75rem;
a {
font-weight: 400;
}
}
.nav-item {
margin: 0 1rem;
.nav-link {
text-decoration: none;
color: $primary-color;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
font-size: 1rem;
@include transition(color);
&:hover {
color: $brand-color;
}
}
}
@media (max-width: $breakpoint-lg) {
.nav-toggle {
display: block;
}
.nav-links {
position: absolute;
top: 100%;
left: 0;
right: 0;
flex-direction: column;
max-height: 0;
overflow: hidden;
@include transition(max-height, 0.4s);
.nav-item {
margin: 0;
padding: 1rem;
border-top: 1px solid rgba(0,0,0,0.1);
&:first-child {
border-top: none;
}
.nav-link {
display: block;
}
}
}
&.open .nav-links {
max-height: 500px; // Adjust to fit all items
}
}
}