first draft of theme

This commit is contained in:
wires 2025-03-06 23:30:44 -05:00
parent d79fa6fa8c
commit 2b4ca1a88e
Signed by: wires
SSH key fingerprint: SHA256:9GtP+M3O2IivPDlw1UY872UPUuJH2gI0yG6ExBxaaiM
14 changed files with 327 additions and 6 deletions

5
archetypes/default.md Normal file
View file

@ -0,0 +1,5 @@
+++
title = {{ replace .File.ContentBaseName "-" " " | title }}
date = {{ .Date }}
draft = true
+++

87
assets/style.css Normal file
View file

@ -0,0 +1,87 @@
.skip {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
.skip:focus {
position: static;
width: auto;
height: auto;
}
body {
max-width: 45rem;
padding: 0 2rem;
margin: 2rem auto 0;
line-height: 1.6;
background: #11111b;
color: white;
}
h1, h2, h3 {
margin-bottom: 0.25em;
line-height: 1.3;
}
p {
margin-top: 0;
}
p + p {
text-indent: 2em;
}
ul {
margin-top: 0;
}
#main-nav {
font-size: 125%;
}
#main-nav ul {
padding: 0;
margin: 0 0 1em;
}
#main-nav li {
display: inline-block;
}
#main-nav li::before {
content: '/ ';
}
#main-nav li:first-child::before {
content: '';
}
#site-title {
font-weight: bold;
color: inherit;
text-decoration: none;
}
#site-title:hover {
text-decoration: underline;
}
footer {
margin: 2em 0 0;
}
header h1 {
margin: 0;
}
header {
margin-bottom: 1em;
}
a, a:visited {
color: #8ef;
}

110
assets/syntax.css Normal file
View file

@ -0,0 +1,110 @@
:root {
--chroma-bg: #111;
--comment: #9e9e9e;
--cyan: #8be9fd;
--green: #50fa7b;
--orange: #ffb86c;
--pink: #f5a;
--purple: #bd93f9;
--red: #f55;
--yellow: #f1fa8c;
}
/* @media (prefers-color-scheme: light) {
:root {
--chroma-bg: #eee;
--comment: #666;
--cyan: #04a5e5;
--green: #40a02b;
--orange: #fe640b;
--pink: #ea76cb;
--purple: #8839ef;
--red: #d20f39;
--yellow: #df8e1d;
}
} */
/* Background */ .bg,
/* PreWrapper */ .chroma { background-color:var(--chroma-bg); }
/* Other */ .chroma .x { }
/* Error */ .chroma .err { }
/* CodeLine */ .chroma .cl { }
/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit }
/* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; }
/* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; }
/* LineHighlight */ .chroma .hl { background-color:#3d3f4a }
/* LineNumbersTable */ .chroma .lnt,
/* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:var(--comment) }
/* Line */ .chroma .line { display:flex; }
/* Keyword */ .chroma .k,
/* KeywordConstant */ .chroma .kc,
/* KeywordNamespace */ .chroma .kn,
/* KeywordPseudo */ .chroma .kp,
/* KeywordReserved */ .chroma .kr { color:var(--pink) }
/* KeywordType */ .chroma .kt { color:var(--cyan) }
/* KeywordDeclaration */ .chroma .kd { color:var(--cyan);font-style:italic }
/* Name */ .chroma .n { }
/* NameBuiltinPseudo */ .chroma .bp { }
/* NameConstant */ .chroma .no { }
/* NameDecorator */ .chroma .nd { }
/* NameEntity */ .chroma .ni { }
/* NameException */ .chroma .ne { }
/* NameAttribute */ .chroma .na,
/* NameClass */ .chroma .nc,
/* NameFunctionMagic */ .chroma .fm,
/* NameFunction */ .chroma .nf { color:var(--green) }
/* NameNamespace */ .chroma .nn { }
/* NameOther */ .chroma .nx { }
/* NameProperty */ .chroma .py { }
/* NameTag */ .chroma .nt { color:var(--pink) }
/* NameBuiltin */ .chroma .nb,
/* NameLabel */ .chroma .nl,
/* NameVariable */ .chroma .nv,
/* NameVariableClass */ .chroma .vc,
/* NameVariableGlobal */ .chroma .vg,
/* NameVariableInstance */ .chroma .vi { color:var(--cyan);font-style:italic }
/* NameVariableMagic */ .chroma .vm { }
/* Literal */ .chroma .l { }
/* LiteralDate */ .chroma .ld { }
/* LiteralString */ .chroma .s,
/* LiteralStringAffix */ .chroma .sa,
/* LiteralStringBacktick */ .chroma .sb,
/* LiteralStringChar */ .chroma .sc,
/* LiteralStringDelimiter */ .chroma .dl,
/* LiteralStringDoc */ .chroma .sd,
/* LiteralStringDouble */ .chroma .s2,
/* LiteralStringEscape */ .chroma .se,
/* LiteralStringHeredoc */ .chroma .sh,
/* LiteralStringInterpol */ .chroma .si,
/* LiteralStringOther */ .chroma .sx,
/* LiteralStringRegex */ .chroma .sr,
/* LiteralStringSingle */ .chroma .s1,
/* LiteralStringSymbol */ .chroma .ss { color:var(--yellow) }
/* LiteralNumber */ .chroma .m,
/* LiteralNumberBin */ .chroma .mb,
/* LiteralNumberFloat */ .chroma .mf,
/* LiteralNumberHex */ .chroma .mh,
/* LiteralNumberInteger */ .chroma .mi,
/* LiteralNumberIntegerLong */ .chroma .il,
/* LiteralNumberOct */ .chroma .mo { color:var(--purple) }
/* Operator */ .chroma .o,
/* OperatorWord */ .chroma .ow { color:var(--pink) }
/* Punctuation */ .chroma .p { }
/* Comment */ .chroma .c,
/* CommentHashbang */ .chroma .ch,
/* CommentMultiline */ .chroma .cm,
/* CommentSingle */ .chroma .c1,
/* CommentSpecial */ .chroma .cs { color:var(--comment) }
/* CommentPreproc */ .chroma .cp,
/* CommentPreprocFile */ .chroma .cpf { color:var(--pink) }
/* Generic */ .chroma .g { }
/* GenericDeleted */ .chroma .gd { color:var(--red) }
/* GenericEmph */ .chroma .ge { text-decoration:underline }
/* GenericError */ .chroma .gr { }
/* GenericHeading */ .chroma .gh { font-weight:bold }
/* GenericInserted */ .chroma .gi { color:var(--green);font-weight:bold }
/* GenericOutput */ .chroma .go { color:var(--comment) }
/* GenericPrompt */ .chroma .gp { }
/* GenericStrong */ .chroma .gs { }
/* GenericSubheading */ .chroma .gu { font-weight:bold }
/* GenericTraceback */ .chroma .gt { }
/* GenericUnderline */ .chroma .gl { text-decoration:underline }
/* TextWhitespace */ .chroma .w { }

8
content/_index.md Normal file
View file

@ -0,0 +1,8 @@
I'm a computer science graduate with an affinity for systems programming and
functional languages. I think C, Rust and Zig all have their merits and am
comfortable working with all 3. When I don't need to work at such a low level,
I like to work with Elixir and Erlang.
I'm passionate about building performant, fault-tolerant and scalable systems and
making the web a more free and decentralized place. All my projects can be found
on [my forgejo instance](https://git.wires.systems)

View file

@ -1,9 +1,13 @@
baseURL = 'https://wires.systems' baseURL = 'https://wires.systems'
languageCode = 'en-us' languageCode = 'en-us'
title = "wires" title = "~wires"
uglyurls = true uglyurls = true
enableGitInfo = true enableGitInfo = true
disableKinds = ['taxonomy', 'term', 'section'] disableKinds = ['section', 'taxonomy']
summaryLength = 10
[taxonomies]
tag = 'tags'
[markup] [markup]
highlight.noClasses = false highlight.noClasses = false
@ -13,11 +17,10 @@ disableKinds = ['taxonomy', 'term', 'section']
[outputFormats.rss] [outputFormats.rss]
baseName = 'feed' baseName = 'feed'
[params] [[menu.main]]
description = "wires within wires, systems within systems" name = "rss"
url = "/feed.xml"
[[menu.main]] [[menu.main]]
name = "git" name = "git"
url = "https://git.wires.systems/wires" url = "https://git.wires.systems/wires"
[menu.main.params]
rel = "me"

View file

@ -0,0 +1 @@
<pre class="chroma"><code class="language-{{ .Type }}" data-lang="{{ .Type }}">{{ (transform.HighlightCodeBlock .).Inner }}</code></pre>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.LanguageCode }}">
<head>
{{ partial "head.html" . }}
<!-- this is here to make sure that if we can't load CSS the icons don't totally fuck up layout -->
<style>.icon svg { width: 1.25em; height: 1.25em; }</style>
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
</head>
<body>
<a href="#main" class="skip">Skip to content</a>
<nav id="main-nav">
<ul>
<li><a href="{{.Site.BaseURL}}" id="site-title">{{.Site.Title}}</a></li>
{{ with .Site.Menus.main }}
{{ range . }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
{{ end }}
</ul>
</nav>
<main id="main">
{{ block "main" . }}{{ end }}
</main>
{{ partial "footer.html" . }}
</body>
</html>

View file

@ -0,0 +1,10 @@
{{ define "main" }}
<h2>{{ .Title }}</h2>
<ul>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}

View file

@ -0,0 +1,16 @@
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
<time datetime="{{ .Lastmod }}">{{ .Lastmod.Format "January 2, 2006" }}</time>
</header>
{{ if .Params.toc }}
<aside id="toc">
<a class="skip" href="#post">Skip table of contents</a>
<h2 id="toc-title">Contents</h2>
{{ .TableOfContents }}
</aside>
<a id="post"></a>
{{ end }}
{{ .Content }}
{{ partial "tags.html" . }}
{{ end }}

14
layouts/index.html Normal file
View file

@ -0,0 +1,14 @@
{{ define "main" }}
{{ .Content }}
{{ with .Site.RegularPages }}
<h2>Posts</h2>
<ul>
{{ range . }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ partial "tags.html" . }}
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}

View file

@ -0,0 +1,5 @@
<footer>
All content is openly licensed via <a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="license noopener noreferrer">CC BY-SA 4.0</a>
<br>
Made with <a href="https://gohugo.io">Hugo</a>
</footer>

View file

@ -0,0 +1,28 @@
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ with (or .Description .Site.Params.description) }}
<meta name="description" content="{{ . }}"/>
{{ end }}
{{ with .Keywords }}<meta name="keywords" content="{{ delimit . ", " }}"/>{{ end }}
<link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"/>
<link rel="canonical" href="{{ .Permalink }}"/>
{{- with resources.Get "style.css" }}
{{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
{{- end }}
{{- end }}
{{- with resources.Get "syntax.css" }}
{{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
{{- end }}
{{- end }}
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>

View file

View file

@ -0,0 +1,5 @@
{{ with .GetTerms "tags" }}
<br>
tags:
{{ range $i, $e := . }}{{- if $i -}}, {{ end -}}{{ with $e }}<a class="tag" href="{{.Permalink}}">{{lower .Title}}</a>{{end}}{{ end }}
{{ end }}