Theme site with castle logo and earthy palette

Swap the default Quartz palette for warm parchment/terracotta/moss in
light mode and mossy-charcoal/cream in dark mode, picked to harmonize
with the castle logo. Replace icon.png and og-image.png with the
castle artwork (favicon + social previews). Extend PageTitle to render
the logo next to the site title in the sidebar via flex layout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-05-18 16:41:35 +02:00
commit a8392d42c4
4 changed files with 39 additions and 20 deletions

View file

@ -1,4 +1,4 @@
import { pathToRoot } from "../util/path"
import { joinSegments, pathToRoot } from "../util/path"
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
import { classNames } from "../util/lang"
import { i18n } from "../i18n"
@ -6,9 +6,13 @@ import { i18n } from "../i18n"
const PageTitle: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzComponentProps) => {
const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title
const baseDir = pathToRoot(fileData.slug!)
const logoPath = joinSegments(baseDir, "static/icon.png")
return (
<h2 class={classNames(displayClass, "page-title")}>
<a href={baseDir}>{title}</a>
<a href={baseDir} class="page-title-link">
<img src={logoPath} alt="" class="page-title-logo" />
<span class="page-title-text">{title}</span>
</a>
</h2>
)
}
@ -19,6 +23,21 @@ PageTitle.css = `
margin: 0;
font-family: var(--titleFont);
}
.page-title-link {
display: flex;
align-items: center;
gap: 0.6rem;
text-decoration: none;
}
.page-title-logo {
width: 2.4rem;
height: 2.4rem;
flex-shrink: 0;
object-fit: contain;
}
.page-title-text {
line-height: 1.1;
}
`
export default (() => PageTitle) satisfies QuartzComponentConstructor

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Before After
Before After