mirror of
https://github.com/DerTyp7/dertyp7.github.io.git
synced 2025-10-29 21:02:09 +01:00
implement responsive header
This commit is contained in:
@@ -4,9 +4,22 @@ import ThemeSwitch from "@components/ThemeSwitch";
|
|||||||
export default function Header() {
|
export default function Header() {
|
||||||
return (
|
return (
|
||||||
<header className="header">
|
<header className="header">
|
||||||
|
{/* Mobile Top Row Header */}
|
||||||
|
<div className="header-mobile">
|
||||||
|
<div className="logo">
|
||||||
|
<h1>Meister</h1>
|
||||||
|
</div>
|
||||||
|
<div className="control">
|
||||||
|
<ThemeSwitch />
|
||||||
|
<div>Language</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/* END: Mobile Top Row Header */}
|
||||||
|
|
||||||
<div className="logo">
|
<div className="logo">
|
||||||
<h1>Meister</h1>
|
<h1>Meister</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="links">
|
<div className="links">
|
||||||
<a href="">About</a>
|
<a href="">About</a>
|
||||||
<a href="">Skills</a>
|
<a href="">Skills</a>
|
||||||
|
|||||||
@@ -39,4 +39,57 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
flex: 0.5;
|
flex: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-mobile {
|
||||||
|
display: none; // will be set to flex on mobile/small screens
|
||||||
|
justify-content: space-between;
|
||||||
|
flex: 1;
|
||||||
|
width: 100%;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1rem;
|
||||||
|
.logo {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.header-mobile {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 300px) {
|
||||||
|
.header-mobile {
|
||||||
|
flex-direction: column;
|
||||||
|
.logo {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.links {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user