update blog code

pyrox.dev 85e2e9f0 2d92d204

verified
+4
src/_components/logo.vto
···
+
<div class="flex flex-row justify-center gap-x-4 content-center">
+
<i class="bi bi-exclamation-triangle text-yellow self-center justify-self-end text-4xl"></i>
+
<p class="text-text text-xl self-center">a space</p>
+
</div>
+23
src/_components/post_card.vto
···
+
{{ if compact }}
+
<li class="bg-surface0 rounded">
+
<a href="{{ post.url }}">
+
<div class="m-4 pb-1">
+
<p class="text-subtext1 text-lg">{{ post.title }}</p>
+
<p class="inline italic text-subtext0">{{ post.summary }}</p>
+
<p class="float-right inline text-blue">{{ post.date |> date('DATE') }}</p>
+
</div>
+
</a>
+
</li>
+
{{ else }}
+
<li class="bg-surface0 rounded-md">
+
<a href="{{ post.url }}">
+
<div class="m-6 py-2">
+
<h2 class="text-subtext1 font-serif text-2xl mb-2">{{ post.title }}</h2>
+
<h3 class="text-lg lg:inline italic text-subtext0">{{ post.summary }}</h3>
+
<p class="text-lg lg:float-right lg:inline text-blue">
+
{{ post.date |> date('DATE') }}
+
</p>
+
</div>
+
</a>
+
</li>
+
{{ /if }}
+15 -17
src/_data.toml src/_data/author.toml
···
-
[metas]
-
site = "dish's space"
-
lang = "en"
-
generator = true
-
-
[author]
name = "dish"
+
url = "https://pyrox.dev"
pronouns = "fox/it/she"
icon = "assets/author.png"
-
[[author.links]]
-
service = "bluesky"
-
link = "https://bsky.app/profile/pyrox.dev"
-
description = "personal Bluesky account"
-
[[author.links]]
+
[[links]]
service = "lastdotfm"
link = "https://www.last.fm/user/thehedgeh0g"
description = "last.fm profile"
-
[[author.links]]
+
extra_classes = "pt-2.5 text-[2.5rem]"
+
[[links]]
+
service = "kofi"
+
link = "https://ko-fi.com/pyroxdev"
+
description = "Ko-fi donation page"
+
extra_classes = "pt-1 text-[2.5rem]"
+
[[links]]
service = "forgejo"
link = "https://git.pyrox.dev/pyrox"
description = "personal Git forge"
-
[[author.links]]
+
extra_classes = "-mx-1.5"
+
[[links]]
service = "github"
link = "https://github.com/pyrox0"
description = "Github profile"
-
[[author.links]]
-
service = "kofi"
-
link = "https://ko-fi.com/pyroxdev"
-
description = "Ko-fi donation page"
+
[[links]]
+
service = "bluesky"
+
link = "https://bsky.app/profile/pyrox.dev"
+
description = "personal Bluesky account"
+4
src/_data/metas.toml
···
+
site = "dish's space"
+
lang = "en-US"
+
generator = true
+
color = [ "light", "dark"]
+14
src/_data/nav.toml
···
+
[[links]]
+
name = "About"
+
link = "/about"
+
extra_classes = ""
+
+
[[links]]
+
name = "Blog"
+
link = "/blog"
+
extra_classes = ""
+
+
[[links]]
+
name = "Projects"
+
link = "/projects"
+
extra_classes = ""
+34 -27
src/_includes/components/footer.vto
···
-
<footer class="bg-mantle min-h-24 inset-x-0 bottom-0 absolute border-t-2 border-surface1 grid text-text grid-cols-3">
-
<div class="flex flex-row justify-center gap-x-4 content-center">
-
<i class="bi bi-exclamation-triangle text-yellow self-center justify-self-end text-4xl"></i>
-
<p class="text-text text-xl self-center">a space</p>
-
</div>
-
<div class="mt-2">
-
<p class="text-overlay2 text-lg">Social</p>
-
<ul class="list-none text-4xl text-subtext1">
-
{{ for link of author.links }}
-
<li class="inline-block">
-
<a href="{{link.link}}" rel="me" aria-label="{{author.name}}'s {{link.description}}">
-
<i class="si si-{{link.service}}"></i>
-
</a>
-
</li>
-
{{ /for }}
-
<li class="inline-block text-3xl">
-
<a href="/blog.rss" aria-label="Blog RSS Feed">
-
<i class="si si-rss"></i>
-
</a>
-
</li>
-
</ul>
-
</div>
-
<div class="mt-2">
-
<p class="text-overlay2 text-lg">Info</p>
-
<p class="text-lg text-overlay1">&copy; 2025 dish</p>
-
<a href="https://git.pyrox.dev/pyrox/new-blog/commit/{{ commit }}" target="_blank" class="text-blue underline">version {{ commit |> substring(0, 8) }}</a>
-
</div>
+
<footer
+
class="bg-mantle min-h-24 inset-x-0 bottom-0 border-t-2 border-surface1 grid text-text grid-cols-3"
+
>
+
{{ comp.logo() }}
+
<div class="mt-2">
+
<p class="text-overlay2 text-lg">Social</p>
+
<ul class="list-none text-4xl text-subtext1">
+
{{ for link of author.links }}
+
<li class="inline-block">
+
<a
+
href="{{link.link}}"
+
rel="me"
+
aria-label="{{author.name}}'s {{link.description}}"
+
>
+
<i class="si si-{{link.service}} {{link.extra_classes}}"></i>
+
</a>
+
</li>
+
{{ /for }}
+
<li class="inline-block text-[2rem]">
+
<a href="/blog.rss" aria-label="Blog RSS Feed">
+
<i class="si si-rss"></i>
+
</a>
+
</li>
+
</ul>
+
</div>
+
<div class="mt-2">
+
<p class="text-overlay2 text-lg">Info</p>
+
<p class="text-lg text-overlay1">&copy; 2025 dish</p>
+
<a
+
href="https://git.pyrox.dev/pyrox/new-blog/commit/{{ commit }}"
+
target="_blank"
+
class="text-blue underline"
+
>version {{ commit |> substring(0, 8) }}</a>
+
</div>
</footer>
<div style="display:none" class="latte"></div>
+8 -2
src/_includes/components/head.vto
···
+
{{# Site-wide Metadata #}}
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="view-transition" content="same-origin" />
-
<meta name="supported-color-schemes" content="light dark" />
+
<meta name="supported-color-schemes" content="dark light" />
+
{{# Feed Links #}}
<link rel="alternate" type="application/feed+json" href="/blog.json" />
<link rel="alternate" type="application/rss+xml" href="/blog.rss" />
+
{{# Stylesheets #}}
+
<link rel="stylesheet" href="/static/fonts.css" />
<link rel="stylesheet" href="/static/styles.css" />
<link rel="stylesheet" href="/static/icons/bsi.min.css" />
<link rel="stylesheet" href="/static/icons/si.min.css" />
-
<title>{{title}}</title>
+
{{# Page Metadata #}}
+
<link rel="canonical" href="{{ url }}" />
+
<title>{{ title }}</title>
+14 -2
src/_includes/components/navbar.vto
···
-
<header role="banner" class="bg-mantle min-h-20 grid grid-cols-8 grid-rows-1 mb-2">
-
<p class="text-text">meow</p>
+
<header role="banner" class="bg-mantle min-h-20 flex flex-row justify-around mb-2">
+
<a class="flex flex-row justify-center gap-x-4 content-center" href="/">
+
{{ comp.logo() }}
+
</a>
+
<nav
+
aria-label="Main"
+
class="flex flex-row text-3xl text-mauve underline gap-x-16 justify-center"
+
>
+
{{ for link of nav.links }}
+
<a class="underline self-center" href="{{ link.link }}">{{ link.name }}</a>
+
{{ /for }}
+
</nav>
+
<div></div>
+
<p class="text-overlay1 self-center">search coming soon</p>
</header>
+21
src/_includes/layouts/about.vto
···
+
{{ layout "layouts/base.vto" }}
+
<main class="min-h-screen text-text justify-self-center w-full lg:w-1/2 h-card">
+
<h1 class="mt-8 text-5xl text-bold text-mauve">
+
About
+
<div class="p-name p-nickname inline">
+
dish
+
</div>
+
</h1>
+
+
<h2 class="text-2xl mt-4">
+
<div class="inline p-job-title">Student</div>, Sysadmin, and UX Crafter
+
</h2>
+
<p class="text-lg mt-2">
+
Howdy! I play with computers, with an emphasis on accessible, secure, and enjoyable
+
experiences.
+
</p>
+
+
<h3 class="text-mauve text-2xl">About This Blog</h3>
+
<p class="text-"></p>
+
</main>
+
{{ /layout }}
+11
src/_includes/layouts/base.vto
···
+
<!DOCTYPE html>
+
<html lang="en-US">
+
<head>
+
{{ include "components/head.vto" }}
+
</head>
+
<body id="body" class="mocha bg-crust grid">
+
{{ include "components/navbar.vto" }}
+
{{ content }}
+
{{ include "components/footer.vto" }}
+
</body>
+
</html>
+13
src/_includes/layouts/blog-list.vto
···
+
{{ layout "layouts/base.vto" }}
+
<main class="min-h-screen text-text justify-self-center w-full lg:w-1/2">
+
<h1 class="text-5xl my-8">Blog</h1>
+
<a class="lg:inline float-right -mt-20 mr-1.5" href="/blog.rss" aria-label="Blog RSS Feed">
+
<i class="text-5xl si si-rss"></i>
+
</a>
+
<ul class="mt-8">
+
{{ for post of search.pages("category=blog") }}
+
{{ comp.post_card({"post": post}) }}
+
{{ /for }}
+
</ul>
+
</main>
+
{{ /layout }}
+21
src/_includes/layouts/blog-post.vto
···
+
{{ layout "layouts/base.vto" }}
+
<main class="min-h-screen text-text justify-self-center w-full lg:w-1/2">
+
<article class="h-entry">
+
<h1 class="text-5xl font-serif mt-8 p-name">{{ title }}</h1>
+
<h2 class="text-2xl font-sans mt-4 text-subtext0">
+
Published on
+
<time class="dt-published" datetime="{{ published |> date }}">
+
{{ published |> date('POST_DATE') }}
+
</time>
+
</h2>
+
<h2 class="text-2xl font-sans mb-8 text-overlay1">
+
By
+
<div class="inline p-author">{{ author.name }}</div>
+
</h2>
+
+
<div class="e-content text-lg">
+
{{ content }}
+
</div>
+
</article>
+
</main>
+
{{ /layout }}
+19 -12
src/_includes/layouts/home.vto
···
-
<!DOCTYPE html>
-
<html lang="en-US">
-
<head>
-
{{ include "components/head.vto" }}
-
</head>
-
<body id="body" class="mocha bg-crust">
-
{{ include "components/navbar.vto" }}
-
<h1 class="text-blue">meow</h1>
-
<h2 class="text-mauve">the fitnessgram pacer test</h2>
-
{{ include "components/footer.vto" }}
-
</body>
-
</html>
+
{{ layout "layouts/base.vto" }}
+
<main class="min-h-screen text-text justify-self-center w-full lg:w-1/2">
+
<h1 class="mt-8 text-5xl text-bold text-mauve">hi, I'm dish</h1>
+
{{# Profile picture goes here #}}
+
<div class="h-64 content-center border-2 mt-4">Profile Picture</div>
+
<h2 class="text-2xl mt-4">Student, Sysadmin, and UX Crafter</h2>
+
<p class="text-lg mt-2">
+
Howdy! I play with computers, with an emphasis on accessible, secure, and enjoyable
+
experiences.
+
</p>
+
<!-- <div class="h-4"></div> -->
+
<h2 class="my-8 text-2xl">Recent blog posts:</h2>
+
<ul class="lg:w-3/4">
+
{{ for post of search.pages("category=blog", "date", 5) }}
+
{{ comp.post_card({"post": post, compact: true}) }}
+
{{ /for }}
+
</ul>
+
</main>
+
{{ /layout }}
+19
src/_includes/layouts/projects.vto
···
+
{{ layout "layouts/base.vto" }}
+
<main class="min-h-screen text-text justify-self-center w-full lg:w-1/2">
+
<h1 class="mt-8 text-5xl text-bold text-mauve">hi, I'm dish</h1>
+
{{# Profile picture goes here #}}
+
<div class="h-64 content-center border-2 mt-4">Profile Picture</div>
+
<h2 class="text-2xl mt-4">Student, Sysadmin, and UX Crafter</h2>
+
<p class="text-lg mt-2">
+
Howdy! I play with computers, with an emphasis on accessible, secure, and enjoyable
+
experiences.
+
</p>
+
<!-- <div class="h-4"></div> -->
+
<h2 class="my-8 text-2xl">Recent blog posts:</h2>
+
<ul class="lg:w-3/4">
+
{{ for post of search.pages("category=blog", "date", 5) }}
+
{{ comp.post_card({"post": post, compact: true}) }}
+
{{ /for }}
+
</ul>
+
</main>
+
{{ /layout }}
+5
src/about.vto
···
+
---
+
title: about dish
+
summary: "Who is dish? Find out here."
+
layout: layouts/about.vto
+
---
+8
src/blog/_data.toml
···
+
layout = "layouts/blog-post.vto"
+
category = "blog"
+
+
[metas]
+
title = "=title"
+
description = "=summary"
+
image = "=image"
+
keywords = "=tags"
+8
src/blog/example-blog-post-2.md
···
+
---
+
title: example blog post 2
+
summary: "Testing how posts work in lume"
+
draft: false
+
published: 2025-02-14
+
---
+
+
# meow meow!
+8
src/blog/example-blog-post.md
···
+
---
+
title: example blog post
+
summary: "Testing how posts work in lume"
+
draft: false
+
published: 2025-02-14
+
---
+
+
# meow meow!
+6
src/blog/index.vto
···
+
---
+
title: Blog Posts
+
summary: "dish's blog posts"
+
layout: layouts/blog-list.vto
+
category: "index"
+
---
-1
src/index.vto
···
summary: "Lover of computers, programming, and sysadmin."
layout: layouts/home.vto
---
-
+5
src/projects.vto
···
+
---
+
title: Projects
+
summary: "All the things dish works on"
+
layout: layouts/projects.vto
+
---