style adjustments + settings
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"_variables": {
|
||||
"lastUpdateCheck": 1761581754827
|
||||
"lastUpdateCheck": 1763053152837
|
||||
}
|
||||
}
|
||||
+1
-2
@@ -5,7 +5,6 @@
|
||||
"TSX": { "formatter": { "language_server": { "name": "biome" } } },
|
||||
"JSON": { "formatter": { "language_server": { "name": "biome" } } },
|
||||
"JSONC": { "formatter": { "language_server": { "name": "biome" } } },
|
||||
"CSS": { "formatter": { "language_server": { "name": "biome" } } },
|
||||
"GraphQL": { "formatter": { "language_server": { "name": "biome" } } }
|
||||
"CSS": { "formatter": { "language_server": { "name": "biome" } } }
|
||||
}
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
@@ -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>
|
||||
+11
-1
@@ -4,6 +4,12 @@
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Noto Serif;
|
||||
src: url(./assets/fonts/NotoSerif-VariableFont_wdth,wght.ttf)
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: JetBrainsMono;
|
||||
src: url(./assets/fonts/JetBrainsMono-VariableFont_wght.ttf)
|
||||
@@ -16,7 +22,7 @@
|
||||
--red: #d20f39;
|
||||
--orange: #fe640b;
|
||||
--text: #4c4f69;
|
||||
--background: #fcfcfc;
|
||||
--background: #fffdf5;
|
||||
--radius: 5px;
|
||||
--border: 1px solid #ced3f1;
|
||||
--max-page-width: 800px;
|
||||
@@ -42,6 +48,10 @@ body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.serif-text {
|
||||
font-family: "Noto Serif", serif;
|
||||
}
|
||||
|
||||
main {
|
||||
max-width: 800px;
|
||||
margin: auto;
|
||||
|
||||
@@ -37,9 +37,10 @@ const title = Astro.props.title || Astro.props.frontmatter?.title || "Unknown";
|
||||
class="layout-simple"
|
||||
x-data="{
|
||||
drawerOpen: false,
|
||||
darkMode: $persist(false)
|
||||
darkMode: $persist(false),
|
||||
serifs: $persist(true)
|
||||
}"
|
||||
:class="{ 'lock-scroll': drawerOpen, 'theme-dark': darkMode}"
|
||||
:class="{ 'lock-scroll': drawerOpen, 'theme-dark': darkMode, 'serif-text': serifs}"
|
||||
>
|
||||
<Header />
|
||||
<main transition:animate="initial">
|
||||
|
||||
@@ -22,11 +22,11 @@ const { Content } = await render(post);
|
||||
<Layout title={data.title}>
|
||||
<article>
|
||||
<BlogHeader title={data.title} date={data.pubDate} />
|
||||
<Tags tags={data.tags} />
|
||||
<Content />
|
||||
<a href="https://notbyai.fyi/">
|
||||
<a href="https://notbyai.fyi/" target="_blank">
|
||||
<i class="not-by-ai"></i>
|
||||
</a>
|
||||
<Tags tags={data.tags} />
|
||||
</article>
|
||||
</Layout>
|
||||
|
||||
@@ -40,10 +40,4 @@ const { Content } = await render(post);
|
||||
background-position: center;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.not-by-ai {
|
||||
background-image: url(../../assets/svg/Written-By-Human-Not-By-AI-Badge-black.svg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user