Compare commits

..

2 Commits

Author SHA1 Message Date
d9cc367fff chore: nav
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m52s
2025-02-07 23:52:58 +06:00
syntaxbullet
00fa1c07f8 chore: add some basic styling 2025-02-07 12:50:32 +01:00
12 changed files with 113 additions and 272 deletions

View File

@@ -4,4 +4,4 @@
docker entrypoint is `node --watch server.js`, fastify serves `dist` as static content docker entrypoint is `node --watch server.js`, fastify serves `dist` as static content
[manifests/ayaume.yaml](/manifests/ayaume.yaml) has k8s manifest examples [manifests/ayaume.yaml](./manifests/ayaume.yaml) has k8s manifest examples

View File

@@ -6,4 +6,9 @@ import mdx from "@astrojs/mdx";
export default defineConfig({ export default defineConfig({
site: "https://w.ayau.me", site: "https://w.ayau.me",
integrations: [mdx()], integrations: [mdx()],
markdown: {
shikiConfig: {
theme: 'github-light-default',
}
},
}); });

View File

@@ -19,7 +19,6 @@ const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props;
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<!-- Canonical URL --> <!-- Canonical URL -->
<link rel="canonical" href={canonicalURL} /> <link rel="canonical" href={canonicalURL} />

View File

@@ -3,26 +3,5 @@ const today = new Date();
--- ---
<footer> <footer>
&copy; {today.getFullYear()} Your name here. All rights reserved. &copy; {today.getFullYear()}
</footer> </footer>
<style>
footer {
padding: 2em 1em 6em 1em;
background: linear-gradient(var(--gray-gradient)) no-repeat;
color: rgb(var(--gray));
text-align: center;
}
.social-links {
display: flex;
justify-content: center;
gap: 1em;
margin-top: 1em;
}
.social-links a {
text-decoration: none;
color: rgb(var(--gray));
}
.social-links a:hover {
color: rgb(var(--gray-dark));
}
</style>

View File

@@ -1,56 +1,10 @@
--- ---
import HeaderLink from "./HeaderLink.astro"; import HeaderLink from "./HeaderLink.astro";
import { SITE_TITLE } from "../consts";
--- ---
<header> <header>
<nav> <nav class="main-nav">
<h2><a href="/">{SITE_TITLE}</a></h2>
<div class="internal-links">
<HeaderLink href="/">Home</HeaderLink> <HeaderLink href="/">Home</HeaderLink>
<HeaderLink href="/blog">Blog</HeaderLink> <HeaderLink href="/blog">Blog</HeaderLink>
<HeaderLink href="/about">About</HeaderLink>
</div>
</nav> </nav>
</header> </header>
<style>
header {
margin: 0;
padding: 0 1em;
background: white;
box-shadow: 0 2px 8px rgba(var(--black), 5%);
}
h2 {
margin: 0;
font-size: 1em;
}
h2 a,
h2 a.active {
text-decoration: none;
}
nav {
display: flex;
align-items: center;
justify-content: space-between;
}
nav a {
padding: 1em 0.5em;
color: var(--black);
border-bottom: 4px solid transparent;
text-decoration: none;
}
nav a.active {
text-decoration: none;
border-bottom-color: var(--accent);
}
.social-links,
.social-links a {
display: flex;
}
@media (max-width: 720px) {
.social-links {
display: none;
}
}
</style>

View File

@@ -12,13 +12,3 @@ const isActive = href === pathname || href === "/" + (subpath?.[0] || "");
<a href={href} class:list={[className, { active: isActive }]} {...props}> <a href={href} class:list={[className, { active: isActive }]} {...props}>
<slot /> <slot />
</a> </a>
<style>
a {
display: inline-block;
text-decoration: none;
}
a.active {
font-weight: bolder;
text-decoration: underline;
}
</style>

View File

@@ -1,2 +1,2 @@
export const SITE_TITLE = "Foo"; export const SITE_TITLE = "Miraris";
export const SITE_DESCRIPTION = "Bar"; export const SITE_DESCRIPTION = "Bar";

View File

@@ -13,45 +13,6 @@ const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
<html lang="en"> <html lang="en">
<head> <head>
<BaseHead title={title} description={description} /> <BaseHead title={title} description={description} />
<style>
main {
width: calc(100% - 2em);
max-width: 100%;
margin: 0;
}
.hero-image {
width: 100%;
}
.hero-image img {
display: block;
margin: 0 auto;
border-radius: 12px;
box-shadow: var(--box-shadow);
}
.prose {
width: 720px;
max-width: calc(100% - 2em);
margin: auto;
padding: 1em;
color: rgb(var(--gray-dark));
}
.title {
margin-bottom: 1em;
padding: 1em 0;
text-align: center;
line-height: 1;
}
.title h1 {
margin: 0 0 0.5em 0;
}
.date {
margin-bottom: 0.5em;
color: rgb(var(--gray));
}
.last-updated-on {
font-style: italic;
}
</style>
</head> </head>
<body> <body>
@@ -84,6 +45,6 @@ const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
</div> </div>
</article> </article>
</main> </main>
<Footer /> <!-- <Footer /> -->
</body> </body>
</html> </html>

View File

@@ -4,19 +4,9 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<title>Astro Basics</title> <title>Astro Basics</title>
</head> </head>
<body> <body>
<slot /> <slot />
</body> </body>
</html> </html>
<style>
html,
body {
margin: 0;
width: 100%;
height: 100%;
}
</style>

View File

@@ -111,6 +111,6 @@ const posts = (await getCollection("blog")).sort(
</ul> </ul>
</section> </section>
</main> </main>
<Footer /> <!-- <Footer /> -->
</body> </body>
</html> </html>

View File

@@ -16,6 +16,6 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
<h1>from ci 5</h1> <h1>from ci 5</h1>
<p>foo, bar, baz, qux, quux</p> <p>foo, bar, baz, qux, quux</p>
</main> </main>
<Footer /> <!-- <Footer /> -->
</body> </body>
</html> </html>

View File

@@ -1,154 +1,117 @@
/*
The CSS in this style tag is based off of Bear Blog's default CSS.
https://github.com/HermanMartinus/bearblog/blob/297026a877bc2ab2b3bdfbd6b9f7961c350917dd/templates/styles/blog/default.css
License MIT: https://github.com/HermanMartinus/bearblog/blob/master/LICENSE.md
*/
:root { :root {
--accent: #2337ff; --max-page-width: 960px;
--accent-dark: #000d8a; --max-prose-width: 960px;
--black: 15, 18, 25; --text-size--2: clamp(0.7813rem, 0.7747rem + 0.0326vw, 0.8rem);
--gray: 96, 115, 159; --text-size--1: clamp(0.9375rem, 0.9158rem + 0.1087vw, 1rem);
--gray-light: 229, 233, 240; --text-size-0: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
--gray-dark: 34, 41, 57; --text-size-1: clamp(1.35rem, 1.2761rem + 0.3696vw, 1.5625rem);
--gray-gradient: rgba(var(--gray-light), 50%), #fff; --text-size-2: clamp(1.62rem, 1.5041rem + 0.5793vw, 1.9531rem);
--box-shadow: 0 2px 6px rgba(var(--gray), 25%), --text-size-3: clamp(1.944rem, 1.771rem + 0.8651vw, 2.4414rem);
0 8px 24px rgba(var(--gray), 33%), 0 16px 32px rgba(var(--gray), 33%); --text-size-4: clamp(2.3328rem, 2.0827rem + 1.2504vw, 3.0518rem);
--text-size-5: clamp(2.7994rem, 2.4462rem + 1.7658vw, 3.8147rem);
} }
@font-face {
font-family: "Atkinson"; html, body {
src: url("/fonts/atkinson-regular.woff") format("woff"); padding: 24px;
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Atkinson";
src: url("/fonts/atkinson-bold.woff") format("woff");
font-weight: 700;
font-style: normal;
font-display: swap;
}
body {
font-family: "Atkinson", sans-serif;
margin: 0; margin: 0;
padding: 0; box-sizing: border-box;
text-align: left; max-width: var(--max-page-width);
background: linear-gradient(var(--gray-gradient)) no-repeat; margin: 0 auto;
background-size: 100% 600px;
word-wrap: break-word;
overflow-wrap: break-word;
color: rgb(var(--gray-dark));
font-size: 20px;
line-height: 1.7;
} }
main { .prose {
width: 720px; max-width: var(--max-prose-width) !important;
max-width: calc(100% - 2em); margin: 0 auto;
margin: auto; font-size: var(--text-size-0);
padding: 3em 1em;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0 0 0.5rem 0;
color: rgb(var(--black));
line-height: 1.2;
} }
h1 { h1 {
font-size: 3.052em; font-size: var(--text-size-3);
} }
h2 { h2 {
font-size: 2.441em; font-size: var(--text-size-2);
} }
h3 { h3 {
font-size: 1.953em; font-size: var(--text-size-1);
}
h4 {
font-size: 1.563em;
}
h5 {
font-size: 1.25em;
}
strong,
b {
font-weight: 700;
}
a {
color: var(--accent);
}
a:hover {
color: var(--accent);
}
p {
margin-bottom: 1em;
}
.prose p {
margin-bottom: 2em;
}
textarea {
width: 100%;
font-size: 16px;
}
input {
font-size: 16px;
}
table {
width: 100%;
}
img {
max-width: 100%;
height: auto;
border-radius: 8px;
}
code {
padding: 2px 5px;
background-color: rgb(var(--gray-light));
border-radius: 2px;
}
pre {
padding: 1.5em;
border-radius: 8px;
}
pre > code {
all: unset;
}
blockquote {
border-left: 4px solid var(--accent);
padding: 0 0 0 20px;
margin: 0px;
font-size: 1.333em;
}
hr {
border: none;
border-top: 1px solid rgb(var(--gray-light));
}
@media (max-width: 720px) {
body {
font-size: 18px;
} }
main { main {
padding: 1em; display: flex;
flex-direction: column;
}
header {
padding: 24px 0;
display: flex;
align-items: center;
}
.astro-code {
background: #eee !important;
padding: 8px;
font-size: var(--text-size--1);
}
.main-nav {
display: flex;
align-items: baseline;
gap: 2rem;
color: #000;
h2 {
font-size: var(--text-size-1);
}
a {
color: #000;
font-weight: 500;
text-decoration: none;
}
a:hover, a.active {
text-decoration: underline !important;
} }
} }
.sr-only { .internal-links {
border: 0; display: flex;
padding: 0; gap: 16px;
margin: 0; font-size: var(--text-size-0);
position: absolute !important; }
height: 1px;
width: 1px; body :not(:is(h1,h2,h3,h4,h5,h6)) {
overflow: hidden; line-height: 1.5;
/* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */ }
clip: rect(1px 1px 1px 1px);
/* maybe deprecated but we need to support legacy browsers */ :is(h1,h2,h3,h4,h5,h6) {
clip: rect(1px, 1px, 1px, 1px); line-height: 1.1;
/* modern browsers, clip-path works inwards from each corner */ }
clip-path: inset(50%); footer {
/* added line to stop words getting smushed together (as they go onto separate lines and some screen readers do not understand line feeds as a space */ margin-top: 240px;
white-space: nowrap; }
p.date {
color: #aaa !important;
font-size: var(--text-size--1);
}
h4.title {
font-size: var(--text-size-0) !important;
margin-bottom: 4px !important;
}
main section ul {
gap: 16px !important;
}
main section ul li{
margin: 0 !important;
border-bottom: 1px solid #eee;
width: 100% !important;
padding: 8px 0;
}
main section ul li img{
display: none;
}
main section ul li h4 {
color: black;
text-align: left !important;
font-size: var(--text-size-0) !important;
}
main section ul li a {
color: black;
text-align: left !important;
font-size: var(--text-size-0) !important;
} }