new-web

No description
git clone git://niliara.net/new-web
Log | Files | Refs

commit 4f14686c0d7ba8e4ab636347d56dbaf22fb6277b
Author: niljimeno <niliara@proton.me>
Date:   Fri, 18 Sep 2026 17:08:01 +0200

init

Diffstat:
A.gitignore | 1+
A.hugo_build.lock | 0
Acontent/_index.md | 10++++++++++
Acontent/about.md | 9+++++++++
Acontent/software.md | 3+++
Ahugo.toml | 9+++++++++
Athemes/server/archetypes/default.md | 3+++
Athemes/server/assets/css/main.css | 138+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athemes/server/hugo.toml | 24++++++++++++++++++++++++
Athemes/server/layouts/_partials/footer.html | 5+++++
Athemes/server/layouts/_partials/head.html | 4++++
Athemes/server/layouts/_partials/head/css.html | 15+++++++++++++++
Athemes/server/layouts/_partials/header.html | 15+++++++++++++++
Athemes/server/layouts/_partials/menu.html | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athemes/server/layouts/_partials/terms.html | 23+++++++++++++++++++++++
Athemes/server/layouts/baseof.html | 13+++++++++++++
Athemes/server/layouts/home.html | 11+++++++++++
Athemes/server/layouts/page.html | 13+++++++++++++
Athemes/server/layouts/section.html | 10++++++++++
Athemes/server/layouts/taxonomy.html | 7+++++++
Athemes/server/layouts/term.html | 7+++++++
Athemes/server/static/favicon.ico | 0
22 files changed, 380 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1 @@ +public/ diff --git a/.hugo_build.lock b/.hugo_build.lock diff --git a/content/_index.md b/content/_index.md @@ -0,0 +1,10 @@ ++++ +title = '' ++++ + +server page for niliara.net + +```fennel +(defn main [] + (print "main")) +``` diff --git a/content/about.md b/content/about.md @@ -0,0 +1,9 @@ ++++ +title = 'about' ++++ + +hello + +### hello + +hello diff --git a/content/software.md b/content/software.md @@ -0,0 +1,3 @@ ++++ +title = 'software' ++++ diff --git a/hugo.toml b/hugo.toml @@ -0,0 +1,9 @@ +baseURL = 'https://niliara.net/' +locale = 'en-us' +title = 'nnet' + +theme = 'server' + +[markup] + [markup.highlight] + style = 'swapoff' diff --git a/themes/server/archetypes/default.md b/themes/server/archetypes/default.md @@ -0,0 +1,3 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " }}' ++++ diff --git a/themes/server/assets/css/main.css b/themes/server/assets/css/main.css @@ -0,0 +1,138 @@ +:root { + --bg: #040a02; + --fg: #aad0c1; + --highlight: #ccf0e9; +} + +:root, body { + min-height: 100%; + width: 100%; + + margin: 0; + padding: 0; + + background-color: var(--bg); +} + +body { + font-size: calc(8px + 1vmin); + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + line-height: 1.5; + + width: 90%; + max-width: 1000px; + margin: 0 auto; + + color: var(--fg); +} + +main { + padding: 2em; +} + +@media (max-width: 600px) { + body { + font-size: calc(12px + 1vmin); + } + + main { + padding: 1em; + } +} + +header { + margin-bottom: 3em; +} + +nav { + display: flex; + gap: 1em; +} + +h1, h2, h3, h4, a, pre { + font-size: 1em; + color: var(--highlight); +} + +a { + color: inherit; + padding-top: 0.14em; + font-weight: bold; +} + +a:hover { + text-decoration: none; + color: var(--bg); + background-color: var(--fg); +} + +nav a { +} + +button { +} + + +.title { + font-size: 1.5em; + font-color: var(--highlight); + display: inline; + padding: 0.2em; + + color: var(--bg); + background-color: var(--highlight); + + position: relative; + margin-right: 100px; +} + +.title a { + text-decoration: none !important; + padding: none !important; + color: inherit !important; + background-color: transparent !important; +} + +.title::after { + content: ""; + position: absolute; + left: 100%; + top: 0; + height: 100%; + width: 100px; + + background: repeating-linear-gradient( + to right, + var(--highlight) 0, + var(--highlight) 1px, + transparent 1px, + transparent 8px + ); +} + + +ul { + list-style-type: none; + padding-left: 1.5em; + margin: 0; +} + +ul li:before { + content: ""; + border-color: var(--fg); + border-style: solid; + border-width: 0.35em 0 0.35em 0.45em; + display: block; + + height: 0; + width: 0; + left: -1em; + top: 0.9em; + position: relative; +} + +code { + background-color: var(--bg); + display: block; + margin: 2em 0; +} diff --git a/themes/server/hugo.toml b/themes/server/hugo.toml @@ -0,0 +1,24 @@ +baseURL = 'https://niliara.net/' +locale = 'en-US' +title = 'My New Hugo Project' + +[menus] + [[menus.main]] + name = 'Home' + pageRef = '/' + weight = 10 + + [[menus.main]] + name = 'Posts' + pageRef = '/posts' + weight = 20 + + [[menus.main]] + name = 'Tags' + pageRef = '/tags' + weight = 30 + +[module] + [module.hugoVersion] + extended = false + min = '0.146.0' diff --git a/themes/server/layouts/_partials/footer.html b/themes/server/layouts/_partials/footer.html @@ -0,0 +1,5 @@ +<footer> +<!-- +<p>Copyright {{ now.Year }}. All rights reserved.</p> +--> +</footer> diff --git a/themes/server/layouts/_partials/head.html b/themes/server/layouts/_partials/head.html @@ -0,0 +1,4 @@ +<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" . }} diff --git a/themes/server/layouts/_partials/head/css.html b/themes/server/layouts/_partials/head/css.html @@ -0,0 +1,15 @@ +{{- with resources.Get "css/main.css" }} + {{- $opts := dict + "minify" (cond hugo.IsDevelopment false true) + "sourceMap" (cond hugo.IsDevelopment "linked" "none") + }} + {{- with . | css.Build $opts }} + {{- if hugo.IsDevelopment }} + <link rel="stylesheet" href="{{ .RelPermalink }}"> + {{- else }} + {{- with . | fingerprint }} + <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/themes/server/layouts/_partials/header.html b/themes/server/layouts/_partials/header.html @@ -0,0 +1,15 @@ +<header> + <div style="display: flex; align-items: center; gap: 1em;"> + <p class="title"><a href="/">nnet</a></p> + <span> + {{ if .IsHome }} + niliara network + {{ else }} + {{ .RelPermalink }} + {{ end }} + </span> + </div> + + {{ partial "menu.html" (dict "menuID" "main" "page" .) }} +</header> + diff --git a/themes/server/layouts/_partials/menu.html b/themes/server/layouts/_partials/menu.html @@ -0,0 +1,60 @@ +<nav> + <a href="/">home</a> + {{ range where site.RegularPages "Section" "" }} + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + {{ end }} +</nav> + + +{{- /* +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/server/layouts/_partials/terms.html b/themes/server/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/server/layouts/baseof.html b/themes/server/layouts/baseof.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html lang="{{ site.Language.Locale }}" dir="{{ or site.Language.Direction `ltr` }}"> +<head> + {{ partial "head.html" . }} +</head> +<body> + <main> + {{ partial "header.html" . }} + {{ block "main" . }}{{ end }} + {{ partial "footer.html" . }} + </main> +</body> +</html> diff --git a/themes/server/layouts/home.html b/themes/server/layouts/home.html @@ -0,0 +1,11 @@ +{{ define "main" }} + {{ .Content }} + {{/* + {{ range site.RegularPages }} + <section> + <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> + {{ .Summary }} + </section> + {{ end }} + */}} +{{ end }} diff --git a/themes/server/layouts/page.html b/themes/server/layouts/page.html @@ -0,0 +1,13 @@ +{{ define "main" }} + {{/* + <h2>{{ .Title }}</h2> + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> + */}} + + {{ .Content }} + {{/* + {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} + */}} +{{ end }} diff --git a/themes/server/layouts/section.html b/themes/server/layouts/section.html @@ -0,0 +1,10 @@ +{{ define "main" }} + <h1>{{ .Title }}</h1> + {{ .Content }} + {{ range .Pages }} + <section> + <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> + {{ .Summary }} + </section> + {{ end }} +{{ end }} diff --git a/themes/server/layouts/taxonomy.html b/themes/server/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/server/layouts/term.html b/themes/server/layouts/term.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/server/static/favicon.ico b/themes/server/static/favicon.ico Binary files differ.