Look: Terminal theme (panr/hugo-theme-terminal v4.2.6), adapted to the museum

Theme vendored unmodified in themes/terminal; base, head, header, footer and post templates
rewritten in its markup; museum components restyled in assets/css/museum.css. Embedded forum
threads follow the same colours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
2026-10-13 19:03:12 +02:00
co-authored by Claude Opus 5.5
parent b1301dcafb
commit 7d3b1bec89
62 changed files with 2631 additions and 243 deletions
+1
View File
@@ -13,6 +13,7 @@ Static rebuild of old-computers.com with [Hugo](https://gohugo.io/) (0.158 or ne
| `data/forum.json`, `data/forum_pages.json` | machine → forum thread and news post → forum thread maps, written by the forum import and by `make forum-sync` | | `data/forum.json`, `data/forum_pages.json` | machine → forum thread and news post → forum thread maps, written by the forum import and by `make forum-sync` |
| `forum/` | forum extension, local test stack, install notes | | `forum/` | forum extension, local test stack, install notes |
| `content/_index.md`, `layouts/`, `assets/`, `hugo.toml`, `tools/` | written by hand | | `content/_index.md`, `layouts/`, `assets/`, `hugo.toml`, `tools/` | written by hand |
| `themes/terminal/` | the [Terminal](https://github.com/panr/hugo-theme-terminal) theme (MIT), unmodified copy of v4.2.6; adapted by the project's `layouts/` (base, head, header, footer, posts) and `assets/css/museum.css`; palette in `assets/css/terminal.css` if overridden |
| `build/`, `public/` | build output (`make build`, `hugo server`), not versioned | | `build/`, `public/` | build output (`make build`, `hugo server`), not versioned |
Content pages are Markdown with YAML front matter and can be corrected by hand, but a later Content pages are Markdown with YAML front matter and can be corrected by hand, but a later
-174
View File
@@ -1,174 +0,0 @@
:root {
--bg: #f6f3ea;
--panel: #fffdf7;
--text: #24221d;
--muted: #6b665a;
--line: #d9d2bf;
--accent: #9a3412;
--header: #2b2a26;
--header-text: #f6f3ea;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #1b1a17;
--panel: #24231f;
--text: #e8e4d8;
--muted: #a39d8d;
--line: #3b3932;
--accent: #f0a070;
--header: #111110;
--header-text: #e8e4d8;
}
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
main, .site-footer { max-width: 1000px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0.3em 0 0.6em; }
h2 { font-size: 1.2rem; margin: 1.6em 0 0.5em; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
small, .meta, .note, .crumbs { color: var(--muted); }
.crumbs { font-size: 0.9rem; margin: 0; }
.site-header {
background: var(--header);
color: var(--header-text);
display: flex;
flex-wrap: wrap;
gap: 8px 24px;
align-items: center;
padding: 10px 16px;
}
.site-header a { color: inherit; text-decoration: none; }
.brand { font-family: ui-monospace, "Courier New", monospace; font-weight: 700; letter-spacing: 1px; }
.brand span { opacity: 0.6; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-header nav a { opacity: 0.8; padding: 2px 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a.active { opacity: 1; border-color: var(--accent); }
.site-footer { color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); margin-top: 32px; }
.content { overflow-wrap: anywhere; }
.content table { max-width: 100%; }
.logo { max-height: 48px; width: auto; vertical-align: middle; margin-right: 12px; background: #fff; padding: 2px; }
.main-image { float: right; max-width: 45%; margin: 0 0 12px 16px; }
@media (max-width: 600px) { .main-image { float: none; max-width: 100%; margin: 0 0 12px; display: block; } }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.tabs a {
padding: 6px 12px;
text-decoration: none;
color: var(--text);
border: 1px solid transparent;
border-bottom: 0;
border-radius: 4px 4px 0 0;
}
.tabs a:hover { background: var(--panel); }
.tabs a.active { background: var(--panel); border-color: var(--line); font-weight: 600; margin-bottom: -1px; }
table { border-collapse: collapse; }
.specs, .list { width: 100%; clear: both; margin: 16px 0; background: var(--panel); }
.specs th, .specs td, .list th, .list td { padding: 6px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.specs th { width: 30%; font-size: 0.8rem; letter-spacing: 0.5px; color: var(--muted); }
.list { table-layout: fixed; }
.list :is(th, td):first-child { width: 45%; }
.list :is(th, td):nth-child(2) { width: 12%; }
.list :is(th, td):nth-child(4) { width: 15%; }
.list { font-size: 0.95rem; }
@media (max-width: 600px) { .list :is(th, td):nth-child(4) { display: none; } }
.list thead th { font-size: 0.8rem; letter-spacing: 0.5px; color: var(--muted); }
.content th { padding: 6px 10px; text-align: left; }
.sortable th { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable th:hover, .sortable th:focus-visible { color: var(--text, inherit); text-decoration: underline; }
.sortable th::after { content: " ↕"; opacity: 0.4; }
.sortable th[aria-sort="ascending"]::after { content: " ↑"; opacity: 1; }
.sortable th[aria-sort="descending"]::after { content: " ↓"; opacity: 1; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery figure, .thumbs a, .card, .comments li {
margin: 0;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 4px;
padding: 10px;
}
.gallery img { display: block; margin: 0 auto 8px; }
.gallery figcaption strong, .gallery figcaption em { display: block; }
.gallery figcaption div { font-size: 0.9rem; margin-top: 6px; overflow-wrap: anywhere; }
.thumbs, .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.thumbs a, .card { text-decoration: none; color: var(--text); display: block; }
.thumbs img { display: block; width: 100%; height: 120px; object-fit: cover; margin-bottom: 6px; }
.thumbs span, .card span { font-size: 0.85rem; color: var(--muted); display: block; }
.card strong { display: block; color: var(--accent); }
.browse, .letters { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; list-style: none; }
.columns { columns: 220px; padding-left: 18px; }
.links { padding-left: 18px; }
.entries dt { font-weight: 600; margin-top: 12px; }
.entries dd { margin: 2px 0 0; }
.timeline { list-style: none; padding: 0; }
.timeline li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.timeline time { min-width: 130px; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; }
.comments { list-style: none; padding: 0; }
.comments li { margin-bottom: 12px; overflow-wrap: anywhere; }
.comments .meta { margin: 0 0 6px; font-size: 0.9rem; }
.prev-next { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; }
.posts { display: grid; gap: 16px; }
.post-summary {
display: grid;
grid-template-columns: minmax(0, 280px) 1fr;
gap: 16px;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 4px;
padding: 12px;
}
.post-summary:not(:has(.post-image)) { grid-template-columns: 1fr; }
.post-summary .post-image img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; }
.post-summary h3 { margin: 0 0 2px; font-size: 1.15rem; }
.post-summary .meta { margin: 0 0 8px; font-size: 0.85rem; }
.post-summary p:last-child { margin-bottom: 0; }
.post-banner { display: block; width: 100%; max-height: 420px; object-fit: cover; margin: 0 0 16px; border-radius: 4px; }
@media (max-width: 600px) { .post-summary { grid-template-columns: 1fr; } }
.site-header .search { margin-left: auto; }
.site-header .search input {
width: 180px;
max-width: 100%;
padding: 4px 10px;
border: 1px solid transparent;
border-radius: 14px;
background: rgba(255, 255, 255, 0.12);
color: inherit;
font: inherit;
font-size: 0.9rem;
}
.site-header .search input::placeholder { color: inherit; opacity: 0.6; }
.site-header .search input:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, 0.2); }
/* Pagefind result list, in the site colours */
#search {
--pagefind-ui-primary: var(--accent);
--pagefind-ui-text: var(--text);
--pagefind-ui-background: var(--panel);
--pagefind-ui-border: var(--line);
--pagefind-ui-tag: var(--bg);
--pagefind-ui-border-width: 1px;
--pagefind-ui-border-radius: 4px;
--pagefind-ui-image-border-radius: 2px;
--pagefind-ui-font: inherit;
--pagefind-ui-scale: 0.85;
}
#search mark { background: none; color: inherit; font-weight: 700; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 24px 0 0; }
.pager a, .pager .current { padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; background: var(--panel); }
.pager .current { font-weight: 700; border-color: var(--accent); }
.forum-thread { display: block; width: 100%; min-height: 400px; border: 0; }
.comments-section { clear: both; margin-top: 32px; }
+135
View File
@@ -0,0 +1,135 @@
/* Old-Computers.com on top of the Terminal theme (themes/terminal): the museum's own components,
drawn with the theme's three colours. Change the palette in assets/css/terminal.css. */
:root {
--text: var(--foreground);
--bg: var(--background);
--panel: color-mix(in srgb, var(--foreground) 5%, transparent);
--line: color-mix(in srgb, var(--foreground) 22%, transparent);
--muted: color-mix(in srgb, var(--foreground) 65%, transparent);
}
/* layout: wider than the theme's blog column, for the listing tables */
.container.center { max-width: 1100px; }
@media (max-width: 684px) { .container { padding: 20px; } }
.page { flex: 1; width: 100%; }
.content { display: block; overflow-wrap: anywhere; }
.page > h1:first-child, .page > article > h1:first-child { margin-top: 10px; }
h2 { border-bottom: 1px dotted var(--accent); padding-bottom: 6px; margin-top: 40px; }
small, .meta, .note, .crumbs { color: var(--muted); }
.crumbs { font-size: 0.9rem; margin: 10px 0 0; }
.crumbs + h1 { margin-top: 10px; }
/* header: active section, search box */
.navigation-menu a { text-decoration: none; }
.navigation-menu a:hover { text-decoration: underline; }
.navigation-menu a.active { background: var(--accent); color: var(--background); padding: 2px 6px; }
.navigation-menu .search input { width: 16ch; padding: 2px 8px; border-color: var(--accent); }
.navigation-menu .search input::placeholder { color: var(--muted); }
.footer p { margin: 4px 0; white-space: normal; }
.footer .copyright { flex-direction: column; }
/* images: the theme frames every image heavily; keep that for post covers only */
img { height: auto; border-width: 1px; padding: 4px; border-color: var(--line); }
.post-cover { border: 8px solid var(--accent); padding: 8px; width: 100%; max-height: 420px; object-fit: cover; margin: 20px 0; }
.on-list .post-cover { max-height: 260px; }
.post-image { display: block; }
.content img { display: inline-block; vertical-align: middle; margin: 4px 0; }
.maker-logo { display: inline-block; max-height: 48px; width: auto; vertical-align: middle; margin: 0 12px 0 0; background: #fff; padding: 2px; }
.main-image { float: right; max-width: 45%; margin: 0 0 12px 16px; background: #fff; }
@media (max-width: 600px) { .main-image { float: none; max-width: 100%; margin: 0 0 12px; display: block; } }
/* machine tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 20px; border-bottom: 1px solid var(--accent); }
.tabs a { padding: 4px 10px; text-decoration: none; }
.tabs a::before { content: "["; opacity: 0.5; }
.tabs a::after { content: "]"; opacity: 0.5; }
.tabs a:hover { background: var(--panel); }
.tabs a.active { background: var(--accent); color: var(--background); font-weight: bold; }
/* tables */
table, th, td { border-width: 1px; border-color: var(--line); padding: 6px 10px; }
.content table { max-width: 100%; }
.specs, .list { width: 100%; clear: both; margin: 16px 0; background: var(--panel); }
.specs th, .specs td, .list th, .list td { text-align: left; vertical-align: top; }
.specs th { width: 30%; font-size: 0.8rem; color: var(--accent); }
.list { table-layout: fixed; font-size: 0.9rem; }
.list :is(th, td):first-child { width: 42%; }
.list :is(th, td):nth-child(2) { width: 10%; }
.list :is(th, td):nth-child(4) { width: 17%; }
@media (max-width: 600px) { .list :is(th, td):nth-child(4) { display: none; } }
.list thead th { font-size: 0.8rem; color: var(--accent); }
.sortable th { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable th:hover, .sortable th:focus-visible { text-decoration: underline; }
.sortable th::after { content: " ↕"; opacity: 0.4; }
.sortable th[aria-sort="ascending"]::after { content: " ↑"; opacity: 1; }
.sortable th[aria-sort="descending"]::after { content: " ↓"; opacity: 1; }
/* galleries, thumbnails, cards */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery figure, .thumbs a, .card, .comments li {
margin: 0;
width: auto;
background: var(--panel);
border: 1px solid var(--line);
padding: 10px;
}
.gallery img { display: block; margin: 0 auto 8px; background: #fff; }
.gallery figure figcaption { background: none; color: inherit; text-align: left; margin: 0; padding: 0; font-size: 0.9rem; }
.gallery figcaption strong { display: block; color: var(--accent); }
.gallery figcaption em { display: block; }
.gallery figcaption div { margin-top: 6px; overflow-wrap: anywhere; }
.gallery figcaption p { margin: 6px 0; }
.thumbs, .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 20px 0; }
.thumbs a, .card { text-decoration: none; color: var(--text); display: block; }
.thumbs a:hover, .card:hover { border-color: var(--accent); }
.thumbs img { display: block; width: 100%; height: 120px; object-fit: cover; margin: 0 0 6px; padding: 0; border: 0; background: #fff; }
.thumbs span, .card span { font-size: 0.85rem; color: var(--muted); display: block; }
.card strong { display: block; color: var(--accent); }
.card strong::before { content: "> "; }
/* lists */
.browse, .letters { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 20px 0; padding: 0; list-style: none; }
.letters a { text-decoration: none; }
.letters a::before { content: "["; opacity: 0.5; }
.letters a::after { content: "]"; opacity: 0.5; }
.columns { columns: 260px; margin-left: 0; padding-left: 2ch; list-style: none; }
.columns li::before, .links li::before { content: "-"; position: absolute; left: -2ch; color: var(--accent); }
.links { margin-left: 0; padding-left: 2ch; list-style: none; }
.entries dt { font-weight: bold; margin-top: 14px; color: var(--accent); }
.entries dd { margin: 2px 0 0; }
.timeline { list-style: none; margin-left: 0; padding: 0; }
.timeline li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.timeline time { min-width: 130px; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; }
.comments { list-style: none; margin-left: 0; padding: 0; }
.comments li { margin-bottom: 12px; overflow-wrap: anywhere; }
.comments .meta { margin: 0 0 6px; font-size: 0.9rem; }
.prev-next { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; }
.prev-next a { text-decoration: none; }
/* posts: the theme's own markup; pagination with page numbers */
.posts .post:first-child { padding-top: 10px; }
.post-author a { color: inherit; }
.pagination .current { color: var(--accent); font-weight: bold; }
/* Pagefind result list, in the theme colours */
#search {
--pagefind-ui-primary: var(--accent);
--pagefind-ui-text: var(--foreground);
--pagefind-ui-background: var(--background);
--pagefind-ui-border: var(--accent);
--pagefind-ui-tag: var(--panel);
--pagefind-ui-border-width: 1px;
--pagefind-ui-border-radius: 0;
--pagefind-ui-image-border-radius: 0;
--pagefind-ui-font: inherit;
--pagefind-ui-scale: 0.85;
margin-top: 20px;
}
#search mark { background: none; color: var(--accent); font-weight: bold; }
#search img { border: 0; padding: 0; margin: 0; }
#search ul, #search ol { margin: 0; }
#search button { border-width: 1px; }
.forum-thread { display: block; width: 100%; min-height: 400px; border: 1px solid var(--line); }
.comments-section { clear: both; margin-top: 40px; }
+11 -9
View File
@@ -1,13 +1,15 @@
// Embedded thread, as shown at the bottom of the museum pages: full width, on the // Embedded thread, as shown at the bottom of the museum pages: full width, in the colours and
// light panel colour of the static site (--panel in its assets/css/main.css). // type of the static site's Terminal theme (--background, --accent in its stylesheet). The
@oc-accent: #9a3412; // forum itself is set to its dark colour scheme (admin → Appearance), which gives the rest.
@oc-panel: #fffdf7; @oc-accent: #eec35e;
@oc-bg: #1a170f;
@oc-mono: "Fira Code", Monaco, Consolas, "Ubuntu Mono", monospace;
body, .App { background: @oc-panel; } body, .App { background: @oc-bg; font-family: @oc-mono; }
.Page-content { max-width: none; } .Page-content { max-width: none; }
.Post-body a, .PostUser-name a, .Button--link { color: @oc-accent; } .Post-body a, .PostUser-name a, .Button--link { color: @oc-accent; }
.Button--primary { background: @oc-accent; } .Button--primary { background: @oc-accent; color: @oc-bg; border-radius: 0; }
// The reply box follows the page while scrolling; the forum paints it in its header colour // The reply box follows the page while scrolling; the forum paints it in its header colour,
// (dark when a coloured header is configured), which reads as a black block here. // which reads as a block of another colour here.
.DiscussionPage-nav > ul { background: @oc-panel; } .DiscussionPage-nav > ul { background: @oc-bg; }
.DiscussionPage-nav .item-scrubber, .DiscussionPage-nav a { color: inherit; } .DiscussionPage-nav .item-scrubber, .DiscussionPage-nav a { color: inherit; }
+2
View File
@@ -1,6 +1,8 @@
baseURL = "/" baseURL = "/"
title = "Old-Computers.com" title = "Old-Computers.com"
locale = "en" locale = "en"
# look: the Terminal theme (themes/terminal, unmodified), adapted in layouts/ and assets/css/museum.css
theme = "terminal"
# relative URLs only: no absolute address is known at build time, so no feed or sitemap # relative URLs only: no absolute address is known at build time, so no feed or sitemap
disableKinds = ["rss", "sitemap"] disableKinds = ["rss", "sitemap"]
# pages keep working when the site is served from a sub-directory # pages keep working when the site is served from a sub-directory
+21
View File
@@ -0,0 +1,21 @@
<footer class="footer">
<div class="footer__inner">
<div class="copyright copyright--user">
{{ with .Params.source }}
<p>Recovered from the <a href="{{ .url }}"{{ partial "ext.html" .url }}>Wayback Machine capture of {{ .date }}</a>.</p>
{{ end }}
<p>Content © its original authors at Old-Computers.com. Rebuilt from the Internet Archive</p>
<p><a href="{{ site.Home.RelPermalink }}members/">Members</a> ::
<a href="{{ site.Home.RelPermalink }}about/">About</a> ::
<a href="{{ site.Home.RelPermalink }}donate/">Donate!</a> ::
<a href="{{ site.Home.RelPermalink }}faq/">FAQ</a>
</p>
<p>Theme adapted from <a href="https://github.com/panr/hugo-theme-terminal"{{ partial "ext.html" "https://github.com/panr/hugo-theme-terminal" }}>Terminal</a> by panr</p>
</div>
</div>
</footer>
{{ $menu := resources.Get "js/menu.js" | js.Build }}
{{ $code := resources.Get "js/code.js" | js.Build }}
{{ with slice $menu $code | resources.Concat "js/bundle.js" | minify | fingerprint }}
<script src="{{ .RelPermalink }}"></script>
{{ end }}
+16
View File
@@ -0,0 +1,16 @@
{{/* replaces the theme's head: one stylesheet (theme files in order, then ours), relative addresses only */}}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ site.Params.description }}{{ end }}">
{{ $css := slice }}
{{ range slice "fonts" "main" "buttons" "header" "menu" "footer" "post" "pagination" "terms" "code" "syntax" "terminal" "museum" }}
{{ $css = $css | append (resources.Get (printf "css/%s.css" .)) }}
{{ end }}
{{ with $css | resources.Concat "css/site.css" | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{ end }}
<link rel="icon" href="{{ "favicon.png" | relURL }}">
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | relURL }}">
{{ with resources.Get "js/sortTables.js" | minify | fingerprint }}
<script src="{{ .RelPermalink }}" defer></script>
{{ end }}
+33
View File
@@ -0,0 +1,33 @@
{{/* the theme's header, with the active section, the forum link and the search box */}}
{{ $current := . }}
<header class="header">
<div class="header__inner">
<div class="header__logo">
<a href="{{ site.Home.RelPermalink }}"><div class="logo">old-computers.com</div></a>
</div>
<ul class="menu menu--mobile">
<li class="menu__trigger">Menu&nbsp;▾</li>
<li>
<ul class="menu__dropdown">
{{ range site.Menus.main }}<li><a href="{{ .URL }}">{{ .Name }}</a></li>{{ end }}
{{ with site.Params.forum.url }}<li><a href="{{ . }}">Forum</a></li>{{ end }}
<li><a href="{{ "search/" | relURL }}">Search</a></li>
</ul>
</li>
</ul>
</div>
<nav class="navigation-menu">
<ul class="navigation-menu__inner menu--desktop">
{{ range site.Menus.main }}
<li><a href="{{ .URL }}"{{ if or ($current.IsMenuCurrent .Menu .) ($current.HasMenuCurrent .Menu .) (eq $current.Section .Page.Section) }} class="active" aria-current="true"{{ end }}>{{ .Name }}</a></li>
{{ end }}
{{ with site.Params.forum.url }}<li><a href="{{ . }}">Forum</a></li>{{ end }}
<li class="spacer"></li>
<li>
<form class="search" role="search" action="{{ "search/" | relURL }}" method="get">
<input type="search" name="q" placeholder="search…" aria-label="Search the site">
</form>
</li>
</ul>
</nav>
</header>
+1 -1
View File
@@ -7,7 +7,7 @@
{{ with $m.GetTerms "categories" }}{{ range first 1 . }} › <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>{{ end }}{{ end }} {{ with $m.GetTerms "categories" }}{{ range first 1 . }} › <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>{{ end }}{{ end }}
{{ with $m.Params.company }}{{ with site.GetPage . }} › <a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }}{{ end }} {{ with $m.Params.company }}{{ with site.GetPage . }} › <a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }}{{ end }}
</p> </p>
<h1>{{ with $m.Params.logo }}<img class="logo" src="{{ . }}" alt="">{{ end }}{{ $m.Title }}</h1> <h1>{{ with $m.Params.logo }}<img class="maker-logo" src="{{ . }}" alt="">{{ end }}{{ $m.Title }}</h1>
<nav class="tabs" data-pagefind-ignore> <nav class="tabs" data-pagefind-ignore>
<a href="{{ $m.RelPermalink }}"{{ if not $.tab }} class="active"{{ end }}>System info</a> <a href="{{ $m.RelPermalink }}"{{ if not $.tab }} class="active"{{ end }}>System info</a>
{{ range $m.Params.tabs }} {{ range $m.Params.tabs }}
+8 -6
View File
@@ -1,12 +1,14 @@
{{/* page links for a paginator; nothing when there is a single page */}} {{/* page links for a paginator, in the theme's markup; nothing when there is a single page */}}
{{ if gt .TotalPages 1 }} {{ if gt .TotalPages 1 }}
<nav class="pager" aria-label="Pages" data-pagefind-ignore> <nav class="pagination" aria-label="Pages" data-pagefind-ignore>
{{ if .HasPrev }}<a href="{{ .Prev.URL }}" rel="prev">← Newer</a>{{ end }} <div class="pagination__buttons">
{{ if .HasPrev }}<a href="{{ .Prev.URL }}" rel="prev" class="button inline prev">&lt; [<span class="button__text">Newer posts</span>]</a>{{ end }}
{{ $current := .PageNumber }} {{ $current := .PageNumber }}
{{ range .Pagers }} {{ range .Pagers }}
{{ if eq .PageNumber $current }}<span class="current" aria-current="page">{{ .PageNumber }}</span> {{ if eq .PageNumber $current }}<span class="current" aria-current="page">[{{ .PageNumber }}]</span>
{{ else }}<a href="{{ .URL }}">{{ .PageNumber }}</a>{{ end }} {{ else }}<a class="button inline" href="{{ .URL }}">{{ .PageNumber }}</a>{{ end }}
{{ end }} {{ end }}
{{ if .HasNext }}<a href="{{ .Next.URL }}" rel="next">Older →</a>{{ end }} {{ if .HasNext }}<a href="{{ .Next.URL }}" rel="next" class="button inline next">[<span class="button__text">Older posts</span>] &gt;</a>{{ end }}
</div>
</nav> </nav>
{{ end }} {{ end }}
+11 -9
View File
@@ -1,11 +1,13 @@
<article class="post-summary"> {{/* a post in a list, in the theme's markup */}}
{{ with partial "banner.html" (dict "page" . "width" 640) }} <article class="post on-list">
<a class="post-image" href="{{ $.RelPermalink }}"><img src="{{ . }}" alt="" loading="lazy"></a> <h2 class="post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ end }} <div class="post-meta">
<div> {{- if not .Date.IsZero }}<time class="post-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>{{ end -}}
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3> {{- with .GetTerms "author" }}<span class="post-author">{{ partial "terms.html" (dict "page" $ "taxonomy" "author") }}</span>{{ end -}}
<p class="meta">{{ if not .Date.IsZero }}<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>{{ end }}{{ with .GetTerms "author" }}{{ if not $.Date.IsZero }} · {{ end }}{{ partial "terms.html" (dict "page" $ "taxonomy" "author") }}{{ end }}</p>
<div class="summary">{{ .Summary }}</div>
{{ if .Truncated }}<p><a href="{{ .RelPermalink }}">Read more →</a></p>{{ end }}
</div> </div>
{{ with partial "banner.html" (dict "page" . "width" 1000) }}
<a class="post-image" href="{{ $.RelPermalink }}"><img class="post-cover" src="{{ . }}" alt="" loading="lazy"></a>
{{ end }}
<div class="post-content">{{ .Summary }}</div>
{{ if .Truncated }}<div><a class="read-more button inline" href="{{ .RelPermalink }}">[Read more]</a></div>{{ end }}
</article> </article>
+8 -36
View File
@@ -1,48 +1,20 @@
<!doctype html> <!DOCTYPE html>
<html lang="{{ site.Language.Locale }}"> <html lang="{{ site.Language.Locale }}">
<head> <head>
<meta charset="utf-8"> <title>{{ block "title" . }}{{ if not .IsHome }}{{ .Title }} :: {{ end }}{{ site.Title }}{{ end }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> {{ partial "head.html" . }}
<title>{{ block "title" . }}{{ if not .IsHome }}{{ .Title }} · {{ end }}{{ site.Title }}{{ end }}</title>
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ site.Params.description }}{{ end }}">
{{ with resources.Get "css/main.css" | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{ end }}
{{ with resources.Get "js/sortTables.js" | minify | fingerprint }}
<script src="{{ .RelPermalink }}" defer></script>
{{ end }}
</head> </head>
<body> <body>
<header class="site-header"> <div class="container center">
<a class="brand" href="{{ site.Home.RelPermalink }}">OLD-COMPUTERS<span>.COM</span></a> {{ partial "header.html" . }}
<nav>
{{ $current := . }}
{{ range site.Menus.main }}
<a href="{{ .URL }}"{{ if or ($current.IsMenuCurrent .Menu .) ($current.HasMenuCurrent .Menu .) (eq $current.Section .Page.Section) }} class="active"{{ end }}>{{ .Name }}</a>
{{ end }}
{{ with site.Params.forum.url }}<a href="{{ . }}">Forum</a>{{ end }}
</nav>
<form class="search" role="search" action="{{ "search/" | relURL }}" method="get">
<input type="search" name="q" placeholder="Search…" aria-label="Search the site">
</form>
</header>
{{/* search index: content pages only (not lists), filterable by section; see layouts/search.html */}} {{/* search index: content pages only (not lists), filterable by section; see layouts/search.html */}}
{{ $indexed := and .IsPage (ne .Layout "search") }} {{ $indexed := and .IsPage (ne .Layout "search") }}
{{ $section := "" }}{{ with .FirstSection }}{{ if not .IsHome }}{{ $section = .Title }}{{ end }}{{ end }} {{ $section := "" }}{{ with .FirstSection }}{{ if not .IsHome }}{{ $section = .Title }}{{ end }}{{ end }}
{{ if eq .Section "machine-tabs" }}{{ $section = "Museum" }}{{ end }} {{ if eq .Section "machine-tabs" }}{{ $section = "Museum" }}{{ end }}
<main{{ if $indexed }} data-pagefind-body{{ with $section }} data-pagefind-filter="Section:{{ . }}"{{ end }}{{ end }}> <main class="page"{{ if $indexed }} data-pagefind-body{{ with $section }} data-pagefind-filter="Section:{{ . }}"{{ end }}{{ end }}>
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}
</main> </main>
<footer class="site-footer"> {{ partial "footer.html" . }}
{{ with .Params.source }} </div>
<p>Recovered from the <a href="{{ .url }}"{{ partial "ext.html" .url }}>Wayback Machine capture of {{ .date }}</a>.</p>
{{ end }}
<p>Content © its original authors at Old-Computers.com. Rebuilt from the Internet Archive</p>
<p><a href="{{ site.Home.RelPermalink }}members/">Members</a> -
<a href="{{ site.Home.RelPermalink }}about/">About</a> -
<a href="{{ site.Home.RelPermalink }}donate/">Donate!</a> -
<a href="{{ site.Home.RelPermalink }}faq/">FAQ</a>
</p>
</footer>
</body> </body>
</html> </html>
+1 -1
View File
@@ -1,7 +1,7 @@
{{ define "main" }} {{ define "main" }}
<article> <article>
<p class="crumbs" data-pagefind-ignore><a href="{{ .Parent.RelPermalink }}">Companies</a></p> <p class="crumbs" data-pagefind-ignore><a href="{{ .Parent.RelPermalink }}">Companies</a></p>
<h1>{{ with .Params.logo }}<img class="logo" src="{{ . }}" alt="">{{ end }}{{ .Title }}</h1> <h1>{{ with .Params.logo }}<img class="maker-logo" src="{{ . }}" alt="">{{ end }}{{ .Title }}</h1>
<div class="content">{{ .Content }}</div> <div class="content">{{ .Content }}</div>
{{ with .Params.machines }} {{ with .Params.machines }}
<h2>Systems</h2> <h2>Systems</h2>
+7 -4
View File
@@ -1,10 +1,13 @@
{{ define "main" }} {{ define "main" }}
<article class="post"> <article class="post">
<p class="crumbs" data-pagefind-ignore><a href="{{ .Parent.RelPermalink }}">{{ .Parent.Title }}</a></p> <p class="crumbs" data-pagefind-ignore><a href="{{ .Parent.RelPermalink }}">{{ .Parent.Title }}</a></p>
<h1>{{ .Title }}</h1> <h1 class="post-title">{{ .Title }}</h1>
<p class="meta">{{ if not .Date.IsZero }}<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>{{ end }}{{ with .GetTerms "author" }}{{ if not $.Date.IsZero }} · {{ end }}{{ partial "terms.html" (dict "page" $ "taxonomy" "author") }}{{ end }}</p> <div class="post-meta">
{{ with partial "banner.html" (dict "page" . "width" 1000) }}<img class="post-banner" src="{{ . }}" alt="">{{ end }} {{- if not .Date.IsZero }}<time class="post-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>{{ end -}}
<div class="content">{{ .Content }}</div> {{- with .GetTerms "author" }}<span class="post-author">{{ partial "terms.html" (dict "page" $ "taxonomy" "author") }}</span>{{ end -}}
</div>
{{ with partial "banner.html" (dict "page" . "width" 1000) }}<img class="post-cover" src="{{ . }}" alt="">{{ end }}
<div class="post-content content">{{ .Content }}</div>
{{/* comments: the post's forum discussion, created by `make forum-sync` (data/forum_pages.json) */}} {{/* comments: the post's forum discussion, created by `make forum-sync` (data/forum_pages.json) */}}
{{ with and site.Params.forum.url .File (index (hugo.Data.forum_pages | default dict) .File.Path) }} {{ with and site.Params.forum.url .File (index (hugo.Data.forum_pages | default dict) .File.Path) }}
<section class="comments-section" id="comments" data-pagefind-ignore> <section class="comments-section" id="comments" data-pagefind-ignore>
+20
View File
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2024 panr
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+319
View File
@@ -0,0 +1,319 @@
# Terminal
**Demo: https://panr.github.io/hugo-theme-terminal-demo/**
**Create your own color scheme: https://panr.github.io/terminal-css/**
![Terminal](https://github.com/panr/hugo-theme-terminal/blob/master/images/terminal-theme.png?raw=true)
---
⚠️ The theme needs at least Hugo **Extended** v0.90.x.
---
- [Features](#features)
- [Built-in shortcodes](#built-in-shortcodes)
- [Code highlighting](#code-highlighting)
- [How to start](#how-to-start)
- [How to run your site](#how-to-run-your-site)
- [How to configure](#how-to-configure)
- [Post archetype](#post-archetype)
- [Add-ons](#add-ons)
- [How to edit the theme](#how-to-edit)
- [Found a bug?](#bug)
- [New cool idea or feature](#feature)
- [Support](#support)
- [License](#license)
## Features
- fully customizable color schemes generated by [**Terminal.css**](https://panr.github.io/terminal-css/).
- [**Fira Code**](https://github.com/tonsky/FiraCode) as default monospaced font. It's gorgeous!
- **really nice duotone**, custom syntax highlighting based on [**Chroma**](https://github.com/alecthomas/chroma) (fast, built-in Hugo syntax highlighter)
- fully responsive
- fully based on Hugo ecosystem (Pipes and Modules)
#### Built-in shortcodes
- **`image`** (props required: **`src`**; props optional: **`alt`**, **`position`** (**left** is default | center | right), **`style`**)
- e.g.
```go
{{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}}
```
- **`code`** (props required: **`language`**; props optional: **`title`**, **`open`**)
- e.g.
```go
{{< code language="css" title="Really cool snippet" open="true" >}}
pre {
background: #1a1a1d;
padding: 20px;
border-radius: 8px;
font-size: 1rem;
overflow: auto;
@media (--phone) {
white-space: pre-wrap;
word-wrap: break-word;
}
code {
background: none !important;
color: #ccc;
padding: 0;
font-size: inherit;
}
}
{{< /code >}}
```
#### Code highlighting
A custom syntax highlighting based on Chroma. All you need to do is to wrap you code like this:
````
```html
// your code here
```
````
You can find more here in the official Hugo [documentation](https://gohugo.io/content-management/syntax-highlighting/).
**Supported languages**: https://github.com/alecthomas/chroma?tab=readme-ov-file#supported-languages
## How to start
You can download the theme manually by going to [https://github.com/panr/hugo-theme-terminal.git](https://github.com/panr/hugo-theme-terminal.git) and pasting it to `themes/terminal` in your root directory.
You can also choose **one of the 3 possibilities** to install the theme:
1. as Hugo Module
2. as a standalone local directory
3. as a git submodule
⚠️ The theme needs at least Hugo **Extended** v0.90.x.
### Install theme as Hugo Module
```bash
# If this is the first time you're using Hugo Modules
# in your project. You have to initiate your own module before
# you fetch the theme module.
#
# hugo mod init [your website/module name]
hugo mod get github.com/panr/hugo-theme-terminal/v4
```
and in your config file add:
```toml
[module]
# this is needed when you fetch the theme as a submodule to your repo.
# replacements = "github.com/panr/hugo-theme-terminal/4 -> themes/terminal"
[[module.imports]]
path = 'github.com/panr/hugo-theme-terminal/v4'
```
Keep in mind that the theme by default won't show up in the `themes` directory. This means that you are using the theme as it was on the repository at the moment you fetched it. Your local `go.sum` file keeps all the references. Read more about Hugo Modules in the [official documentation](https://gohugo.io/hugo-modules/).
### Install theme locally
```bash
git clone https://github.com/panr/hugo-theme-terminal.git themes/terminal
```
This will clone the repository directly to the `themes/terminal` directory.
### Install theme as a submodule
```bash
git submodule add -f https://github.com/panr/hugo-theme-terminal.git themes/terminal
```
This will install the repository as a submodule in the `themes/terminal` directory.
⚠️ If you encounter any issues with:
```bash
Error: module "terminal" not found; either add it as a Hugo Module or store it in "[...your custom path]/themes".: module does not exist
```
then please try to remove `theme = "terminal"` from your config file.
## How to run your site
```bash
hugo server -t terminal
```
and go to `localhost:1313` in your browser. From now on all the changes you make will go live, so you don't need to refresh your browser every single time.
## How to configure
The theme doesn't require any advanced configuration. Just copy:
```toml
baseurl = "/"
languageCode = "en-us"
# Add it only if you keep the theme in the `themes` directory.
# Remove it if you use the theme as a remote Hugo Module.
theme = "terminal"
pagination.pagerSize = 5
# Required for Chroma and the custom syntax highlighting.
[markup.highlight]
noClasses = false
[params]
# dir name of your main content (default is `content/posts`).
# the list of set content will show up on your index page (baseurl).
contentTypeName = "posts"
# if you set this to 0, only submenu trigger will be visible
showMenuItems = 2
# show selector to switch language
showLanguageSelector = false
# set theme to full screen width
fullWidthTheme = false
# center theme with default width
centerTheme = false
# if your resource directory contains an image called `cover.(jpg|png|webp)`,
# then the file will be used as a cover automatically.
# With this option you don't have to put the `cover` param in a front-matter.
autoCover = true
# set post to show the last updated
# If you use git, you can set `enableGitInfo` to `true` and then post will automatically get the last updated
showLastUpdated = false
# Provide a string as a prefix for the last update date. By default, it looks like this: 2020-xx-xx [Updated: 2020-xx-xx] :: Author
# updatedDatePrefix = "Updated"
# whether to show a page's estimated reading time
# readingTime = false # default
# whether to show a table of contents
# can be overridden in a page's front-matter
# Toc = false # default
# set title for the table of contents
# can be overridden in a page's front-matter
# TocTitle = "Table of Contents" # default
# Set date/time format for posts
# This will impact the date/time displayed on
# index.html, the posts list page, and on posts themselves
# This value can also be configured per-post on front matter
# If you have any issues with the timezone rendering differently
# than you expected, please ensure your timezone is correctly set
# on your server.
# This value can be customized according to Hugo documentation:
# https://gohugo.io/functions/time/format/
# Default value (no changes needed):
# dateFormat = "2006-01-02"
# Example format, with date, time, and timezone abbreviation:
# dateFormat = "2006-01-02 3:04:06 PM MST"
[params.twitter]
# set Twitter handles for Twitter cards
# see https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started#card-and-content-attribution
# do not include @
creator = ""
site = ""
[languages]
[languages.en]
languageName = "English"
title = "Terminal"
[languages.en.params]
subtitle = "A simple, retro theme for Hugo"
owner = ""
keywords = ""
copyright = ""
menuMore = "Show more"
readMore = "Read more"
readOtherPosts = "Read other posts"
newerPosts = "Newer posts"
olderPosts = "Older posts"
missingContentMessage = "Page not found..."
missingBackButtonLabel = "Back to home page"
minuteReadingTime = "min read"
words = "words"
[languages.en.params.logo]
logoText = "Terminal"
logoHomeLink = "/"
[languages.en.menu]
[[languages.en.menu.main]]
identifier = "about"
name = "About"
url = "/about"
[[languages.en.menu.main]]
identifier = "showcase"
name = "Showcase"
url = "/showcase"
[module]
# In case you would like to make changes to the theme and keep it locally in you repository,
# uncomment the line below (and correct the local path if necessary).
# --
# replacements = "github.com/panr/hugo-theme-terminal/v4 -> themes/terminal"
[[module.imports]]
path = 'github.com/panr/hugo-theme-terminal/v4'
```
**NOTE:** Please keep in mind that currently `main menu` doesn't support nesting.
## Post archetype
See the default `post` file params supported by the theme — https://github.com/panr/hugo-theme-terminal/blob/master/archetypes/posts.md
## Add-ons
- **Comments** — for adding comments to your blog posts please take a look at `layouts/partials/comments.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/comments.html.
- **Extended Head** — please take a look at `layouts/partials/extended_head.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/extended_head.html
- **Extended Footer** — please take a look at `layouts/partials/extended_footer.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/extended_footer.html
## How to edit the theme <a id="how-to-edit" />
If you are using as a remote Hugo Module (you don't have the theme files in the `theme/terminal`) and you have to override only some of the styles, you can do this easily by adding `static/style.css` in your root directory and point things you want to change.
If you have the theme files in the theme directory, then you can directly edit anything in the theme, you just have to go to `themes/terminal` and modify the files. No compilation step needed.
## Found a bug? <a id="bug" />
If you spot any bugs, please use [Issue Tracker](https://github.com/panr/hugo-theme-terminal/issues) or create a new [Pull Request](https://github.com/panr/hugo-theme-terminal/pulls) to fix the issue.
## New cool idea or feature? <a id="feature" />
The theme is in constant development since 2019 and has got many cool features that helped many of you and made the theme better. But there were also many features that I wasn't sure about because I want to keep the theme as simple as possible.
So, let's say you have an idea of how to extend the theme. That's cool and you're welcome to do that, just follow these steps:
- fork the theme
- implement the feature
- write an instruction how to use the feature
- give a working example of the implementation for other users
- add info about your work to `COMMUNITY-FEATURES.md`
- make a PR with edited `COMMUNITY-FEATURES.md`
This will help keeping the theme close to its roots, and also allow anyone who wishes to improve it and match their needs, to do whatever they want.
Sounds OK? Cool, let's rock! 🤘
## Support
If you like what I'm doing and want to support my work. You can do it [here](https://ko-fi.com/pan_r). Thank you! ♥️
## License
Copyright © 2019-2025 Radek Kozieł ([@panr](https://rkoziel.com/))
The theme is released under the MIT License. Check the [original theme license](https://github.com/panr/hugo-theme-terminal/blob/master/LICENSE.md) for additional licensing information.
+2
View File
@@ -0,0 +1,2 @@
8ef994c0e0303861b1204d1248541af06c9bfea6
v4.2.6 (https://github.com/panr/hugo-theme-terminal), unmodified copy; site-specific changes live in the project's layouts/ and assets/
+84
View File
@@ -0,0 +1,84 @@
.button-container {
display: table;
margin-left: auto;
margin-right: auto;
}
button,
.button,
a.button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px 18px;
text-decoration: none;
text-align: center;
font: inherit;
font-weight: bold;
appearance: none;
cursor: pointer;
outline: none;
}
button.outline,
.button.outline,
a.button.outline {
background: transparent;
box-shadow: none;
padding: 8px 18px;
}
button.outline :hover,
.button.outline :hover,
a.button.outline :hover {
transform: none;
box-shadow: none;
}
button.link,
.button.link,
a.button.link {
background: none;
font-size: var(--font-size);
}
button.small,
.button.small,
a.button.small {
font-size: calc(var(--font-size) * 0.8);
}
button.wide,
.button.wide,
a.button.wide {
min-width: 200px;
padding: 14px 24px;
}
a.button.inline {
background: none;
color: var(--accent);
padding: initial;
margin: initial;
border: initial;
font-weight: initial;
text-decoration: none;
}
a.button.inline:active,
a.button.inline:hover {
background: none;
}
a.read-more,
a.read-more:hover,
a.read-more:active {
display: inline-flex;
border: none;
background: none;
box-shadow: none;
padding: 0;
max-width: 100%;
text-decoration: none;
}
+127
View File
@@ -0,0 +1,127 @@
:root {
--code-border: color-mix(in srgb, var(--foreground) 10%, transparent);
}
pre:not(.chroma) {
padding: 10px;
}
pre.chroma {
margin: 0;
padding: 10px 0;
color: var(--foreground);
}
pre code {
color: var(--foreground);
border: none;
}
code {
color: var(--accent);
text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
.highlight {
position: relative;
margin: 20px 0;
border: 1px solid var(--code-border);
}
.highlight pre {
border: none;
}
.code-title {
display: flex;
align-items: center;
justify-content: space-between;
background: color-mix(in srgb, var(--foreground) 5%, transparent);
border-bottom: 1px solid var(--code-border);
color: var(--comment);
text-transform:uppercase;
font-size: calc(var(--font-size) * 0.8);
padding: 6px 10px;
line-height: 1;
}
.copy-button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 3px 8px;
text-decoration: none;
text-align: center;
font-size: 13px;
font-weight: 500;
border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
appearance: none;
cursor: pointer;
outline: none;
}
.code-title .copy-button {
z-index: 1;
background: color-mix(in srgb, var(--foreground) 5%, var(--background));
}
.code-title:hover .copy-button {
display: inline-block;
}
.code-title .copy-button:hover {
background: color-mix(in srgb, var(--accent) 10%, var(--background));
}
.collapsable-code {
position: relative;
width: 100%;
margin: 20px 0;
border: 1px solid var(--accent);
.highlight {
margin: 0;
}
}
.collapsable-code__title {
display: inline-flex;
align-items: center;
flex: 1;
color: var(--accent);
padding: 3px 10px;
font-size: calc(var(--font-size) * 0.9);
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.collapsable-code__language {
color: var(--accent);
border: 1px solid var(--accent);
border-bottom: none;
text-transform: uppercase;
padding: 3px 10px;
}
.collapsable-code summary {
color: var(--accent);
padding: 0 10px;
cursor: pointer;
}
.collapsable-code summary:hover {
background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.collapsable-code pre {
margin-top: 0;
}
.collapsable-code pre::first-line {
line-height: 0;
}
+18
View File
@@ -0,0 +1,18 @@
/* latin-ext */
@font-face {
font-family: 'Fira Code';
font-style: normal;
font-weight: 300 700;
font-display: swap;
src: url("../fonts/FiraCode-LatinExt.woff2") format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Fira Code';
font-style: normal;
font-weight: 300 700;
font-display: swap;
src: url("../fonts/FiraCode-Latin.woff2") format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
+44
View File
@@ -0,0 +1,44 @@
.footer {
padding: 40px 0;
flex-grow: 0;
opacity: 0.65;
}
.footer__inner {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0;
max-width: 100%;
}
.footer a {
color: inherit;
}
.footer .copyright {
display: flex;
flex-flow: row wrap;
flex: 1;
align-items: center;
justify-content: center;
}
.footer .copyright--user {
margin: auto;
text-align: center;
}
.footer .copyright > *:first-child:not(:only-child) {
margin-right: 10px;
}
.footer .copyright span {
white-space: nowrap;
}
@media (max-width: 900px) {
.footer__inner {
flex-direction: column;
}
}
+4
View File
@@ -0,0 +1,4 @@
body .gist .blob-num,
body .gist .blob-code-inner {
border: none;
}
+46
View File
@@ -0,0 +1,46 @@
.header {
display: flex;
flex-direction: column;
position: relative;
}
.header__inner {
display: flex;
align-items: center;
justify-content: space-between;
}
.header__logo {
display: flex;
flex: 1;
}
.header__logo::after {
content: "";
background: repeating-linear-gradient(90deg, var(--accent), var(--accent) 2px, transparent 0, transparent 10px);
display: block;
width: 100%;
right: 10px;
}
.header__logo a {
flex: 0 0 auto;
max-width: 100%;
text-decoration: none;
}
.logo {
display: flex;
align-items: center;
text-decoration: none;
background: var(--accent);
color: var(--background);
font-weight: bold;
padding: 5px 10px;
}
@media print {
.header {
display: none;
}
}
+520
View File
@@ -0,0 +1,520 @@
:root {
--background: #1a170f;
--foreground: #eceae5;
--accent: #eec35e;
--font-size: 1rem;
--line-height: 1.54em;
--radius: 0;
}
html {
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
word-break: break-word;
}
body {
margin: 0;
padding: 0;
font-family: "Fira Code", Monaco, Consolas, "Ubuntu Mono", monospace;
font-size: var(--font-size);
line-height: var(--line-height);
background-color: var(--background);
color: var(--foreground);
text-rendering: optimizelegibility;
-webkit-font-smoothing: antialiased;
-webkit-overflow-scrolling: touch;
text-size-adjust: 100%;
}
h1 {
font-size: calc(var(--font-size) * 1.45);
letter-spacing: 0;
}
h2 {
font-size: calc(var(--font-size) * 1.35);
letter-spacing: 0;
}
h3 {
font-size: calc(var(--font-size) * 1.15);
letter-spacing: 0;
}
h4,
h5,
h6 {
font-size: calc(var(--font-size) * 1);
letter-spacing: 0;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
img,
figure,
video,
table {
margin: 25px 0;
}
a {
color: var(--accent);
}
button {
position: relative;
font: inherit;
font-weight: bold;
text-decoration: none;
text-align: center;
background: transparent;
color: var(--accent);
padding: 5px 18px;
border: 4px solid var(--accent);
border-radius: var(--radius);
transition: background 0.15s linear;
appearance: none;
cursor: pointer;
outline: none;
}
button:hover {
background: color-mix(in srgb, var(--accent) 15%, transparent);
}
button:focus-visible,
a:focus-visible {
outline: 1px solid var(--accent);
outline-offset: 2px;
}
fieldset {
display: inline-block;
border: 2px solid var(--foreground);
border-radius: calc(var(--radius) * 1.6);
padding: 10px;
}
fieldset *:first-child {
margin-top: 0;
}
fieldset input,
fieldset select,
fieldset textarea,
fieldset label,
fieldset button {
margin-top: calc(var(--line-height) * 0.5);
width: 100%;
}
label {
display: inline-block;
}
label input {
margin-top: 0;
}
input,
textarea,
select {
background: transparent;
color: var(--foreground);
border: 1px solid var(--foreground);
border-radius: var(--radius);
padding: 10px;
font: inherit;
appearance: none;
}
input[type="checkbox"] {
width: auto;
}
input:focus-visible,
input:active,
textarea:focus-visible,
textarea:active,
select:focus-visible,
select:active {
border-color: var(--accent);
outline: 1px solid var(--accent);
outline-offset: 2px;
}
input:active,
textarea:active,
select:active {
box-shadow: none;
}
select {
background-image: linear-gradient(
45deg,
transparent 50%,
var(--foreground) 50%
),
linear-gradient(135deg, var(--foreground) 50%, transparent 50%);
background-position: calc(100% - 20px), calc(100% - 1em);
background-size:
5px 5px,
5px 5px;
background-repeat: no-repeat;
padding-right: 40px;
}
select option {
background: var(--background);
}
input[type="checkbox"] {
vertical-align: middle;
padding: 10px;
box-shadow: inset 0 0 0 3px var(--background);
}
input[type="checkbox"]:checked {
background: var(--accent);
}
img {
display: block;
max-width: 100%;
border: 8px solid var(--accent);
border-radius: var(--radius);
padding: 8px;
overflow: hidden;
}
img.left {
margin-right: auto;
}
img.center {
margin-left: auto;
margin-right: auto;
}
img.right {
margin-left: auto;
}
figure {
width: fit-content;
}
figure.left {
margin-right: auto;
}
figure.center {
margin-left: auto;
margin-right: auto;
}
figure.right {
margin-left: auto;
}
figure img,
figure video {
margin-bottom: 0;
}
figure figcaption {
background: var(--accent);
color: var(--background);
text-align: center;
font-size: var(--font-size);
font-weight: normal;
margin-top: -8px;
padding: 0 8px;
border-radius: 0 0 var(--radius) var(--radius);
}
figure figcaption p:first-child {
margin-top: 0;
}
ul,
ol {
margin-left: 4ch;
padding: 0;
}
ul ul,
ul ol,
ol ul,
ol ol {
margin-top: 0;
}
li::marker {
color: var(--accent);
}
ul li,
ol li {
position: relative;
}
code,
kbd {
font-family:
"Fira Code",
Monaco,
Consolas,
"Ubuntu Mono",
monospace !important;
font-feature-settings: normal;
background: color-mix(in srgb, var(--foreground) 5%, transparent);
border: 1px solid var(--code-border);
padding: 1px 6px;
margin: 0 2px;
font-size: calc(var(--font-size) * 0.95);
}
kbd {
border-top: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
border-left: 1px solid var(--accent);
border-right: 1px solid var(--accent);
border-bottom: 4px solid var(--accent);
border-radius: 4px;
}
code code {
background: transparent;
padding: 0;
margin: 0;
}
pre {
tab-size: 4;
background: color-mix(in srgb, var(--foreground) 5%, transparent) !important;
color: var(--foreground);
padding: 20px 10px;
font-size: calc(var(--font-size) * 0.95) !important;
overflow: auto;
border-radius: var(--radius);
border: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
}
pre code {
background: none !important;
margin: 0;
padding: 0;
border: none;
}
sup {
line-height: 0;
}
abbr {
position: relative;
text-decoration-style: wavy;
text-decoration-color: var(--accent);
cursor: help;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.25em;
}
mark {
background: color-mix(in srgb, var(--accent) 45%, transparent);
color: var(--foreground);
}
blockquote {
position: relative;
border-top: 1px solid var(--accent);
border-bottom: 1px solid var(--accent);
margin: 0;
padding: 25px;
}
blockquote::before {
content: ">";
display: block;
position: absolute;
left: 0;
color: var(--accent);
}
blockquote p:first-child {
margin-top: 0;
}
blockquote p:last-child {
margin-bottom: 0;
}
table {
table-layout: auto;
border-collapse: collapse;
}
table,
th,
td {
border: 2px solid var(--foreground);
padding: 10px;
}
th {
border-style: solid;
color: var(--foreground);
text-align: left;
text-transform: uppercase;
letter-spacing: 0.04em;
}
hr {
width: 100%;
border: none;
background: var(--accent);
height: 2px;
}
/* One Heading Size */
.headings--one-size h1,
.headings--one-size h2,
.headings--one-size h3,
.headings--one-size h4,
.headings--one-size h5,
.headings--one-size h6 {
font-size: 1.4rem;
line-height: 1.3;
margin: 20px 0;
}
.headings--one-size ~ h1:first-child,
.headings--one-size ~ h2:first-child,
.headings--one-size ~ h3:first-child,
.headings--one-size ~ h4:first-child,
.headings--one-size ~ h5:first-child,
.headings--one-size ~ h6:first-child {
margin-top: 20px;
}
blockquote.twitter-tweet {
position: relative;
background: var(--background);
font: inherit;
color: inherit;
border: 1px solid var(--accent);
padding-top: 60px;
}
blockquote.twitter-tweet a {
color: var(--accent);
text-decoration: underline;
}
blockquote.twitter-tweet::before {
content: "> From X:";
position: absolute;
top: 20px;
left: 20px;
color: var(--accent);
font-weight: bold;
}
.container {
display: flex;
flex-direction: column;
padding: 40px;
max-width: 864px;
min-height: 100vh;
border-right: 1px solid color-mix(in srgb, var(--accent) 10%, transparent);
}
.container.full, .container.center {
border: none;
margin: 0 auto;
}
.container.full {
max-width: 100%;
}
.content {
display: flex;
flex-direction: column;
}
.hidden {
display: none;
}
.__h_video {
position: relative;
overflow: visible !important;
height: auto !important;
padding-bottom: 0 !important;
}
.__h_video a {
position: relative;
display: block;
width: 100%;
}
.__h_video a img {
width: 100%;
}
.__h_video a .play {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
width: 60px;
height: 60px;
}
iframe[src*="youtube.com"] {
border: 8px solid var(--accent) !important;
padding: 8px !important;
}
@media (max-width: 684px) {
:root {
--font-size: 0.95rem;
}
.container {
padding: 20px;
}
}
@media print {
.container {
display: initial;
}
.content {
display: initial;
}
}
+148
View File
@@ -0,0 +1,148 @@
.navigation-menu {
display: flex;
align-items: flex-start;
justify-content: space-between;
margin: 20px 1px;
}
.navigation-menu__inner {
display: flex;
flex: 1;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
}
.navigation-menu__inner > li {
flex: 0 0 auto;
margin-bottom: 10px;
white-space: nowrap;
}
.navigation-menu__inner > li:not(:last-of-type) {
margin-right: 20px;
}
.navigation-menu .spacer {
flex-grow: 1 !important;
}
.menu {
display: flex;
flex-direction: column;
position: relative;
list-style: none;
padding: 0;
margin: 0;
}
.menu__trigger {
margin-right: 0 !important;
color: var(--accent);
user-select: none;
cursor: pointer;
}
.menu__dropdown {
display: none;
flex-direction: column;
position: absolute;
background: var(--background);
box-shadow: 0 10px var(--background), -10px 10px var(--background), 10px 10px var(--background);
color: var(--accent);
border: 2px solid var(--accent);
margin: 0;
padding: 10px;
top: 10px;
left: 0;
list-style: none;
z-index: 99;
}
.open .menu__dropdown {
display: flex;
}
.menu__dropdown > li {
flex: 0 0 auto;
}
.menu__dropdown > li:not(:last-of-type) {
margin-bottom: 10px;
}
.menu__dropdown > li a {
display: flex;
padding: 5px;
}
.menu--mobile .menu__trigger {
color: var(--accent);
border: 2px solid;
margin-left: 10px;
height: 100%;
padding: 3px 8px;
margin-bottom: 0 !important;
position: relative;
cursor: pointer;
display: none;
}
.menu--mobile li {
flex: 0 0 auto;
}
.menu--mobile li:not(:last-of-type) {
margin-bottom: 10px;
}
.menu--language-selector .menu__trigger {
color: var(--accent);
border: 2px solid;
margin-left: 5px;
height: 100%;
padding: 3px 8px;
margin-bottom: 0 !important;
position: relative;
cursor: pointer;
}
.menu--language-selector .menu__dropdown {
left: auto;
right: 0;
}
@media (max-width: 684px) {
.navigation-menu {
margin: 0;
}
.navigation-menu__inner {
flex-direction: column;
align-items: flex-start;
padding: 0;
}
.navigation-menu__inner li {
margin: 0;
padding: 5px;
}
.menu--desktop {
display: none;
}
.menu--mobile .menu__trigger {
display: block;
}
.menu--mobile .menu__dropdown {
left: auto;
right: 0;
}
.menu--language-selector .menu__trigger {
display: none;
}
}
+86
View File
@@ -0,0 +1,86 @@
.pagination {
margin-top: 50px;
}
.pagination__title {
display: flex;
text-align: center;
position: relative;
margin: 100px 0 20px;
}
.pagination__title-h {
text-align: center;
margin: 0 auto;
padding: 5px 10px;
background: var(--background);
color: color-mix(in srgb var(--foreground) 30%, transparent);
font-size: calc(var(--font-size) * 0.8);
text-transform: uppercase;
text-decoration: none;
letter-spacing: 0.1em;
z-index: 1;
}
.pagination__title hr {
position: absolute;
left: 0;
right: 0;
width: 100%;
margin-top: 15px;
z-index: 0;
}
.pagination__buttons {
display: flex;
align-items: center;
justify-content: center;
flex-flow: row wrap;
gap: 10px;
}
.pagination__buttons a {
display: inline-flex;
max-width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-decoration: none;
}
.button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: inherit;
padding: 0;
appearance: none;
}
.button a {
display: flex;
justify-content: center;
flex: 1;
padding: 8px 16px;
}
.button__text {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.next .button__icon {
margin-left: 8px;
}
.prev .button__icon {
margin-right: 8px;
}
@media print {
.pagination {
display: none;
}
}
+141
View File
@@ -0,0 +1,141 @@
.index-content {
margin: 25px 0;
}
.framed {
border: 1px solid var(--accent);
padding: 20px;
}
.framed *:first-child {
margin-top: 0;
}
.framed *:last-child {
margin-bottom: 0;
}
.posts {
width: 100%;
}
.post {
width: 100%;
text-align: left;
padding: 30px 0;
}
.post:not(:last-of-type) {
border-bottom: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
}
.post-meta {
font-size: inherit;
margin-bottom: 10px;
color: color-mix(in srgb, var(--foreground) 65%, transparent);
}
.post-meta > *:not(:first-child)::before {
content: "::";
display: inline-block;
margin: 0 8px;
}
.post-title {
position: relative;
color: var(--accent);
margin-top: 0 !important;
margin-bottom: 15px !important;
padding-bottom: 15px;
border-bottom: 3px dotted var(--accent);
text-decoration: none !important;
}
.post-title::after {
content: "";
position: absolute;
bottom: 2px;
display: block;
width: 100%;
border-bottom: 3px dotted var(--accent);
}
.post-title a {
text-decoration: none;
}
.post-tags {
display: block;
margin-bottom: 20px;
font-size: inherit;
color: var(--accent);
}
.table-of-contents {
margin: 40px 0;
}
.post-content {
margin-top: 25px;
}
.post-cover {
margin: 25px 0;
}
.post ul {
list-style: none;
}
.post ul li:not(:empty)::before {
content: "-";
position: absolute;
left: -20px;
color: var(--accent);
}
.post--regulation h1 {
justify-content: center;
}
.post--regulation h2 {
justify-content: center;
margin-bottom: 10px;
}
.post--regulation h2 + h2 {
margin-top: -10px;
margin-bottom: 20px;
}
.hanchor {
position: absolute;
color: var(--accent);
text-decoration: none;
margin-left: 10px;
visibility: hidden;
}
h1:hover .hanchor,
h2:hover .hanchor,
h3:hover .hanchor,
h4:hover .hanchor,
h5:hover .hanchor,
h6:hover .hanchor {
visibility: visible;
}
.footnotes {
color: color-mix(in srgb, var(--foreground) 50%, transparent);
}
.footnotes hr {
background: color-mix(in srgb, var(--foreground) 50%, transparent);
}
@media (max-width: 684px) {
.post-cover {
padding: 10px;
border-width: 10px;
}
}
+97
View File
@@ -0,0 +1,97 @@
:root {
--first-tone: var(--accent);
--second-tone: color-mix(in srgb, var(--accent) 70%, transparent);
--comment: color-mix(in srgb, var(--foreground) 50%, transparent);
}
/* Background */ .bg { }
/* PreWrapper */ .chroma { overflow:auto; }
/* Other */ .chroma .x { }
/* Error */ .chroma .err { }
/* CodeLine */ .chroma .cl { }
/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit }
/* LineTableTD */ .chroma .lntd { width:100%;vertical-align:top;padding:0;margin:0;border:0; }
/* LineTableTDNumbers */ .chroma .lntd:first-child { width: auto; }
/* Custom */ .chroma .lntd code { display:grid; }
/* LineTable */ .chroma .lntable { width:100%;border-spacing:0;padding:0;margin:0;border:0; }
/* LineHighlight */ .chroma .hl { background-color:color-mix(in srgb, var(--foreground) 5%, transparent) !important}
/* LineNumbersTable */ .chroma .lnt { color:var(--comment);white-space:pre;-webkit-user-select:none;user-select:none;padding:0 10px; }
/* LineNumbers */ .chroma .ln { color:var(--comment);white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.8em;padding:0 0.4em 0 0; }
/* Line */ .chroma .line { display:flex;padding:0 10px; }
/* Keyword */ .chroma .k { color:var(--second-tone) }
/* KeywordConstant */ .chroma .kc { color:var(--second-tone) }
/* KeywordDeclaration */ .chroma .kd { color:var(--second-tone) }
/* KeywordNamespace */ .chroma .kn { color:var(--second-tone) }
/* KeywordPseudo */ .chroma .kp { color:var(--second-tone) }
/* KeywordReserved */ .chroma .kr { color:var(--second-tone) }
/* KeywordType */ .chroma .kt { color:var(--second-tone) }
/* Name */ .chroma .n { color:var(--first-tone) }
/* NameAttribute */ .chroma .na { color:var(--second-tone) }
/* NameBuiltin */ .chroma .nb { color:var(--first-tone) }
/* NameBuiltinPseudo */ .chroma .bp { color:var(--first-tone) }
/* NameClass */ .chroma .nc { color:var(--foreground) }
/* NameConstant */ .chroma .no { color:var(--first-tone) }
/* NameDecorator */ .chroma .nd { color:var(--first-tone) }
/* NameEntity */ .chroma .ni { color:var(--first-tone) }
/* NameException */ .chroma .ne { color:var(--first-tone) }
/* NameFunction */ .chroma .nf { color:var(--first-tone); }
/* NameFunctionMagic */ .chroma .fm { color:var(--first-tone); }
/* NameLabel */ .chroma .nl { color:var(--first-tone) }
/* NameNamespace */ .chroma .nn { color:var(--first-tone) }
/* NameOther */ .chroma .nx { color:var(--first-tone) }
/* NameProperty */ .chroma .py { color:var(--first-tone) }
/* NameTag */ .chroma .nt { color:var(--first-tone) }
/* NameVariable */ .chroma .nv { color:var(--first-tone) }
/* NameVariableClass */ .chroma .vc { color:var(--first-tone) }
/* NameVariableGlobal */ .chroma .vg { color:var(--first-tone) }
/* NameVariableInstance */ .chroma .vi { color:var(--first-tone) }
/* NameVariableMagic */ .chroma .vm { color:var(--first-tone) }
/* Literal */ .chroma .l { }
/* LiteralDate */ .chroma .ld { }
/* LiteralString */ .chroma .s { color:var(--foreground) }
/* LiteralStringAffix */ .chroma .sa { color:var(--foreground) }
/* LiteralStringBacktick */ .chroma .sb { color:var(--foreground) }
/* LiteralStringChar */ .chroma .sc { color:var(--foreground) }
/* LiteralStringDelimiter */ .chroma .dl { color:var(--foreground) }
/* LiteralStringDoc */ .chroma .sd { color:var(--foreground) }
/* LiteralStringDouble */ .chroma .s2 { color:var(--foreground) }
/* LiteralStringEscape */ .chroma .se { color:var(--foreground) }
/* LiteralStringHeredoc */ .chroma .sh { color:var(--foreground) }
/* LiteralStringInterpol */ .chroma .si { color:var(--foreground) }
/* LiteralStringOther */ .chroma .sx { color:var(--foreground) }
/* LiteralStringRegex */ .chroma .sr { color:var(--foreground) }
/* LiteralStringSingle */ .chroma .s1 { color:var(--foreground) }
/* LiteralStringSymbol */ .chroma .ss { color:var(--foreground) }
/* LiteralNumber */ .chroma .m { color:var(--first-tone) }
/* LiteralNumberBin */ .chroma .mb { color:var(--first-tone) }
/* LiteralNumberFloat */ .chroma .mf { color:var(--first-tone) }
/* LiteralNumberHex */ .chroma .mh { color:var(--first-tone) }
/* LiteralNumberInteger */ .chroma .mi { color:var(--first-tone) }
/* LiteralNumberIntegerLong */ .chroma .il { color:var(--first-tone) }
/* LiteralNumberOct */ .chroma .mo { color:var(--first-tone) }
/* Operator */ .chroma .o { color:var(--foreground) }
/* OperatorWord */ .chroma .ow { color:var(--foreground) }
/* Punctuation */ .chroma .p { color:var(--foreground) }
/* Comment */ .chroma .c { color:var(--comment) }
/* CommentHashbang */ .chroma .ch { color:var(--comment) }
/* CommentMultiline */ .chroma .cm { color:var(--comment) }
/* CommentSingle */ .chroma .c1 { color:var(--comment) }
/* CommentSpecial */ .chroma .cs { color:var(--comment) }
/* CommentPreproc */ .chroma .cp { color:var(--comment) }
/* CommentPreprocFile */ .chroma .cpf { color:var(--comment) }
/* Generic */ .chroma .g { }
/* GenericDeleted */ .chroma .gd { color:var(--first-tone) }
/* GenericEmph */ .chroma .ge { }
/* GenericError */ .chroma .gr { }
/* GenericHeading */ .chroma .gh { }
/* GenericInserted */ .chroma .gi { color:var(--second-tone); }
/* GenericOutput */ .chroma .go { }
/* GenericPrompt */ .chroma .gp { }
/* GenericStrong */ .chroma .gs { }
/* GenericSubheading */ .chroma .gu { }
/* GenericTraceback */ .chroma .gt { }
/* GenericUnderline */ .chroma .gl { }
/* TextWhitespace */ .chroma .w { }
/* LANGUAGE FIXES */
/* PHP CommentPreproc */ .chroma .language-php .cp { color:var(--foreground) }
+2
View File
@@ -0,0 +1,2 @@
/* Placeholder file for your custom settings. */
/* You can get the color scheme variables from https://panr.github.io/terminal-css/ */
+18
View File
@@ -0,0 +1,18 @@
.terms h3 {
font-size: initial;
}
.terms ul {
list-style: none;
}
.terms ul li a {
color: var(--accent);
}
.terms ul li:not(:empty)::before {
content: "-";
position: absolute;
left: -20px;
color: var(--accent);
}
+32
View File
@@ -0,0 +1,32 @@
const blockcodes = document.querySelectorAll(".chroma code[data-lang]");
for (const bc of blockcodes) {
const parent = bc.parentElement;
const content = bc.innerText.split("\n").filter(Boolean).join("\n");
// Code title
const title = document.createElement("div");
const lang = bc.dataset.lang;
title.classList.add("code-title");
title.innerText = lang;
// Copy to clipboard
if (navigator.clipboard !== undefined) {
const cpbutton = document.createElement("button");
cpbutton.classList.add("copy-button");
cpbutton.innerText = "Copy";
cpbutton.addEventListener("click", () => {
cpbutton.innerText = "Copied";
setTimeout(() => {
cpbutton.innerText = "Copy";
}, 1000);
navigator.clipboard.writeText(content);
});
title.append(cpbutton);
}
parent.closest(".highlight").prepend(title);
}
+44
View File
@@ -0,0 +1,44 @@
const container = document.querySelector(".container");
const allMenus = document.querySelectorAll(".menu");
// Hide menus on body click
document.body.addEventListener("click", () => {
allMenus.forEach(menu => {
if (menu.classList.contains("open")) {
menu.classList.remove("open");
}
});
});
// Reset menus on resize
window.addEventListener("resize", () => {
allMenus.forEach(menu => {
menu.classList.remove("open");
});
});
// Handle desktop menu
allMenus.forEach(menu => {
const trigger = menu.querySelector(".menu__trigger");
const dropdown = menu.querySelector(".menu__dropdown");
trigger.addEventListener("click", e => {
e.stopPropagation();
if (menu.classList.contains("open")) {
menu.classList.remove("open");
} else {
// Close all menus...
allMenus.forEach(m => m.classList.remove("open"));
// ...before opening the current one
menu.classList.add("open");
}
if (dropdown.getBoundingClientRect().right > container.getBoundingClientRect().right) {
dropdown.style.left = "auto";
dropdown.style.right = 0;
}
});
dropdown.addEventListener("click", e => e.stopPropagation());
});
+10
View File
@@ -0,0 +1,10 @@
{{ define "main" }}
<div class="post">
<h1 class="post-title">404 — {{ $.Site.Params.missingContentMessage | default "Page not found..." }}</h1>
<div class="post-content">
<a href="{{ "/" | absURL }}">{{ $.Site.Params.missingBackButtonLabel | default "Back to home page" }}&nbsp;→</a>
</div>
</div>
{{ end }}
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="{{ $.Site.Language }}">
<head>
{{ block "title" . }}
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ end }}</title>
{{ end }}
{{ partial "head.html" . }}
</head>
<body>
{{ $container := cond ($.Site.Params.FullWidthTheme | default false) "container full" (cond ($.Site.Params.CenterTheme | default false) "container center" "container") }}
<div class="{{- $container -}}{{- cond ($.Site.Params.oneHeadingSize | default false) " headings--one-size" "" }}">
{{ partial "header.html" . }}
<div class="content">
{{ block "main" . }}
{{ end }}
</div>
{{ block "footer" . }}
{{ partial "footer.html" . }}
{{ end }}
</div>
</body>
</html>
@@ -0,0 +1,66 @@
{{ define "main" }}
{{ if .Content }}
<div class="index-content {{ if .Params.framed -}}framed{{- end -}}">
{{ .Content }}
</div>
{{ end }}
<div class="posts">
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
{{ $PageContext := . }}
{{ if .IsHome }}
{{ $PageContext = .Site }}
{{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
{{ range $paginator.Pages }}
<article class="post on-list">
<h2 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h2>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{- partial "post-date" . -}}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{ . }}</span>
{{- end -}}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
<p>{{ .Description | markdownify }}</p>
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button inline" href="{{ .RelPermalink }}">[{{ $.Site.Params.ReadMore }}]</a>
</div>
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}
@@ -0,0 +1,56 @@
{{ define "main" }}
{{ with .Content }}
<div class="index-content">
{{ . }}
</div>
{{ end }}
<div class="posts">
{{ range .Paginator.Pages }}
<article class="post on-list">
<h2 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h2>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{- partial "post-date" . -}}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{- . -}}</span>
{{- end -}}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
<p>{{ .Description | markdownify }}</p>
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button inline" href="{{ .RelPermalink }}">[{{ $.Site.Params.ReadMore }}]</a>
</div>
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}
@@ -0,0 +1,57 @@
{{ define "main" }}
<article class="post">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{- partial "post-date" . -}}
{{- if and $.Site.Params.showLastUpdated .Lastmod -}}
&nbsp;{{- partial "post-lastmod" . -}}
{{- end -}}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{ . }}</span>
{{- end -}}
{{- if and (.Param "readingTime") (eq (.Param "readingTime") true) -}}
<span class="post-reading-time">{{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }} ({{ .WordCount }} {{ $.Site.Params.words | default "words" }})</span>
{{- end -}}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
{{ if (.Params.Toc | default .Site.Params.Toc) }}
<div class="table-of-contents">
<h2>
{{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }}
</h2>
{{ .TableOfContents }}
</div>
{{ end }}
<div class="post-content">
{{- with .Content -}}
<div>
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">#</a> ${3}` | safeHTML }}
</div>
{{- end -}}
</div>
{{ if eq .Type $.Site.Params.contentTypeName }}
{{ partial "posts_pagination.html" . }}
{{ end }}
{{ if not (.Params.hideComments | default false) }}
{{ partial "comments.html" . }}
{{ end }}
</article>
{{ end }}
@@ -0,0 +1,62 @@
{{ define "main" }}
<h1>Posts for: #{{ .Title }}</h1>
{{ with .Content }}
<div class="index-content">
{{ . }}
</div>
{{ end }}
<div class="posts">
{{ range .Paginator.Pages }}
<article class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{- $date := .Date -}}
{{- with .Site.Params.DateFormat -}}
{{- $date.Format . -}}
{{- else -}}
{{- $date.Format "2006-01-02" -}}
{{- end -}}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{- . -}}</span>
{{- end -}}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
<p>{{ .Description | markdownify }}</p>
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button inline" href="{{ .RelPermalink }}">[{{ $.Site.Params.ReadMore }}]</a>
</div>
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}
@@ -0,0 +1,22 @@
{{ define "main" }}
<div class="terms">
<h1>{{ .Title }}</h1>
{{ with .Content }}
<div class="index-content">
{{ . }}
</div>
{{ end }}
<ul>
{{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<a class="terms-title" href="{{ .Permalink }}">{{ .Name }} [{{ $count }}]</a>
</li>
{{ end }}
{{ end }}
</ul>
</div>
{{ end }}
@@ -0,0 +1,8 @@
<!--
To add comments section, please create `layouts/partials/comments.html` in your
Hugo directory and insert:
{{ template "_internal/disqus.html" . }}
or whatever comment engine you want -> https://gohugo.io/content-management/comments/#readout
-->
@@ -0,0 +1,24 @@
{{- $cover := false -}}
{{- $autoCover := default $.Site.Params.autoCover false }}
{{- if index .Params "cover" -}}
{{- if .Resources.GetMatch .Params.Cover }}
{{- $cover = (.Resources.GetMatch .Params.Cover).RelPermalink -}}
{{- else -}}
{{- $cover = absURL .Params.Cover -}}
{{- end -}}
{{- else if $.Site.Params.AutoCover -}}
{{- if (not .Params.Cover) -}}
{{- if .Resources.GetMatch "cover.*" -}}
{{- $cover = (.Resources.GetMatch "cover.*").RelPermalink -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{if $cover -}}
<!-- Cover image found -->
<img src="{{ $cover }}"
class="post-cover"
alt="{{ .Title | plainify | default " " }}"
title="{{ .Params.CoverCredit |plainify|default "Cover Image" }}" />
{{- end }}
@@ -0,0 +1,4 @@
<!--
To add an extended footer section, please create
`layouts/partials/extended_footer.html` in your Hugo directory.
-->
@@ -0,0 +1,4 @@
<!--
To add an extended head section, please create
`layouts/partials/extended_head.html` in your Hugo directory.
-->
@@ -0,0 +1,23 @@
<footer class="footer">
<div class="footer__inner">
{{ if $.Site.Copyright }}
<div class="copyright copyright--user">
<span>{{ $.Site.Copyright | safeHTML }}</span>
{{ else }}
<div class="copyright">
<span>© {{ now.Year }} Powered by <a href="https://gohugo.io">Hugo</a></span>
{{ end }}
<span>:: <a href="https://github.com/panr/hugo-theme-terminal" target="_blank">Theme</a> made by <a href="https://github.com/panr" target="_blank">panr</a></span>
</div>
</div>
</footer>
{{ $menu := resources.Get "js/menu.js" | js.Build }}
{{ $cp := resources.Get "js/code.js" | js.Build }}
{{ $bundle := slice $menu $cp | resources.Concat "bundle.js" | resources.Minify }}
<script type="text/javascript" src="{{ $bundle.RelPermalink }}"></script>
<!-- Extended footer section-->
{{ partial "extended_footer.html" . }}
@@ -0,0 +1,82 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" />
{{ if .Params.noindex }}
{{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }}
<meta name="robots" content="noindex" />
{{ end }}
{{ else }}
<meta name="robots" content="noodp" />
{{ end }}
<link rel="canonical" href="{{ .Permalink }}" />
{{ template "_internal/google_analytics.html" . }}
{{ $css := resources.Match "css/*.css" }}
{{ range $css }}
{{ $styles := . | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.Permalink }}">
{{ end }}
<!-- Custom Terminal.css styles -->
{{ if (fileExists "static/terminal.css") -}}
<link rel="stylesheet" href="{{ "terminal.css" | absURL }}">
{{- end }}
<!-- Custom CSS to override theme properties (/static/style.css) -->
{{ if (fileExists "static/style.css") -}}
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
{{- end }}
<!-- Icons -->
<link rel="shortcut icon" href="{{ "favicon.png" | absURL }}">
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
{{ if (isset $.Site.Params "twitter") }}
{{ if (isset $.Site.Params.Twitter "site") }}
<meta name="twitter:site" content="{{ $.Site.Params.Twitter.site }}" />
{{ end }}
<meta name="twitter:creator" content="{{ if .IsHome }}{{ $.Site.Params.Twitter.creator }}{{ else if isset .Params "authortwitter" }}{{ .Params.authorTwitter }}{{ else }}{{ .Params.Author }}{{ end }}" />
{{ end }}
<!-- OG data -->
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:title" content="{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }}{{ end }}">
<meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:site_name" content="{{ $.Site.Title }}" />
{{ $pageCover := "og-image.png" }}
{{ if (isset .Params "cover") }}
{{ $pageCover = .Param "cover" }}
{{ with (.Resources.GetMatch (.Param "cover")) }}
{{ $pageCover = .RelPermalink }}
{{ end }}
{{ else if (or (.Params.autocover) ($.Site.Params.autocover)) }}
{{ with .Resources.GetMatch "cover.*" }}
{{ $pageCover = .RelPermalink }}
{{ end }}
{{ end }}
<meta property="og:image" content="{{ $pageCover | absURL }}">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
{{ range .Params.categories }}
<meta property="article:section" content="{{ . }}" />
{{ end }}
{{ if isset .Params "date" }}
<meta property="article:published_time" content="{{ time .Date }}" />
{{ end }}
<!-- RSS -->
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
<!-- JSON Feed -->
{{ with .OutputFormats.Get "json" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}" />
{{ end }}
<!-- Extended head section-->
{{ partial "extended_head.html" . }}
@@ -0,0 +1,16 @@
<header class="header">
<div class="header__inner">
<div class="header__logo">
{{ partial "logo.html" . }}
</div>
{{ if len $.Site.Menus }}
{{ partial "mobile-menu.html" . }}
{{ end }}
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
{{ partial "language-menu.html" . }}
{{ end }}
</div>
{{ if len $.Site.Menus }}
{{ partial "menu.html" . }}
{{ end }}
</header>
@@ -0,0 +1,10 @@
<ul class="menu menu--desktop menu--language-selector">
<li class="menu__trigger">{{ .Language.LanguageName }}&nbsp;▾</li>
<li>
<ul class="menu__dropdown">
{{ range $.Site.Home.AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ul>
</li>
</ul>
@@ -0,0 +1,5 @@
<a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}">
<div class="logo">
{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}Terminal{{ end }}
</div>
</a>
@@ -0,0 +1,33 @@
<nav class="navigation-menu">
<ul class="navigation-menu__inner menu--desktop">
{{ if or $.Site.Params.showMenuItems ( eq .Site.Params.showMenuItems 0 ) }}
{{ range first $.Site.Params.showMenuItems $.Site.Menus.main }}
{{ if not .HasChildren }}
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
{{ end }}
{{ end }}
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
<li>
<ul class="menu">
<li class="menu__trigger">{{ $.Site.Params.menuMore }}&nbsp;▾</li>
<li>
<ul class="menu__dropdown">
{{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }}
{{ if not .HasChildren }}
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
{{ end }}
{{ end }}
</ul>
</li>
</ul>
</li>
{{ end }}
{{ else }}
{{ range $.Site.Menus.main }}
{{ if not .HasChildren }}
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
{{ end }}
{{ end }}
{{ end }}
</ul>
</nav>
@@ -0,0 +1,20 @@
<ul class="menu menu--mobile">
<li class="menu__trigger">Menu&nbsp;▾</li>
<li>
<ul class="menu__dropdown">
{{ range $.Site.Menus.main }}
{{ if not .HasChildren }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
{{ end }}
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
<hr />
{{ range $.Site.Home.AllTranslations }}
<li>
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
{{ end }}
{{ end }}
</ul>
</li>
</ul>
@@ -0,0 +1,17 @@
<div class="pagination">
<div class="pagination__buttons">
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}" class="button inline prev">
&lt; [<span class="button__text">{{ $.Site.Params.newerPosts | default "Newer posts" }}</span>]
</a>
{{ end }}
{{ if and .Paginator.HasPrev .Paginator.HasNext }}
::
{{ end }}
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL }}" class="button inline next">
[<span class="button__text">{{ $.Site.Params.olderPosts | default "Older posts" }}</span>] &gt;
</a>
{{ end }}
</div>
</div>
@@ -0,0 +1,10 @@
{{- $date := .Date -}}
{{- with .Params.dateFormat -}}
{{- $date | time.Format . -}}
{{- else -}}
{{- with .Site.Params.dateFormat -}}
{{- $date | time.Format . -}}
{{- else -}}
{{- $date | time.Format "2006-01-02" -}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,10 @@
{{- $date := .Lastmod -}}
{{- with .Params.dateFormat -}}
{{- $date | time.Format . -}}
{{- else -}}
{{- with .Site.Params.dateFormat -}}
[{{- or $.Site.Params.updatedDatePrefix "Updated: " }} {{ $date | time.Format . -}}]
{{- else -}}
[{{- or $.Site.Params.updatedDatePrefix "Updated: " }} {{ $date | time.Format "2006-01-02" -}}]
{{- end -}}
{{- end -}}
@@ -0,0 +1,23 @@
{{ if or .NextInSection .PrevInSection }}
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
<hr />
</div>
<div class="pagination__buttons">
{{ if .NextInSection }}
<a href="{{ .NextInSection.Permalink }}" class="button inline prev">
&lt; [<span class="button__text">{{ .NextInSection.Title }}</span>]
</a>
{{ end }}
{{ if and .NextInSection .PrevInSection }}
::
{{ end }}
{{ if .PrevInSection }}
<a href="{{ .PrevInSection.Permalink }}" class="button inline next">
[<span class="button__text">{{ .PrevInSection.Title }}</span>] &gt;
</a>
{{ end }}
</div>
</div>
{{ end }}
@@ -0,0 +1,16 @@
{{ $id := delimit (shuffle (seq 1 9)) "" }}
{{ $open := .Get "open" }}
{{ $lang := .Get "language" }}
{{ $opts := .Get "opts" }}
{{- if $lang -}}
<details class="collapsable-code" {{ if eq $open "true" -}} open {{- end }}>
<summary title="Click to interact">
{{- if .Get "title" }}<span class="collapsable-code__title">{{ .Get "title" | markdownify }}</span>{{ end -}}
</summary>
{{ $trInner := trim .Inner "\n" }}
{{- transform.Highlight $trInner $lang $opts -}}
</details>
{{ else }}
{{ errorf "If you want to use the \"collapsable code\" shortcode, you need to pass a mandatory \"language\" param. The issue occured in %q (%q)" .Page.File .Page.Permalink }}
{{- end -}}
@@ -0,0 +1,3 @@
{{ if .Get "src" }}
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} {{ with .Get "width" }} width="{{ . | plainify }}" {{ end }} {{ with .Get "height" }} height="{{ . | plainify }}" {{ end }} />
{{ end }}
Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

+13
View File
@@ -0,0 +1,13 @@
name = "Terminal"
license = "MIT"
licenselink = "https://github.com/panr/hugo-theme-terminal/blob/master/LICENSE.md"
description = "A simple, retro theme for Hugo."
homepage = "https://github.com/panr/hugo-theme-terminal/"
demosite = "https://panr.github.io/hugo-theme-terminal-demo/"
tags = ["blog", "clean", "customizable", "dark", "highlighting", "minimal", "monotone", "multilingual", "personal", "responsive", "simple", "technical", "retro"]
features = ["blog", "shortcode", "syntax highlighting"]
min_version = 0.90
[author]
name = "panr"
homepage = "https://rkoziel.com"