style adjustments + settings
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
---
|
||||
import MastodonIcon from "../assets/svg/mastodon.svg";
|
||||
import RssIcon from "../assets/svg/rss.svg";
|
||||
import ThemeToggle from "./ThemeToggle.astro";
|
||||
|
||||
const year = new Date().getFullYear();
|
||||
---
|
||||
|
||||
<footer>
|
||||
<ThemeToggle />
|
||||
<div class="socials">
|
||||
<a
|
||||
href="https://mastodon.social/@ghalldev"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
import Drawer from "./Drawer.astro";
|
||||
import Nav from "./Nav.astro";
|
||||
import ThemeToggle from "./ThemeToggle.astro";
|
||||
---
|
||||
|
||||
<header>
|
||||
@@ -9,7 +8,6 @@ import ThemeToggle from "./ThemeToggle.astro";
|
||||
<a href="/">ghall.space</a>
|
||||
<div>
|
||||
<Nav />
|
||||
<ThemeToggle />
|
||||
<Drawer />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,22 +7,24 @@ const pathComponents = pathname.split("/").slice(1);
|
||||
---
|
||||
|
||||
<nav>
|
||||
{
|
||||
navLinks.map((link) => (
|
||||
<li>
|
||||
<a
|
||||
href={`/${link.path}`}
|
||||
class={pathComponents[0] === link.path ? "selected" : null}
|
||||
>
|
||||
{link.label}
|
||||
</a>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
<ul>
|
||||
{
|
||||
navLinks.map((link) => (
|
||||
<li>
|
||||
<a
|
||||
href={`/${link.path}`}
|
||||
class={pathComponents[0] === link.path ? "selected" : null}
|
||||
>
|
||||
{link.label}
|
||||
</a>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<style>
|
||||
nav {
|
||||
nav > ul {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
list-style: none;
|
||||
@@ -34,19 +36,6 @@ const pathComponents = pathname.split("/").slice(1);
|
||||
a {
|
||||
color: var(--text);
|
||||
padding: 5px 10px;
|
||||
border-radius: var(--radius);
|
||||
transition: background-color 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
background-color: rgba(0, 0, 0, 0.04);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.underline {
|
||||
height: 2px;
|
||||
width: 100%;
|
||||
background-color: var(--orange);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
@@ -54,11 +43,4 @@ const pathComponents = pathname.split("/").slice(1);
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
a:hover {
|
||||
background-color: rgba(231, 237, 255, 0.1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
import BrushIcon from "../../assets/svg/paintbrush.svg";
|
||||
---
|
||||
|
||||
<input type="checkbox" x-model="darkMode" />
|
||||
|
||||
<style>
|
||||
input {
|
||||
appearance: none;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
background-image: url(../../assets/svg/moon.svg);
|
||||
background-size: 24px;
|
||||
padding: 10px;
|
||||
border-radius: 100%;
|
||||
transition: var(--transition);
|
||||
transform: rotate(0deg) translateY(-2px);
|
||||
}
|
||||
|
||||
input:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
input:checked {
|
||||
background-image: url(../../assets/svg/sun.svg);
|
||||
transform: rotate(180deg) translateY(2px);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,66 @@
|
||||
---
|
||||
import BrushIcon from "../../assets/svg/paintbrush.svg";
|
||||
---
|
||||
|
||||
<div class="toggles">
|
||||
<div>
|
||||
<input id="sans-serif-toggle" type="checkbox" x-model="serifs" />
|
||||
<label for="sans-serif-toggle">Serifs</label>
|
||||
</div>
|
||||
<div>
|
||||
<input id="dark-mode-toggle" type="checkbox" x-model="darkMode" />
|
||||
<label for="dark-mode-toggle">Dark Mode</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.toggles {
|
||||
padding: 1rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.toggles > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
input {
|
||||
position: relative;
|
||||
appearance: none;
|
||||
height: 24px;
|
||||
width: 38px;
|
||||
padding: 10px;
|
||||
background-color: var(--orange);
|
||||
border-radius: 120px;
|
||||
}
|
||||
|
||||
input:checked {
|
||||
background-color: var(--sky);
|
||||
}
|
||||
|
||||
input::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
height: 22px;
|
||||
width: 22px;
|
||||
border-radius: 100%;
|
||||
background-color: var(--background);
|
||||
left: 1px;
|
||||
top: 1px;
|
||||
transition: all 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
input:checked:after {
|
||||
left: 15px;
|
||||
}
|
||||
|
||||
@media (max-width: 516px) {
|
||||
.toggles {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user