Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import sitemap from "@astrojs/sitemap";
export default defineConfig({
site: "https://austinabbott.dev",
integrations: [mdx(), sitemap()],
markdown: {
shikiConfig: {
// Light and dark code colors; global.css picks one based on the theme toggle.
themes: { light: "github-light", dark: "github-dark" },
defaultColor: false,
},
},
image: {
service: {
entrypoint: "astro/assets/services/sharp",
Expand Down
6 changes: 6 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"@astrojs/mdx": "^8.0.0",
"@astrojs/rss": "^4.0.12",
"@astrojs/sitemap": "^3.6.0",
"@fontsource-variable/inter": "^5.3.0",
"@fontsource-variable/jetbrains-mono": "^5.3.0",
"astro": "^7.0.0",
"typescript": "^6.0.0"
}
Expand Down
Binary file removed public/fonts/atkinson-bold.woff
Binary file not shown.
Binary file removed public/fonts/atkinson-regular.woff
Binary file not shown.
18 changes: 2 additions & 16 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Import the global.css file here so that it is included on
// all pages through the use of the <BaseHead /> component.
import { ClientRouter } from "astro:transitions";
import "@fontsource-variable/inter";
import "@fontsource-variable/jetbrains-mono";
import "../styles/global.css";

interface Props {
Expand All @@ -21,22 +23,6 @@ const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props;
<link rel="icon" type="image/jpg+xml" href="/austin-abbott-character.jpg" />
<meta name="generator" content={Astro.generator} />

<!-- Font preloads -->
<link
rel="preload"
href="/fonts/atkinson-regular.woff"
as="font"
type="font/woff"
crossorigin
/>
<link
rel="preload"
href="/fonts/atkinson-bold.woff"
as="font"
type="font/woff"
crossorigin
/>

<!-- Canonical URL -->
<link rel="canonical" href={canonicalURL} />

Expand Down
100 changes: 33 additions & 67 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,89 +3,55 @@ const today = new Date();
---

<footer>
<span>
&copy; {today.getFullYear()} Austin Abbott. All rights reserved.
</span>
<div class="social-links">
<a href="https://github.com/AustinAbbott/dev-blog" target="_blank">
<span class="sr-only">Go to Austin Abbott's GitHub</span>
<svg
viewBox="0 0 16 16"
aria-hidden="true"
width="32"
height="32"
astro-icon="social/github"
><path
fill="currentColor"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"
></path></svg
>
</a>

<span>
<a class="tech-icon" href="https://astro.build/" target="_blank">
<svg
fill="currentColor"
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<title>Astro</title>
<path
fill="currentColor"
d="M8.358 20.162c-1.186-1.07-1.532-3.316-1.038-4.944.856 1.026 2.043 1.352 3.272 1.535 1.897.283 3.76.177 5.522-.678.202-.098.388-.229.608-.36.166.473.209.95.151 1.437-.14 1.185-.738 2.1-1.688 2.794-.38.277-.782.525-1.175.787-1.205.804-1.531 1.747-1.078 3.119l.044.148a3.158 3.158 0 0 1-1.407-1.188 3.31 3.31 0 0 1-.544-1.815c-.004-.32-.004-.642-.048-.958-.106-.769-.472-1.113-1.161-1.133-.707-.02-1.267.411-1.415 1.09-.012.053-.028.104-.045.165h.002zm-5.961-4.445s3.24-1.575 6.49-1.575l2.451-7.565c.092-.366.36-.614.662-.614.302 0 .57.248.662.614l2.45 7.565c3.85 0 6.491 1.575 6.491 1.575L16.088.727C15.93.285 15.663 0 15.303 0H8.697c-.36 0-.615.285-.784.727l-5.516 14.99z"
>
</path>
</svg>
</a>
<a class="tech-icon" href="https://pages.cloudflare.com" target="_blank">
<svg
fill="currentColor"
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<title>Cloudflare Pages</title>
<path
fill="currentColor"
d="M10.715 14.32H5.442l-.64-1.203L13.673 0l1.397.579-1.752 9.112h5.24l.648 1.192L10.719 24l-1.412-.54ZM4.091 5.448a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.543 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.544 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm8.657-2.7h5.424l.772.771v16.975l-.772.772h-7.392l.374-.579h6.779l.432-.432V3.758l-.432-.432h-4.676l-.552 2.85h-.59l.529-2.877.108-.552ZM2.74 21.265l-.772-.772V3.518l.772-.771h7.677l-.386.579H2.98l-.432.432v16.496l.432.432h5.586l-.092.579zm1.157-1.93h3.28l-.116.58h-3.55l-.192-.193v-3.473l.578 1.158zm13.117 0 .579.58H14.7l.385-.58z"
></path>
</svg>
</a>
<div class="inner">
<span>&copy; {today.getFullYear()} Austin Abbott. All rights reserved.</span>
<span class="links">
<a href="/rss.xml">RSS</a>
<a href="https://github.com/AustinAbbott/dev-blog" target="_blank" rel="noopener noreferrer">Source</a>
<span>
Built with <a href="https://astro.build/" target="_blank" rel="noopener noreferrer">Astro</a>
</span>
</span>
</div>
</footer>

<style>
footer {
padding: 2em 1em 6em 1em;
background: linear-gradient(var(--gray-gradient)) no-repeat;
color: rgb(var(--gray));
text-align: center;
max-width: var(--width);
width: 100%;
margin: 0 auto;
padding: 0 1.25rem 2.5rem;
color: var(--muted);
font-size: 0.875rem;
}

.social-links {
.inner {
display: flex;
flex-direction: column;
justify-content: center;
margin-top: 1em;
flex-wrap: wrap;
justify-content: space-between;
gap: 0.5rem 1.5rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border);
}

.social-links .tech-icon svg {
width: 20px;
color: rgb(var(--gray));
.links {
display: flex;
flex-wrap: wrap;
gap: 1rem;
}

.social-links .tech-icon svg:hover {
color: rgb(var(--gray-dark));
a {
color: inherit;
text-decoration: none;
}

.social-links a {
text-decoration: none;
color: rgb(var(--gray));
a:hover {
color: var(--heading);
}

.social-links a:hover {
color: rgb(var(--gray-dark));
@media (max-width: 560px) {
footer {
padding: 0 1rem 2rem;
}
}
</style>
124 changes: 56 additions & 68 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,24 @@ import ThemeToggle from "./ThemeToggle.astro";

<header transition:persist="site-header">
<nav>
<div id="IconAndTitle">
<a href="/">
<img
alt="Austin Abbott cartoon character"
height={50}
src="/austin-abbott-character.jpg"
width={50}
/>
</a>
</div>
<a class="site-title" href="/">
<img
alt=""
height={32}
src="/austin-abbott-character.jpg"
width={32}
/>
<span>Austin Abbott</span>
</a>
<div class="internal-links" id="InternalLinks">
<HeaderLink href="/">Home</HeaderLink>
<HeaderLink href="/blog">Blog</HeaderLink>
<HeaderLink href="/about">About</HeaderLink>
</div>
<div class="social-links" id="SocialLinks">
<ThemeToggle />
<a href="https://github.com/AustinAbbott" target="_blank" rel="noopener noreferrer">
<span class="sr-only">Go to Austin Abbott's GitHub</span>
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32"
<svg viewBox="0 0 16 16" aria-hidden="true" width="20" height="20"
><path
fill="currentColor"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"
Expand All @@ -37,8 +35,7 @@ import ThemeToggle from "./ThemeToggle.astro";
<svg
viewBox="0 0 24 24"
aria-hidden="true"
width="32"
height="32"
width="20" height="20"
><path
fill="currentColor"
d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"
Expand All @@ -52,14 +49,14 @@ import ThemeToggle from "./ThemeToggle.astro";
fill="currentColor"
aria-hidden="true"
viewBox="0 0 24 24"
width="32"
height="32"
width="20" height="20"
><path
fill="currentColor"
d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
></path></svg
>
</a>
<ThemeToggle />
</div>
</nav>
</header>
Expand All @@ -76,84 +73,75 @@ import ThemeToggle from "./ThemeToggle.astro";
</script>
<style>
header {
margin: 0;
padding: 0 1em;
background: var(--surface);
box-shadow: 0 2px 8px rgba(var(--black), 5%);
max-width: var(--width);
width: 100%;
margin: 0 auto;
padding: 1.5rem 1.25rem 0;
}

nav {
display: grid;
grid-template-columns: 1fr auto 1fr;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem 1.5rem;
padding-bottom: 1.25rem;
border-bottom: 1px solid var(--border);
}

nav div {
.site-title {
display: flex;
align-items: center;
gap: 0.6rem;
margin-right: auto;
color: var(--heading);
font-weight: 650;
text-decoration: none;
letter-spacing: -0.01em;
}

#IconAndTitle {
justify-content: flex-start;
}

#InternalLinks {
justify-content: center;
}

#SocialLinks {
justify-content: flex-end;
}

nav a {
padding: 1em 0.5em;
color: rgb(var(--black));
border-bottom: 4px solid transparent;
text-decoration: none;
.site-title img {
width: 32px;
height: 32px;
border-radius: 50%;
border: 1px solid var(--border);
}

nav a.active {
text-decoration: none;
border-bottom-color: var(--accent);
.internal-links {
display: flex;
gap: 1.25rem;
font-size: 0.95rem;
}

.social-links {
gap: 0.25rem;
display: flex;
align-items: center;
gap: 0.1rem;
}

.social-links a {
display: flex;
padding: 0.5rem;
border-radius: 8px;
color: var(--muted);
}

@media (max-width: 720px) {
nav {
grid-template-columns: 1fr auto 1fr;
grid-template-rows: auto auto;
}

#IconAndTitle {
grid-row: 1;
grid-column: 1;
}

#SocialLinks {
grid-row: 1;
grid-column: 3;
}
.social-links a:hover {
color: var(--heading);
background: var(--surface);
}

#InternalLinks {
grid-row: 2;
grid-column: 1 / -1;
justify-content: center;
@media (max-width: 560px) {
header {
padding: 1rem 1rem 0;
}

.social-links a svg {
width: 24px;
height: 24px;
nav {
row-gap: 0.25rem;
}

nav :global(a) {
padding: 0.75em 0.4em;
.internal-links {
order: 3;
width: 100%;
}
}
</style>
Loading
Loading