switch to PaperMod theme (pinned v8.0), Georgia serif body, mono for nav/meta/code

This commit is contained in:
authentik Default Admin 2026-05-27 13:38:47 +02:00 committed by root
parent 825746cc79
commit 5364811f91
12 changed files with 215 additions and 69 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "themes/PaperMod"]
path = themes/PaperMod
url = https://github.com/adityatelange/hugo-PaperMod.git

View file

@ -0,0 +1,50 @@
:root {
--gap: 24px;
--content-gap: 20px;
--main-width: 720px;
--header-height: 60px;
--footer-height: 60px;
--radius: 4px;
}
body,
.post-content p,
.post-content li {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 17px;
line-height: 1.7;
}
.post-title,
.first-entry .entry-header h1,
.entry-header h2,
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
font-family: Georgia, "Times New Roman", Times, serif;
letter-spacing: -0.01em;
}
.entry-meta,
.post-meta,
.breadcrumbs,
.terms-tags,
time {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
font-size: 0.85em;
}
code,
pre,
.highlight {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
.nav a,
.logo a,
.menu a,
.footer {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
font-size: 0.92em;
}

View file

@ -12,7 +12,7 @@ Migrated from Django to Hugo. Less to maintain, more focus on what matters: the
```python
def hello():
print("init 6")
print("hello world")
```
## lists

View file

@ -12,7 +12,7 @@ Migrei de Django para Hugo. Menos coisa pra manter, mais foco no que importa: o
```python
def hello():
print("init 6")
print("ola mundo")
```
## listas

View file

@ -1,38 +1,36 @@
baseURL = "https://richardnixon.dev/"
title = "Richard Nixon"
theme = "init6ish"
theme = "PaperMod"
defaultContentLanguage = "pt-br"
defaultContentLanguageInSubdir = true
enableRobotsTXT = true
enableEmoji = false
summaryLength = 30
pluralizeListTitles = false
buildFuture = false
buildDrafts = false
[pagination]
pagerSize = 50
pagerSize = 20
[taxonomies]
tag = "tags"
[minify]
disableXML = true
minifyOutput = true
[markup]
[markup.goldmark.renderer]
unsafe = false
[markup.highlight]
style = "bw"
noClasses = false
codeFences = true
guessSyntax = true
lineNos = false
style = "github"
tabWidth = 2
[outputs]
home = ["html", "rss"]
section = ["html", "rss"]
[outputFormats]
[outputFormats.RSS]
mediatype = "application/rss+xml"
baseName = "feed"
home = ["HTML", "RSS", "JSON"]
[languages]
[languages.pt-br]
@ -43,15 +41,24 @@ buildDrafts = false
title = "Richard Nixon"
[languages.pt-br.params]
description = "Notas de um engenheiro de software."
tagline = "engenharia, seguranca, sysadmin."
[languages.pt-br.params.homeInfoParams]
Title = "olá 👋"
Content = "engenheiro de software, foco em segurança e infraestrutura self-hosted. notas e experimentos."
[[languages.pt-br.menu.main]]
identifier = "writing"
name = "writing"
url = "/posts/"
weight = 1
[[languages.pt-br.menu.main]]
identifier = "about"
name = "about"
url = "/about/"
weight = 2
[[languages.pt-br.menu.main]]
identifier = "tags"
name = "tags"
url = "/tags/"
weight = 3
[languages.en]
languageName = "EN"
languageCode = "en-US"
@ -60,17 +67,59 @@ buildDrafts = false
title = "Richard Nixon"
[languages.en.params]
description = "Notes from a software engineer."
tagline = "engineering, security, sysadmin."
[languages.en.params.homeInfoParams]
Title = "hi 👋"
Content = "software engineer focused on security and self-hosted infrastructure. notes and experiments."
[[languages.en.menu.main]]
identifier = "writing"
name = "writing"
url = "/posts/"
weight = 1
[[languages.en.menu.main]]
identifier = "about"
name = "about"
url = "/about/"
weight = 2
[[languages.en.menu.main]]
identifier = "tags"
name = "tags"
url = "/tags/"
weight = 3
[params]
env = "production"
author = "Richard Nixon"
email = "rnixonaf@gmail.com"
forgejo = "https://git.richardnixon.dev/richard"
defaultTheme = "auto"
disableThemeToggle = false
ShowReadingTime = true
ShowShareButtons = false
ShowPostNavLinks = true
ShowBreadCrumbs = true
ShowCodeCopyButtons = true
ShowWordCount = false
ShowRssButtonInSectionTermList = true
UseHugoToc = true
disableSpecial1stPost = false
disableScrollToTop = false
comments = false
hidemeta = false
hideSummary = false
ShowToc = false
TocOpen = false
[params.assets]
disableHLJS = true
disableFingerprinting = false
favicon = "/favicon.ico"
favicon16x16 = "/favicon-16x16.png"
favicon32x32 = "/favicon-32x32.png"
[[params.socialIcons]]
name = "rss"
url = "/feed.xml"
[[params.socialIcons]]
name = "email"
url = "mailto:rnixonaf@gmail.com"
[[params.socialIcons]]
name = "gitea"
url = "https://git.richardnixon.dev/richard"

1
themes/PaperMod Submodule

@ -0,0 +1 @@
Subproject commit a2eb47bb4b805116dcd34c1605d39835121f8dbe

View file

@ -52,15 +52,20 @@ header.site {
padding-bottom: 1rem;
}
header.site .prompt-line {
color: var(--fg-dim);
margin-bottom: 0.4rem;
font-size: 0.9rem;
}
header.site .prompt {
color: var(--fg-dim);
}
header.site h1 {
display: inline;
font-size: 1rem;
font-weight: 600;
margin: 0;
margin: 0 0 0.4rem;
}
header.site h1 a {
@ -69,7 +74,7 @@ header.site h1 a {
}
header.site nav {
margin-top: 0.5rem;
margin-top: 0.3rem;
}
header.site nav a {
@ -106,26 +111,28 @@ ul.post-list {
}
ul.post-list li {
display: flex;
gap: 1rem;
padding: 0.2rem 0;
padding: 0.4rem 0;
}
ul.post-list time {
ul.post-list .post-meta {
color: var(--fg-dim);
white-space: nowrap;
font-size: 0.88rem;
margin-bottom: 0.1rem;
font-variant-numeric: tabular-nums;
}
.year-heading {
margin-top: 1.5rem;
margin-bottom: 0.5rem;
color: var(--fg-dim);
font-size: 0.95rem;
font-weight: 600;
ul.post-list .post-num {
margin-right: 0.6rem;
}
.year-heading:first-of-type { margin-top: 0; }
ul.post-list .post-link {
color: var(--fg);
border-bottom: 1px dotted var(--fg-dim);
}
ul.post-list .post-link:hover {
border-bottom-style: solid;
}
code {
background: var(--code-bg);
@ -185,6 +192,14 @@ footer.site {
font-size: 0.9rem;
}
footer.site a {
color: var(--fg-dim);
border-bottom: 1px dotted var(--fg-dim);
margin-left: 0.4rem;
}
footer.site a:hover { border-bottom-style: solid; }
.tags {
margin-top: 2rem;
color: var(--fg-dim);

View file

@ -2,21 +2,22 @@
<h1>{{ .Title }}</h1>
{{ with .Content }}{{ . }}{{ end }}
{{ $pages := .Pages }}
{{ if eq .Section "posts" }}
{{ $pages = where .Pages "Params.draft" "!=" true }}
{{ end }}
{{- $pages := .Pages -}}
{{- if eq .Section "posts" -}}
{{- $pages = where (where site.RegularPages "Section" "posts") "Params.draft" "!=" true -}}
{{- end -}}
{{- $total := len $pages -}}
{{ $byYear := $pages.GroupByDate "2006" }}
{{ range $byYear }}
<div class="year-heading">{{ .Key }}</div>
<ul class="post-list">
{{ range .Pages }}
<li>
<ul class="post-list">
{{- range $i, $p := $pages }}
{{- $num := sub $total $i -}}
<li>
<div class="post-meta">
<span class="post-num">#{{ printf "%03d" $num }}</span>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
<a class="post-link" href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{- end }}
</ul>
{{ end }}

View file

@ -1,16 +1,17 @@
{{ define "main" }}
<h1>#{{ .Title }}</h1>
{{ $byYear := .Pages.GroupByDate "2006" }}
{{ range $byYear }}
<div class="year-heading">{{ .Key }}</div>
<ul class="post-list">
{{ range .Pages }}
<li>
{{- $total := len .Pages -}}
<ul class="post-list">
{{- range $i, $p := .Pages }}
{{- $num := sub $total $i -}}
<li>
<div class="post-meta">
<span class="post-num">#{{ printf "%03d" $num }}</span>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
<a class="post-link" href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{- end }}
</ul>
{{ end }}

View file

@ -1,16 +1,21 @@
{{ define "main" }}
{{ .Content }}
{{ $posts := where (where site.RegularPages "Section" "posts") "Params.draft" "!=" true }}
{{ if $posts }}
{{- $posts := where (where site.RegularPages "Section" "posts") "Params.draft" "!=" true -}}
{{- $total := len $posts -}}
{{- if $posts }}
<h2>{{ i18n "recent_posts" | default "recent" }}</h2>
<ul class="post-list">
{{ range first 10 $posts }}
{{- range $i, $p := first 10 $posts }}
{{- $num := sub $total $i -}}
<li>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
<div class="post-meta">
<span class="post-num">#{{ printf "%03d" $num }}</span>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
</div>
<a class="post-link" href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
{{- end }}
</ul>
{{ end }}
{{- end }}
{{ end }}

View file

@ -1,3 +1,7 @@
<footer class="site">
<span class="prompt">$ init 6</span> &middot; {{ site.Params.tagline | default site.Params.description }}
<span class="prompt">$ exit 0</span>
&middot; {{ now.Format "2006" }} {{ site.Params.author | lower }}
&nbsp;
<a href="{{ "feed.xml" | relLangURL }}">[rss]</a>
<a href="mailto:{{ site.Params.email }}">[email]</a>
</footer>

View file

@ -1,6 +1,23 @@
{{ $home := site.Home }}
{{- $home := site.Home -}}
{{- $prompt := "whoami" -}}
{{- if .IsHome -}}
{{- $prompt = "whoami" -}}
{{- else if and .IsPage (eq .Section "posts") -}}
{{- $prompt = printf "less %s.md" .File.ContentBaseName -}}
{{- else if and .IsNode (eq .Section "posts") -}}
{{- $prompt = "ls -lh posts/" -}}
{{- else if eq .Kind "taxonomy" -}}
{{- $prompt = "ls tags/" -}}
{{- else if eq .Kind "term" -}}
{{- $prompt = printf "grep -r %s" (.Title | lower) -}}
{{- else if eq .File.ContentBaseName "about" -}}
{{- $prompt = "cat about.md" -}}
{{- end -}}
<header class="site">
<span class="prompt">$ whoami&nbsp;</span><h1><a href="{{ $home.RelPermalink }}">{{ site.Params.author }}</a></h1>
<div class="prompt-line">
<span class="prompt">${{ " " }}{{ $prompt }}</span>
</div>
<h1><a href="{{ $home.RelPermalink }}">{{ site.Params.author }}</a></h1>
<nav>
{{ range site.Menus.main }}
<a href="{{ .URL | relLangURL }}">{{ .Name }}</a>