feat: track images with git lfs
This commit is contained in:
@ -1,11 +1,13 @@
|
||||
---
|
||||
import LanguagePicker from "../components/LanguagePicker.astro";
|
||||
import { AstroFont } from "astro-font";
|
||||
import Nav from "../components/Nav.astro";
|
||||
interface Props {
|
||||
title: string;
|
||||
width?: "full" | "compact";
|
||||
}
|
||||
|
||||
const { title } = Astro.props;
|
||||
const { title, width = "compact" } = Astro.props;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
@ -15,6 +17,38 @@ const { title } = Astro.props;
|
||||
<meta name="description" content="Astro description" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<AstroFont
|
||||
config={[
|
||||
{
|
||||
name: "Nunito Sans",
|
||||
src: [
|
||||
{
|
||||
style: "light",
|
||||
weight: "300",
|
||||
path: "/fonts/nunito-v26-latin-300.woff2",
|
||||
},
|
||||
],
|
||||
preload: true,
|
||||
display: "swap",
|
||||
selector: "body",
|
||||
fallback: "sans-serif",
|
||||
},
|
||||
{
|
||||
name: "Roboto",
|
||||
src: [
|
||||
{
|
||||
weight: "300",
|
||||
style: "normal",
|
||||
path: "/fonts/roboto-v30-latin-300.woff2",
|
||||
},
|
||||
],
|
||||
preload: true,
|
||||
display: "swap",
|
||||
selector: "body > span",
|
||||
fallback: "serif",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<link rel="stylesheet" href="/app.css" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<!-- <meta http-equiv="refresh" content="0;url=/" /> -->
|
||||
@ -33,9 +67,20 @@ const { title } = Astro.props;
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<Nav />
|
||||
<slot />
|
||||
<body class=`layout-${width}`>
|
||||
<header>
|
||||
<Nav />
|
||||
</header>
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
<LanguagePicker />
|
||||
<style>
|
||||
.layout-compact {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,20 +1,63 @@
|
||||
---
|
||||
import type { CollectionEntry } from "astro:content";
|
||||
import Layout from "./Layout.astro";
|
||||
import { useTranslatedPath } from "@i18n/utils";
|
||||
import { getLocale } from "astro-i18n-aut";
|
||||
|
||||
type Props = CollectionEntry<"blog">["data"];
|
||||
|
||||
const { title } = Astro.props;
|
||||
const { title, date } = Astro.props;
|
||||
const path = useTranslatedPath(getLocale(Astro.url));
|
||||
---
|
||||
|
||||
<Layout title={title}>
|
||||
<article>
|
||||
<div class="prose">
|
||||
<div class="title">
|
||||
<h1>{title}</h1>
|
||||
<hr />
|
||||
<div class="top-info">
|
||||
<a href={path("/blog")}>← overview</a>
|
||||
<div class="date">
|
||||
{
|
||||
date.toLocaleString("en-US", {
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
})
|
||||
}
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
<h1>{title}</h1>
|
||||
<slot />
|
||||
</article>
|
||||
</Layout>
|
||||
|
||||
<style>
|
||||
article {
|
||||
margin-top: 50px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
padding: 20px;
|
||||
background: var(--background);
|
||||
}
|
||||
|
||||
.top-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1em;
|
||||
color: var(--outline);
|
||||
}
|
||||
|
||||
.top-info a {
|
||||
text-decoration: none;
|
||||
color: var(--outline);
|
||||
}
|
||||
|
||||
article :global(p) {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
article :global(img) {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user