-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
default remark layout, navitems, tweaks
- Loading branch information
Showing
20 changed files
with
140 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
import NavItem from "./NavItem.astro"; | ||
type Props = { | ||
isHome: boolean; | ||
}; | ||
const { isHome } = Astro.props; | ||
--- | ||
|
||
{!isHome && <NavItem href="/">Home</NavItem>} | ||
<NavItem href="/blog/">Blog</NavItem> | ||
<NavItem href="/rss.xml">RSS</NavItem> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
// Find all blog posts to generate | ||
import type { CommonBlog } from "src/lib/cms"; | ||
import Layout from "./Layout.astro"; | ||
import PagesLayout from "./PagesLayout.astro"; | ||
type Props = { | ||
frontmatter: CommonBlog; | ||
}; | ||
const { frontmatter: post } = Astro.props; | ||
if (post.title === undefined) | ||
throw new Error("Frontmatter page title missing. E.g. 'title: Moo'"); | ||
--- | ||
|
||
<Layout | ||
title={post.title} | ||
description={post.description} | ||
subtitle={post.description} | ||
blogPost={post} | ||
> | ||
<PagesLayout> | ||
<div | ||
class="pt-4 bg-gray-200 py-2 md:py-10 md:px-10 md:flex justify-center" | ||
> | ||
<div | ||
class="bg-white py-10 shadow px-5 lg:px-10 flex-1 lg:max-w-6xl" | ||
> | ||
<article class="mb-6 prose lg:prose-lg prose-li:m-0"> | ||
<slot /> | ||
</article> | ||
|
||
<p> </p> | ||
</div> | ||
</div> | ||
</PagesLayout> | ||
</Layout> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { VFile } from "vfile"; | ||
import type { CommonBlog } from "../cms"; | ||
|
||
// This sets our default layout even if there is no frontmatter | ||
// - Use case: Simple pages like /now or /using | ||
interface AstroFile extends VFile { | ||
data: { | ||
astro: { | ||
frontmatter: CommonBlog & { | ||
layout?: string; | ||
}; | ||
}; | ||
}; | ||
} | ||
|
||
export const setLayout = () => { | ||
const transformer = (_, file: AstroFile) => { | ||
file.data.astro.frontmatter.layout = | ||
file.data.astro.frontmatter.layout ?? | ||
"@layouts/MarkdownLayout.astro"; | ||
}; | ||
return transformer; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
--- | ||
import PagesLayout from "@layouts/PagesLayout.astro"; | ||
import { actions } from "astro:actions"; | ||
import Layout from "../../layout/Layout.astro"; | ||
import PagesLayout from "../../layout/PagesLayout.astro"; | ||
import { isInputError } from "astro:actions"; | ||
const result = Astro.getActionResult(actions.contactMe); | ||
const inputErrors = isInputError(result?.error) ? result.error.fields : {} | ||
const inputErrors = isInputError(result?.error) ? result.error.fields : {}; | ||
--- | ||
|
||
<PagesLayout title="Contact me"> | ||
<form method="post" action={actions.contactMe}> | ||
<input class="block rounded-md border py-1 px-2" name="email" type="email" aria-describedby="error"/> | ||
{inputErrors.email && <p id="error">{inputErrors.email.join(',')}</p>} | ||
<input | ||
class="block rounded-md border py-1 px-2" | ||
name="email" | ||
type="email" | ||
aria-describedby="error" | ||
/> | ||
{inputErrors.email && <p id="error">{inputErrors.email.join(",")}</p>} | ||
<button type="submit">Wat</button> | ||
</form> | ||
</PagesLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,22 @@ | ||
--- | ||
layout: "../components/MarkdownLayout.astro" | ||
title: Using | ||
--- | ||
|
||
# Hello | ||
# Using | ||
|
||
Here is a list of tools that I use. If I need to reinstall a computer, this serves as a nice document. If it helps you too, that's a bonus! | ||
|
||
## Work | ||
|
||
- **Computer**: Apple Macbook Pro M1 Max w. 32G RAM. | ||
|
||
## Hobby programming | ||
|
||
- **Computer**: Apple Macbook Air M3 | ||
|
||
## Gaming | ||
|
||
- **Computer**: AMD Ryzen 3500 w. AMD RX 7900XT GPU, 32G RAM, 2TB SSD | ||
- **Mouse**: Razer Basilisk V3 | ||
- **Keyboard**: Ducky One 2 RKL RGB | ||
- **Monitor**: [Samsung 34" CF791](https://www.samsung.com/us/computing/monitors/gaming/34--cf791-wqhd-monitor-lc34f791wqnxza/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters