Fix some font scaling
This commit is contained in:
@@ -15,3 +15,9 @@ const { date } = Astro.props;
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
</time>
|
</time>
|
||||||
|
<style>
|
||||||
|
time {
|
||||||
|
font-family: "Fira Code", monospace;
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ const isActive = href === pathname || href === '/' + (subpath?.[0] || '');
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--color-light-text);
|
color: var(--color-light-text);
|
||||||
|
font-size: var(--font-size-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
a.hover {
|
a.hover {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import type { CollectionEntry } from 'astro:content';
|
import type { CollectionEntry } from 'astro:content';
|
||||||
import RootLayout from '../layouts/RootLayout.astro';
|
import RootLayout from '../layouts/RootLayout.astro';
|
||||||
import FormattedDate from '../components/FormattedDate.astro';
|
import FormattedDate from '../components/FormattedDate.astro';
|
||||||
|
import NotchedBox from '../components/NotchedBox.astro';
|
||||||
import { Image } from 'astro:assets';
|
import { Image } from 'astro:assets';
|
||||||
|
|
||||||
type Props = CollectionEntry<'blog'>['data'];
|
type Props = CollectionEntry<'blog'>['data'];
|
||||||
@@ -11,6 +12,7 @@ const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
|
|||||||
|
|
||||||
<RootLayout title={title} description={description}>
|
<RootLayout title={title} description={description}>
|
||||||
<main>
|
<main>
|
||||||
|
<NotchedBox fillNotches="left">
|
||||||
<article>
|
<article>
|
||||||
<div class="hero-image">
|
<div class="hero-image">
|
||||||
{heroImage && <Image width={1020} height={510} src={heroImage} alt="" />}
|
{heroImage && <Image width={1020} height={510} src={heroImage} alt="" />}
|
||||||
@@ -32,6 +34,7 @@ const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
|
|||||||
</div>
|
</div>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
</NotchedBox>
|
||||||
</main>
|
</main>
|
||||||
</RootLayout>
|
</RootLayout>
|
||||||
|
|||||||
@@ -14,6 +14,14 @@
|
|||||||
--color-accent: var(--color-red);
|
--color-accent: var(--color-red);
|
||||||
--background: var(--color-space-blue);
|
--background: var(--color-space-blue);
|
||||||
--background-light: lighten(var(--color-space-blue));
|
--background-light: lighten(var(--color-space-blue));
|
||||||
|
|
||||||
|
--font-size-sm: calc(var(--font-size-md) / 1.2);
|
||||||
|
--font-size-md: 20px;
|
||||||
|
--font-size-lg: calc(var(--font-size-md) * 1.2);
|
||||||
|
--font-size-xl: calc(var(--font-size-lg) * 1.2);
|
||||||
|
--font-size-2xl: calc(var(--font-size-xl) * 1.2);
|
||||||
|
--font-size-3xl: calc(var(--font-size-2xl) * 1.2);
|
||||||
|
--font-size-4xl: calc(var(--font-size-3xl) * 1.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
@@ -95,7 +103,7 @@ body {
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
color: var(--color-light-text);
|
color: var(--color-light-text);
|
||||||
font-size: 20px;
|
font-size: var(--font-size-md);
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
background-color: var(--color-space-blue);
|
background-color: var(--color-space-blue);
|
||||||
}
|
}
|
||||||
@@ -112,20 +120,21 @@ h6 {
|
|||||||
margin: 0 0 0.5rem 0;
|
margin: 0 0 0.5rem 0;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
/* Progressive 1.2x scaling from the base */
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 3.052em;
|
font-size: var(--font-size-4xl);
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 2.441em;
|
font-size: var(--font-size-3xl);
|
||||||
}
|
}
|
||||||
h3 {
|
h3 {
|
||||||
font-size: 1.953em;
|
font-size: var(--font-size-2xl);
|
||||||
}
|
}
|
||||||
h4 {
|
h4 {
|
||||||
font-size: 1.563em;
|
font-size: var(--font-size-xl);
|
||||||
}
|
}
|
||||||
h5 {
|
h5 {
|
||||||
font-size: 1.25em;
|
font-size: var(--font-size-lg);
|
||||||
}
|
}
|
||||||
strong,
|
strong,
|
||||||
b {
|
b {
|
||||||
|
|||||||
Reference in New Issue
Block a user