mirror of
https://github.com/YouHaveTrouble/youhavetrouble.github.io.git
synced 2026-05-11 22:06:56 +00:00
More mobile-friendly nav
This commit is contained in:
@@ -10,7 +10,7 @@ const { current = '' } = Astro.props;
|
|||||||
display: flex;
|
display: flex;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: 1400px;
|
max-width: 1400px;
|
||||||
padding: 2em;
|
padding: 1em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -4,6 +4,19 @@ const { current = '' } = Astro.props;
|
|||||||
---
|
---
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
@media (orientation: portrait) {
|
||||||
|
nav {
|
||||||
|
justify-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-buttons {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -14,6 +27,12 @@ const { current = '' } = Astro.props;
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-buttons {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -56,9 +75,11 @@ const { current = '' } = Astro.props;
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<a class={current === "" ? "selected" : ""} href='/'>home</a>
|
<div class="nav-buttons">
|
||||||
<a class={current === "about" ? "selected" : ""} href='/about'>about</a>
|
<a class={current === "" ? "selected" : ""} href='/'>home</a>
|
||||||
<a class={current === "blog" ? "selected" : ""} href='/blog'>blog</a>
|
<a class={current === "about" ? "selected" : ""} href='/about'>about</a>
|
||||||
|
<a class={current === "blog" ? "selected" : ""} href='/blog'>blog</a>
|
||||||
|
</div>
|
||||||
<div class="theme-toggle-container">
|
<div class="theme-toggle-container">
|
||||||
<ThemeToggleButton client:load />
|
<ThemeToggleButton client:load />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user