diff options
| author | JustZvan <justzvan@justzvan.xyz> | 2026-03-24 20:14:42 +0100 |
|---|---|---|
| committer | JustZvan <justzvan@justzvan.xyz> | 2026-03-24 20:14:42 +0100 |
| commit | a60a600522b9c638cf06fc484d80209dfb7d5c20 (patch) | |
| tree | 9801ae967ac65724333abf15a35d445a05167095 /themes/JustZvan | |
feat: initial commit
Diffstat (limited to 'themes/JustZvan')
36 files changed, 466 insertions, 0 deletions
diff --git a/themes/JustZvan/archetypes/default.md b/themes/JustZvan/archetypes/default.md new file mode 100644 index 0000000..25b6752 --- /dev/null +++ b/themes/JustZvan/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/themes/JustZvan/assets/css/main.css b/themes/JustZvan/assets/css/main.css new file mode 100644 index 0000000..9804cf4 --- /dev/null +++ b/themes/JustZvan/assets/css/main.css @@ -0,0 +1,206 @@ +body { + background: #000; + color: #fff; + font-family: "JetBrains Mono Regular"; + margin: 0; + display: flex; + flex-direction: column; + min-height: 100vh; +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +a { + color: #fff; +} + +a:visited { + color: #fff; +} + +.sitename { + font-family: "Pencil Child"; + font-size: 5rem; + margin: 0; +} + +header { + padding: 1rem; + display: flex; + justify-content: center; +} + +footer { + text-align: center; + padding: 1rem; + opacity: 0.7; + font-size: 0.9rem; +} + +main { + flex: 1; + display: flex; + flex-direction: column; +} + +.home-hero { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 1.5rem; + text-align: center; + padding: 1rem; +} + +.home-about { + max-width: 60ch; + line-height: 1.6; +} + +.home-about p { + margin: 0; +} + +nav ul { + list-style: none; + display: flex; + flex-wrap: nowrap; + justify-content: center; + align-items: center; + gap: 1.25rem; + margin: 0; + padding: 0; + white-space: nowrap; + overflow-x: auto; +} + +nav li { + flex: 0 0 auto; +} + +nav a { + letter-spacing: 0.03em; +} + +.home-social-links { + display: flex; + flex-wrap: nowrap; + justify-content: center; + align-items: center; + gap: 1rem; + white-space: nowrap; + overflow-x: auto; +} + +.home-social-links a { + text-decoration: none; +} + +.home-social-links a:hover { + text-decoration: underline; +} + +.post-page { + flex: 1; + width: min(65ch, 100%); + margin: 0 auto; + padding: 2.5rem 1rem; + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: stretch; + text-align: left; +} + +.post-page > * { + width: 100%; +} + +.post-page h1, +.post-page time { + text-align: center; +} + +.post-page img, +.post-page video, +.post-page iframe, +.post-page table, +.post-page pre { + max-width: 100%; +} + +.post-page pre { + overflow-x: auto; +} + +.post-page p, +.post-page li { + overflow-wrap: anywhere; +} + +.list-page { + width: min(65ch, 100%); + margin: 0 auto; + padding: 2.5rem 1rem; + display: flex; + flex-direction: column; + gap: 2rem; +} + +.page-title { + text-align: center; + margin: 0 0 2rem 0; +} + +.post-list { + display: flex; + flex-direction: column; + gap: 3rem; +} + +.post-list-item { + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.post-list-meta time { + font-size: 0.9rem; + opacity: 0.7; + letter-spacing: 0.05em; +} + +.post-list-title { + margin: 0; + font-size: 1.5rem; +} + +.post-list-title a { + text-decoration: none; +} + +.post-list-title a:hover { + text-decoration: underline; +} + +.post-list-summary { + margin: 0; + opacity: 0.8; + line-height: 1.6; +} + +@font-face { + font-family: "JetBrains Mono Regular"; + src: url("/fonts/JetBrainsMono-Regular.woff2"); +} + +@font-face { + font-family: "Pencil Child"; + src: url("/fonts/Pencil Child.ttf"); +} diff --git a/themes/JustZvan/assets/js/main.js b/themes/JustZvan/assets/js/main.js new file mode 100644 index 0000000..e2aac52 --- /dev/null +++ b/themes/JustZvan/assets/js/main.js @@ -0,0 +1 @@ +console.log('This site was generated by Hugo.'); diff --git a/themes/JustZvan/hugo.toml b/themes/JustZvan/hugo.toml new file mode 100644 index 0000000..4015a68 --- /dev/null +++ b/themes/JustZvan/hugo.toml @@ -0,0 +1,22 @@ +baseURL = 'https://example.org/' +languageCode = 'en-US' +title = 'My New Hugo Site' + +[menus] + [[menus.main]] + name = 'Home' + pageRef = '/' + weight = 10 + + [[menus.main]] + name = 'Posts' + pageRef = '/posts' + weight = 20 + +[taxonomies] + category = 'categories' + +[module] + [module.hugoVersion] + extended = false + min = '0.146.0' diff --git a/themes/JustZvan/layouts/_partials/footer.html b/themes/JustZvan/layouts/_partials/footer.html new file mode 100644 index 0000000..53920d0 --- /dev/null +++ b/themes/JustZvan/layouts/_partials/footer.html @@ -0,0 +1 @@ +<p>Copyright JustZvan {{ now.Year }}. All blog posts on this website are licensed under the <a href="/jzscl/">JZSCL</a>.</p> diff --git a/themes/JustZvan/layouts/_partials/head.html b/themes/JustZvan/layouts/_partials/head.html new file mode 100644 index 0000000..02c2240 --- /dev/null +++ b/themes/JustZvan/layouts/_partials/head.html @@ -0,0 +1,5 @@ +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width"> +<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title> +{{ partialCached "head/css.html" . }} +{{ partialCached "head/js.html" . }} diff --git a/themes/JustZvan/layouts/_partials/head/css.html b/themes/JustZvan/layouts/_partials/head/css.html new file mode 100644 index 0000000..d76d23a --- /dev/null +++ b/themes/JustZvan/layouts/_partials/head/css.html @@ -0,0 +1,9 @@ +{{- with resources.Get "css/main.css" }} + {{- if hugo.IsDevelopment }} + <link rel="stylesheet" href="{{ .RelPermalink }}"> + {{- else }} + {{- with . | minify | fingerprint }} + <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> + {{- end }} + {{- end }} +{{- end }} diff --git a/themes/JustZvan/layouts/_partials/head/js.html b/themes/JustZvan/layouts/_partials/head/js.html new file mode 100644 index 0000000..16ffbed --- /dev/null +++ b/themes/JustZvan/layouts/_partials/head/js.html @@ -0,0 +1,16 @@ +{{- with resources.Get "js/main.js" }} + {{- $opts := dict + "minify" (not hugo.IsDevelopment) + "sourceMap" (cond hugo.IsDevelopment "external" "") + "targetPath" "js/main.js" + }} + {{- with . | js.Build $opts }} + {{- if hugo.IsDevelopment }} + <script src="{{ .RelPermalink }}"></script> + {{- else }} + {{- with . | fingerprint }} + <script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script> + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/themes/JustZvan/layouts/_partials/header.html b/themes/JustZvan/layouts/_partials/header.html new file mode 100644 index 0000000..8995308 --- /dev/null +++ b/themes/JustZvan/layouts/_partials/header.html @@ -0,0 +1 @@ +{{ partial "menu.html" (dict "menuID" "main" "page" .) }} diff --git a/themes/JustZvan/layouts/_partials/menu.html b/themes/JustZvan/layouts/_partials/menu.html new file mode 100644 index 0000000..14245b5 --- /dev/null +++ b/themes/JustZvan/layouts/_partials/menu.html @@ -0,0 +1,51 @@ +{{- /* +Renders a menu for the given menu ID. + +@context {page} page The current page. +@context {string} menuID The menu ID. + +@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }} +*/}} + +{{- $page := .page }} +{{- $menuID := .menuID }} + +{{- with index site.Menus $menuID }} + <nav> + <ul> + {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} + </ul> + </nav> +{{- end }} + +{{- define "_partials/inline/menu/walk.html" }} + {{- $page := .page }} + {{- range .menuEntries }} + {{- $attrs := dict "href" .URL }} + {{- if $page.IsMenuCurrent .Menu . }} + {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} + {{- else if $page.HasMenuCurrent .Menu .}} + {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} + {{- end }} + {{- $name := .Name }} + {{- with .Identifier }} + {{- with T . }} + {{- $name = . }} + {{- end }} + {{- end }} + <li> + <a + {{- range $k, $v := $attrs }} + {{- with $v }} + {{- printf " %s=%q" $k $v | safeHTMLAttr }} + {{- end }} + {{- end -}} + >{{ $name }}</a> + {{- with .Children }} + <ul> + {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} + </ul> + {{- end }} + </li> + {{- end }} +{{- end }} diff --git a/themes/JustZvan/layouts/_partials/terms.html b/themes/JustZvan/layouts/_partials/terms.html new file mode 100644 index 0000000..8a6ebec --- /dev/null +++ b/themes/JustZvan/layouts/_partials/terms.html @@ -0,0 +1,23 @@ +{{- /* +For a given taxonomy, renders a list of terms assigned to the page. + +@context {page} page The current page. +@context {string} taxonomy The taxonomy. + +@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +*/}} + +{{- $page := .page }} +{{- $taxonomy := .taxonomy }} + +{{- with $page.GetTerms $taxonomy }} + {{- $label := (index . 0).Parent.LinkTitle }} + <div> + <div>{{ $label }}:</div> + <ul> + {{- range . }} + <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li> + {{- end }} + </ul> + </div> +{{- end }} diff --git a/themes/JustZvan/layouts/baseof.html b/themes/JustZvan/layouts/baseof.html new file mode 100644 index 0000000..36ca140 --- /dev/null +++ b/themes/JustZvan/layouts/baseof.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html lang="{{ site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}"> +<head> + {{ partial "head.html" . }} +</head> +<body> + {{ if not .IsHome }} + <header> + {{ partial "header.html" . }} + </header> + {{ end }} + <main> + {{ block "main" . }}{{ end }} + </main> + {{ if not .IsHome }} + <footer> + {{ partial "footer.html" . }} + </footer> + {{ end }} +</body> +</html> diff --git a/themes/JustZvan/layouts/home.html b/themes/JustZvan/layouts/home.html new file mode 100644 index 0000000..9897f4a --- /dev/null +++ b/themes/JustZvan/layouts/home.html @@ -0,0 +1,17 @@ +{{ define "main" }} + <section class="home-hero"> + <h1 class="sitename">{{ site.Title }}</h1> + {{ with .Content }} + <div class="home-about">{{ . }}</div> + {{ end }} + {{ partial "menu.html" (dict "menuID" "main" "page" .) }} + {{ with .Params.socials }} + <div class="home-social-links" aria-label="Social links"> + {{ range . }} + <a href="{{ .url }}" rel="me noopener noreferrer" target="_blank">{{ .name }}</a> + {{ end }} + </div> + {{ end }} + </section> + <footer class="home-footer">This site doesnt store any information. Privacy is a human right. Go donate to the EFF, Signal and the Matrix Foundation.</footer> +{{ end }} diff --git a/themes/JustZvan/layouts/page.html b/themes/JustZvan/layouts/page.html new file mode 100644 index 0000000..0c74e02 --- /dev/null +++ b/themes/JustZvan/layouts/page.html @@ -0,0 +1,18 @@ +{{ define "main" }} +<div class="post-page"> + <div class="page-header"> + <h1>{{ .Title }}</h1> + {{ if .Date }} + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + <time datetime="{{ $dateMachine }}" class="page-date">{{ $dateHuman }}</time> + {{ end }} + </div> + + <div class="page-content"> + {{ .Content }} + </div> + + {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +</div> +{{ end }} diff --git a/themes/JustZvan/layouts/posts/single.html b/themes/JustZvan/layouts/posts/single.html new file mode 100644 index 0000000..2ead5ce --- /dev/null +++ b/themes/JustZvan/layouts/posts/single.html @@ -0,0 +1,11 @@ +{{ define "main" }} + <article class="post-page"> + <h1>{{ .Title }}</h1> + + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> + + {{ .Content }} + </article> +{{ end }}
\ No newline at end of file diff --git a/themes/JustZvan/layouts/section.html b/themes/JustZvan/layouts/section.html new file mode 100644 index 0000000..1712416 --- /dev/null +++ b/themes/JustZvan/layouts/section.html @@ -0,0 +1,26 @@ +{{ define "main" }} + <div class="list-page"> + <h1 class="page-title">{{ .Title }}</h1> + {{ with .Content }} + <div class="page-content">{{ . }}</div> + {{ end }} + + <div class="post-list"> + {{ range .Pages }} + <article class="post-list-item"> + {{ if .Date }} + <div class="post-list-meta"> + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format "2006-01-02" }} + <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> + </div> + {{ end }} + <h2 class="post-list-title"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> + {{ with .Params.subtitle }} + <div class="post-list-summary">{{ . }}</div> + {{ end }} + </article> + {{ end }} + </div> + </div> +{{ end }} diff --git a/themes/JustZvan/layouts/taxonomy.html b/themes/JustZvan/layouts/taxonomy.html new file mode 100644 index 0000000..c2e7875 --- /dev/null +++ b/themes/JustZvan/layouts/taxonomy.html @@ -0,0 +1,7 @@ +{{ define "main" }} + <h1>{{ .Title }}</h1> + {{ .Content }} + {{ range .Pages }} + <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> + {{ end }} +{{ end }} diff --git a/themes/JustZvan/layouts/term.html b/themes/JustZvan/layouts/term.html new file mode 100644 index 0000000..1712416 --- /dev/null +++ b/themes/JustZvan/layouts/term.html @@ -0,0 +1,26 @@ +{{ define "main" }} + <div class="list-page"> + <h1 class="page-title">{{ .Title }}</h1> + {{ with .Content }} + <div class="page-content">{{ . }}</div> + {{ end }} + + <div class="post-list"> + {{ range .Pages }} + <article class="post-list-item"> + {{ if .Date }} + <div class="post-list-meta"> + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format "2006-01-02" }} + <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> + </div> + {{ end }} + <h2 class="post-list-title"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> + {{ with .Params.subtitle }} + <div class="post-list-summary">{{ . }}</div> + {{ end }} + </article> + {{ end }} + </div> + </div> +{{ end }} diff --git a/themes/JustZvan/static/favicon.ico b/themes/JustZvan/static/favicon.ico Binary files differnew file mode 100644 index 0000000..67f8b77 --- /dev/null +++ b/themes/JustZvan/static/favicon.ico diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-Bold.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-Bold.woff2 Binary files differnew file mode 100644 index 0000000..4917f43 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-Bold.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-BoldItalic.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-BoldItalic.woff2 Binary files differnew file mode 100644 index 0000000..536d3f7 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-BoldItalic.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-ExtraBold.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-ExtraBold.woff2 Binary files differnew file mode 100644 index 0000000..8f88c54 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-ExtraBold.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-ExtraBoldItalic.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-ExtraBoldItalic.woff2 Binary files differnew file mode 100644 index 0000000..d1478ba --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-ExtraBoldItalic.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-ExtraLight.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-ExtraLight.woff2 Binary files differnew file mode 100644 index 0000000..b97239f --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-ExtraLight.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-ExtraLightItalic.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-ExtraLightItalic.woff2 Binary files differnew file mode 100644 index 0000000..be01aac --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-ExtraLightItalic.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-Italic.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-Italic.woff2 Binary files differnew file mode 100644 index 0000000..d60c270 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-Italic.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-Light.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-Light.woff2 Binary files differnew file mode 100644 index 0000000..6538498 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-Light.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-LightItalic.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-LightItalic.woff2 Binary files differnew file mode 100644 index 0000000..66ca3d2 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-LightItalic.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-Medium.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-Medium.woff2 Binary files differnew file mode 100644 index 0000000..669d04c --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-Medium.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-MediumItalic.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-MediumItalic.woff2 Binary files differnew file mode 100644 index 0000000..80cfd15 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-MediumItalic.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-Regular.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-Regular.woff2 Binary files differnew file mode 100644 index 0000000..40da427 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-Regular.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-SemiBold.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-SemiBold.woff2 Binary files differnew file mode 100644 index 0000000..5ead7b0 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-SemiBold.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-SemiBoldItalic.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-SemiBoldItalic.woff2 Binary files differnew file mode 100644 index 0000000..c5dd294 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-SemiBoldItalic.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-Thin.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-Thin.woff2 Binary files differnew file mode 100644 index 0000000..17270e4 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-Thin.woff2 diff --git a/themes/JustZvan/static/fonts/JetBrainsMono-ThinItalic.woff2 b/themes/JustZvan/static/fonts/JetBrainsMono-ThinItalic.woff2 Binary files differnew file mode 100644 index 0000000..a643215 --- /dev/null +++ b/themes/JustZvan/static/fonts/JetBrainsMono-ThinItalic.woff2 diff --git a/themes/JustZvan/static/fonts/Pencil Child.ttf b/themes/JustZvan/static/fonts/Pencil Child.ttf Binary files differnew file mode 100644 index 0000000..7d88a2d --- /dev/null +++ b/themes/JustZvan/static/fonts/Pencil Child.ttf |