added accent color in more places

This commit is contained in:
2024-02-13 11:11:38 +01:00
parent 5a1204c211
commit 01416bddf5
3 changed files with 45 additions and 26 deletions

View File

@@ -9,6 +9,10 @@ const { description } = Astro.props;
import "../styles/main.scss";
import "../styles/callout.scss";
import styles from "../styles/_var.scss";
const accentColorMatch = styles.match(/accentColor: ([^;]+)/);
const accentColor = accentColorMatch ? accentColorMatch[1] : "";
import Navbar from "../components/Navbar.astro";
import Footer from "../components/Footer.astro";
@@ -20,6 +24,7 @@ import { ViewTransitions } from "astro:transitions";
<head>
<meta charset="UTF-8" />
<meta name="darkreader-lock" />
<meta name="theme-color" content={accentColor} />
<meta name="description" content={description} />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
@@ -29,6 +34,7 @@ import { ViewTransitions } from "astro:transitions";
</head>
<body>
<Navbar />
<main>
<slot />
</main>

View File

@@ -1,28 +1,9 @@
@font-face {
font-family: 'Tanker-Regular';
src: url('/fonts/Tanker-Regular.ttf') format('truetype');
font-weight: 400;
font-display: swap;
font-style: normal;
}
$primary: #1c1427;
$accent: #7eca9c;
$link: #ccffbd;
$highlight-primary: #40394a;
@font-face {
font-family: 'Satoshi-Regular';
src: url('/fonts/Satoshi-Regular.ttf') format('truetype');
font-weight: 400;
font-display: swap;
font-style: normal;
:export {
primaryColor: $primary;
accentColor: $accent;
}
@font-face {
font-family: 'Satoshi-Bold';
src: url('/fonts/Satoshi-Bold.ttf') format('truetype');
font-weight: 700;
font-display: swap;
font-style: normal;
}
$primary: #1C1427;
$accent: #7ECA9C;
$link: #CCFFBD;
$highlight-primary: #40394A;

View File

@@ -2,6 +2,38 @@
:root {
color-scheme: dark;
--accent-color: $accent; // conversion for theme color meta tag
}
@font-face {
font-family: "Tanker-Regular";
src: url("/fonts/Tanker-Regular.ttf") format("truetype");
font-weight: 400;
font-display: swap;
font-style: normal;
}
@font-face {
font-family: "Satoshi-Regular";
src: url("/fonts/Satoshi-Regular.ttf") format("truetype");
font-weight: 400;
font-display: swap;
font-style: normal;
}
@font-face {
font-family: "Satoshi-Bold";
src: url("/fonts/Satoshi-Bold.ttf") format("truetype");
font-weight: 700;
font-display: swap;
font-style: normal;
}
::selection {
background-color: $accent;
}
::marker {
color: $accent;
}
body {