diff options
author | mms <michal@sapka.me> | 2024-05-19 15:33:26 +0200 |
---|---|---|
committer | mms <michal@sapka.me> | 2024-05-19 15:33:26 +0200 |
commit | f4bb92435d069f84ce41d4ecae51641872de2270 (patch) | |
tree | e830735f772bd789473884dafbeabc8cad63dc8f /themes | |
parent | e25abc08a5d3e7b94b638d837d26acbc0b79f14b (diff) |
feat: themes
Diffstat (limited to 'themes')
36 files changed, 1188 insertions, 0 deletions
diff --git a/themes/sapka-2024/layouts/_default/baseof.html b/themes/sapka-2024/layouts/_default/baseof.html new file mode 100644 index 0000000..e348fd5 --- /dev/null +++ b/themes/sapka-2024/layouts/_default/baseof.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html lang="en"> + {{ partial "header/meta" . }} + + {{ $section_class := "mms"}} + {{ if in .Page.Params.categories "star-trek" }} + {{ $section_class = "star-trek" }} + {{ else if in .Page.Params.category "site-info" }} + {{ $section_class = "site-info" }} + {{ else if in .Page.Params.categories "bsd" }} + {{ $section_class = "bsd" }} + {{ else if in .Page.Params.categories "blog" }} + {{ $section_class = "blog" }} + {{ else if in .Page.Params.categories "article" }} + {{ $section_class = "article" }} + {{ else if in .Page.Params.categories "emacs" }} + {{ $section_class = "emacs" }} + {{ else if in .Page.Params.categories "brainrot" }} + {{ $section_class = "brain-rot" }} + {{ end }} + <body class="{{ $section_class }}"> + {{ partial "header/header" . }} + + <main class="right-column"> + {{ block "main" . }} + {{ end }} + </main> + {{ partial "footer/footer" . }} + </body> +</html> diff --git a/themes/sapka-2024/layouts/_default/index.html b/themes/sapka-2024/layouts/_default/index.html new file mode 100644 index 0000000..dfda0d2 --- /dev/null +++ b/themes/sapka-2024/layouts/_default/index.html @@ -0,0 +1,27 @@ +{{ define "main" }} + +{{ partial "partials/homepage/nav" . }} + +<h2>Recent updates and publications </h2> + +{{ range first 10 +.Site.RegularPages.ByDate.Reverse +}} +{{ partial "partials/article_list_item.html" . }} +{{ end }} +<p> + <a href="/blog/">» Go to blog</a> +</p> + +{{ partial "partials/homepage/brainrot" . }} +{{ partial "partials/homepage/bsd.html" . }} +{{ partial "partials/homepage/emacs.html" . }} +{{ partial "partials/homepage/startrek.html" . }} +{{ partial "partials/homepage/omake.html" . }} +{{ partial "partials/homepage/buttons.html" . }} +{{ partial "partials/homepage/nameplate.html" . }} + +{{ end }} + + + diff --git a/themes/sapka-2024/layouts/_default/list.html b/themes/sapka-2024/layouts/_default/list.html new file mode 100644 index 0000000..2b045b8 --- /dev/null +++ b/themes/sapka-2024/layouts/_default/list.html @@ -0,0 +1,26 @@ +{{ define "main" }} + +{{if .Page.Content}} + {{ .Page.Content }} + {{- if .Params.primary_menu }} + {{ partial "single/bottom_nav.html" (dict "menuID" .Page.Params.primary_menu "page" .) }} + {{- end }} + + {{ partial "single/dates.html" . }} +{{ else }} + + {{ if in .Page.Params.Categories "blog" }} + {{ partial "partials/blog_index.html" . }} + {{ else if in .Page.Params.Categories "article" }} + {{ partial "partials/article_index.html" . }} + {{ else }} + + <h2>Articles</h2> + {{ range .Data.Pages }} + {{ partial "partials/article_list_item.html" . }} + {{ end }} + + {{ end }} +{{end}} + +{{ end }} diff --git a/themes/sapka-2024/layouts/_default/page.html b/themes/sapka-2024/layouts/_default/page.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/themes/sapka-2024/layouts/_default/page.html diff --git a/themes/sapka-2024/layouts/_default/section.html b/themes/sapka-2024/layouts/_default/section.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/themes/sapka-2024/layouts/_default/section.html diff --git a/themes/sapka-2024/layouts/_default/single.html b/themes/sapka-2024/layouts/_default/single.html new file mode 100644 index 0000000..bed5a61 --- /dev/null +++ b/themes/sapka-2024/layouts/_default/single.html @@ -0,0 +1,13 @@ +{{ define "main" }} + +<article> + {{ .Page.Content }} +</article> + +{{- if .Params.primary_menu }} + {{ partial "single/bottom_nav.html" (dict "menuID" .Page.Params.primary_menu "page" .) }} +{{- end }} + +{{ partial "single/dates.html" . }} + +{{- end }} diff --git a/themes/sapka-2024/layouts/_default/taxonomy.html b/themes/sapka-2024/layouts/_default/taxonomy.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/themes/sapka-2024/layouts/_default/taxonomy.html diff --git a/themes/sapka-2024/layouts/_default/term.html b/themes/sapka-2024/layouts/_default/term.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/themes/sapka-2024/layouts/_default/term.html diff --git a/themes/sapka-2024/layouts/list.txt b/themes/sapka-2024/layouts/list.txt new file mode 100644 index 0000000..430a2d2 --- /dev/null +++ b/themes/sapka-2024/layouts/list.txt @@ -0,0 +1,7 @@ +{{- range .Pages.GroupBy "Section" }} + {{- with $.Site.GetPage "section" .Key }} + {{- range .Pages }} + {{ .Permalink }} + {{- end }} + {{- end }} +{{- end }} diff --git a/themes/sapka-2024/layouts/rss.xml b/themes/sapka-2024/layouts/rss.xml new file mode 100644 index 0000000..99b99cd --- /dev/null +++ b/themes/sapka-2024/layouts/rss.xml @@ -0,0 +1,73 @@ +{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} +{{- $authorEmail := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .email }} + {{- $authorEmail = . }} + {{- end }} + {{- end }} +{{- else }} + {{- with site.Author.email }} + {{- $authorEmail = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} + {{- end }} +{{- end }} + +{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} +{{- $authorName := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $authorName = . }} + {{- end }} + {{- else }} + {{- $authorName = . }} + {{- end }} +{{- else }} + {{- with site.Author.name }} + {{- $authorName = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} + {{- end }} +{{- end }} + +{{- $pctx := . }} +{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} +{{- $pages := slice }} +{{- if $.IsHome }} +{{- $pages = $pctx.RegularPages}} +{{- else if $.IsSection }} +{{- $pages = $pctx.RegularPagesRecursive}} +{{- else }} +{{- $pages = $pctx.Pages }} +{{- end }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = $pages | first $limit }} +{{- end }} +{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title> + <link>{{ .Permalink }}</link> + <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description> + <generator>Hugo -- gohugo.io</generator> + <language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }} + <managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }} + <webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }} + <copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }} + <lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} + {{- with .OutputFormats.Get "RSS" }} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} + {{- end }} + {{- range $pages.ByPublishDate.Reverse}} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }} + <guid>{{ crypto.MD5 .Date }}</guid> + <description>{{ safeHTML "<![CDATA[" }}{{ replace .Content "\n\n" "\n" | safeHTML }}<hr><p style="font-style:italic">Reply via <a href="https://michal.sapka.me/me/contact/">email</a></p>]]></description> + </item> + {{- end }} + </channel> +</rss> diff --git a/themes/sapka-2024/static/style.css b/themes/sapka-2024/static/style.css new file mode 100644 index 0000000..c594514 --- /dev/null +++ b/themes/sapka-2024/static/style.css @@ -0,0 +1,709 @@ +:root { + color-scheme: light dark; + + --site-bg: #fff; + --menu-bg: var(--menu-bg) + --text-color: #000; + --link-color: var(--text-color); + + --logo-bg-color: #000; + + --article-bg: ##fcfcfc; + --article-border-color: #f3f1f1; + --highlight-bg: rgba(240, 240, 240, 0.42); + + --border-color: var(--text-color); + + --blockquote-border-color: #d2d2d2; + --blockquote-color: ##666666; + + --pre-bg: #f0f0f0; + + --font-size: 1.2em; + --mobile-font-size: 1hem; + --header-font-size: 0.9em; + + --site-font: monospace; + --header-font: arial; +} +/* default_variables_end */ + +/* article_variables_start */ +:root { + --article-highlight-color: #863fc1; + --article-logo-bg-color: var(--article-highlight-color); + --article-logo-h1-color: var(--article-highlight-color); +} +/* article_variables_end */ + +/* ste_info_variables_start */ +:root { + --site-info-hightlight-color: #9ba89a; + --site-info-logo-bg-color: var(--site-info-hightlight-color); + --site-info-h1-color: var(--site-info-hightlight-color); +} +/* ste_info_variables_end */ + + + + + + +/* dark_mode_variables_end */ +@media (prefers-color-scheme: dark) { + :root { + --site-bg: #000; + --text-color: #abb1b1; + + --logo-bg-color: #abb1b1; + + --article-bg: #141818; + + --article-border-color: var(--article-bg); + --highlight-bg: rgb(31 27 27); + + --border-color: var(--text-color); + + --pre-bg: #1b2121; + } +} +/* dark_mode_variables_end */ + +/* site_start */ +body { + font-family: var(--site-font); + padding: 0; + font-size: var(--font-size); + background-color: var(--site-bg); + color: var(--text-color); + max-width: 800px; + margin: auto; +} +@media only screen and (max-width: 600px) { + body { + font-size: var(--mobile-font-size); + } +} +main, footer { + width: 100%; + max-width: 95%; + margin-left: auto; + margin-right: auto; +} +img { + max-width: 99%; + width: auto; + height: auto; +} +a { color: var(--link-color); } +h2 a { text-decoration: none; } + +.placeholder { + opacity: 0.55; +} +/* site_end */ + +/* generic_header_start */ +header { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: normal; + align-items: normal; + align-content: normal; + max-width: 95%; + margin-left: auto; + margin-right: auto; +} +header > .logo { + display: block; + flex-grow: 0; + flex-shrink: 1; + flex-basis: auto; + align-self: auto; + order: 0; + width: 50px; + height: 80px; + background-color: var(--logo-bg-color); + position: relative; + overflow: hidden; +} +header > .name { + display: block; + flex-grow: 1; + flex-shrink: 0; + flex-basis: auto; + align-self: auto; + order: 0; + text-align: left; + position: relative; +} +header > .name > nav { + position: absolute; + bottom: -10px; + padding: 10px; +} +h1 { + font-size: inherit; + margin: 0; + text-decoration: none; +} +h1 a, +h2 a { + text-decoration: none; + color: inherit; +} +.breadcrumb { +} +sup { + font-size: 0.6em; +} +header ol { + padding-left: 0; + margin-top: 0; + margin-bottom: 0; +} + +header li { + display: block; +} +/* */ +header li:not(:last-child)::after { + content: "ยป"; +} + +/* generic_header_end */ + +h2 a { color: inherit; } +h3 a { color: inherit; } +h4 a { color: inherit; } +h5 a { color: inherit; } + +/* article_header_end */ +body.article > header > .logo { + background-color: var(--article-logo-bg-color); +} +body.article > header > .logo > img.files { + position: absolute; + bottom: 4px; + right: -2px; + transform: scale(1); +} +body.article h1{ + color: var(--article-logo-h1-color); +} + + + + +/* site_info_header_end */ +body.site-info > header > .logo { + background-color: var(--site-info-logo-bg-color); +} +body.site-info h1{ + color: var(--site-info-h1-color); +} +/* site_info_header_end */ + + + +/* blog_post_list_start */ +article.blog-post-item > h2 > a { + text-decoration: none; +} +article.blog-post-item > nav { + display: inline-block; +} +nav.blog-pages-list { + margin-bottom: 20px; +} +nav.blog-pages-list a { + text-decoration: underline; +} +/* blog_post_list_end */ + +/* article_list_start */ +article.article-abstract-list-item { + margin-bottom: 5px; +} +article.article-abstract-list-item > h2 { + margin-top: 0; +} +article.article-abstract-list-item > h2 > a { + text-decoration: none; +} +article.article-abstract-list-item > a > aside { + margin-top: 7px; + opacity : 0.7; +} + +/* article_list_end */ + +/* index_start */ +nav.personal { +} +nav.personal > a { + font-weight: bold; +} +table { width: 100% } +td { border-style: solid!important; border-width: 1px;} + +table.small { width: auto; border-style: none!important; } +table.small td { border-style: none!important; } +table.small tr { border-style: none!important; } + +/* single_start */ + +article > .publish-date { + text-align: right; +} + +article > .publish-date a { + text-decoration: none; +} +/*single_end */ + +/* inline_nav_start */ +.inline-nav > h4 { + text-transform: none!important; +} +.inline-nav > ul > li > b { + color: var(--star-trek-highlight-color); +} + +/* inline_nav_end */ + + + + + +/* legacy_code_start */ + +/* ---------- Main */ +main { + margin-top: 30px; +} + + +/* ----------- Taxmomy list */ + +.list-item time { + opacity: 0.5; +} +.list-item span { + font-weight: bold; +} + +/* ----------- Articles / Posts */ +article { + margin-bottom: 20px; + padding: 5px; + line-height: 1.32em; +} +article p { + text-align: justify; +} +article a { + text-decoration: underline; +} +h2, h3, h4, h5 { + text-align: left; + border: 0; + border-bottom-width: 0px; + border-style: solid; + font-size: inherit; + text-transform: uppercase; +} +h2 { + border-bottom-width: 1px; +} + + + +/* emacs_article_start */ + +/* emacs_article_end */ + + +blockquote { + border: 0; + border-left: 3px; + border-style: solid; + border-color: var(--blockquote-border-color); + margin-left: 15px; + padding-left: 15px; + color: var(--blockquote-color); +} +pre { + padding-bottom: 5px; + white-space: pre-wrap; + padding: 11px; + background-color: var(--pre-bg); + word-break: keep-all; +} +pre code { + max-width: 100%; + /* word-break: break-all; */ +} + +/* ----------- Articles images */ +article figure { + text-align: center; + margin: 0; + max-width: 100%; + font-size: 0.8em; +} +img.float-right { + float: right; + display: inline; + margin-left: 10px; +} +img.center { + max-width: 100%; + height: auto; +} +img.small { + max-width: 50%; + height: auto; +} +figure.graph { + background-color: var(--highlight-bg); + padding: 5px; + padding-top: 20px; +} +figure.graph img { + width: 95%; +} + +/* ----------- Articles adjustement navigation */ +.next-link { + float: right; +} + +/* ----------- Footer */ +footer { + text-align: center; + padding: 10px 0 30px 0; +} + +/* ---------- Footnotes */ +a[href^="#fn:"], a[href^="#fnref:"] { + text-decoration: none; +} +a[href^="#fn:"]:before{ content: '[' } +a[href^="#fn:"]:after{ content: ']' } +.footnotes p { + margin: 3px; +} +.footnotes hr { + size: 1px; +} +.footnotes::before { + border: 0; + border-bottom-width: 1px; + border-style: solid; + font-weight: bold; + display: block; + text-transform: uppercase; +} + +/* ----------- Donations */ +.donor { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + align-items: center; + align-content: flex-start; + gap: 50px; +} + +/* --------- Code blocks */ + +/* Background */ .bg { background-color: #f8f8f8; } +/* PreWrapper */ .chroma { background-color: #f8f8f8; } +/* 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: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* 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: #7f7f7f } +/* Line */ .chroma .line { display: flex; } +/* Keyword */ .chroma .k { color: #aa22ff; font-weight: bold } +/* KeywordConstant */ .chroma .kc { color: #aa22ff; font-weight: bold } +/* KeywordDeclaration */ .chroma .kd { color: #aa22ff; font-weight: bold } +/* KeywordNamespace */ .chroma .kn { color: #aa22ff; font-weight: bold } +/* KeywordPseudo */ .chroma .kp { color: #aa22ff } +/* KeywordReserved */ .chroma .kr { color: #aa22ff; font-weight: bold } +/* KeywordType */ .chroma .kt { color: #00bb00; font-weight: bold } +/* Name */ .chroma .n { } +/* NameAttribute */ .chroma .na { color: #bb4444 } +/* NameBuiltin */ .chroma .nb { color: #aa22ff } +/* NameBuiltinPseudo */ .chroma .bp { } +/* NameClass */ .chroma .nc { color: #0000ff } +/* NameConstant */ .chroma .no { color: #880000 } +/* NameDecorator */ .chroma .nd { color: #aa22ff } +/* NameEntity */ .chroma .ni { color: #999999; font-weight: bold } +/* NameException */ .chroma .ne { color: #d2413a; font-weight: bold } +/* NameFunction */ .chroma .nf { color: #00a000 } +/* NameFunctionMagic */ .chroma .fm { } +/* NameLabel */ .chroma .nl { color: #a0a000 } +/* NameNamespace */ .chroma .nn { color: #0000ff; font-weight: bold } +/* NameOther */ .chroma .nx { } +/* NameProperty */ .chroma .py { } +/* NameTag */ .chroma .nt { color: #008000; font-weight: bold } +/* NameVariable */ .chroma .nv { color: #b8860b } +/* NameVariableClass */ .chroma .vc { } +/* NameVariableGlobal */ .chroma .vg { } +/* NameVariableInstance */ .chroma .vi { } +/* NameVariableMagic */ .chroma .vm { } +/* Literal */ .chroma .l { } +/* LiteralDate */ .chroma .ld { } +/* LiteralString */ .chroma .s { color: #bb4444 } +/* LiteralStringAffix */ .chroma .sa { color: #bb4444 } +/* LiteralStringBacktick */ .chroma .sb { color: #bb4444 } +/* LiteralStringChar */ .chroma .sc { color: #bb4444 } +/* LiteralStringDelimiter */ .chroma .dl { color: #bb4444 } +/* LiteralStringDoc */ .chroma .sd { color: #bb4444; font-style: italic } +/* LiteralStringDouble */ .chroma .s2 { color: #bb4444 } +/* LiteralStringEscape */ .chroma .se { color: #bb6622; font-weight: bold } +/* LiteralStringHeredoc */ .chroma .sh { color: #bb4444 } +/* LiteralStringInterpol */ .chroma .si { color: #bb6688; font-weight: bold } +/* LiteralStringOther */ .chroma .sx { color: #008000 } +/* LiteralStringRegex */ .chroma .sr { color: #bb6688 } +/* LiteralStringSingle */ .chroma .s1 { color: #bb4444 } +/* LiteralStringSymbol */ .chroma .ss { color: #b8860b } +/* LiteralNumber */ .chroma .m { color: #666666 } +/* LiteralNumberBin */ .chroma .mb { color: #666666 } +/* LiteralNumberFloat */ .chroma .mf { color: #666666 } +/* LiteralNumberHex */ .chroma .mh { color: #666666 } +/* LiteralNumberInteger */ .chroma .mi { color: #666666 } +/* LiteralNumberIntegerLong */ .chroma .il { color: #666666 } +/* LiteralNumberOct */ .chroma .mo { color: #666666 } +/* Operator */ .chroma .o { color: #666666 } +/* OperatorWord */ .chroma .ow { color: #aa22ff; font-weight: bold } +/* Punctuation */ .chroma .p { } +/* Comment */ .chroma .c { color: #008800; font-style: italic } +/* CommentHashbang */ .chroma .ch { color: #008800; font-style: italic } +/* CommentMultiline */ .chroma .cm { color: #008800; font-style: italic } +/* CommentSingle */ .chroma .c1 { color: #008800; font-style: italic } +/* CommentSpecial */ .chroma .cs { color: #008800; font-weight: bold } +/* CommentPreproc */ .chroma .cp { color: #008800 } +/* CommentPreprocFile */ .chroma .cpf { color: #008800 } +/* Generic */ .chroma .g { } +/* GenericDeleted */ .chroma .gd { color: #a00000 } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericError */ .chroma .gr { color: #ff0000 } +/* GenericHeading */ .chroma .gh { color: #000080; font-weight: bold } +/* GenericInserted */ .chroma .gi { color: #00a000 } +/* GenericOutput */ .chroma .go { color: #888888 } +/* GenericPrompt */ .chroma .gp { color: #000080; font-weight: bold } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { color: #800080; font-weight: bold } +/* GenericTraceback */ .chroma .gt { color: #0044dd } +/* GenericUnderline */ .chroma .gl { text-decoration: underline } +/* TextWhitespace */ .chroma .w { color: #bbbbbb } + +/* legacy_code_end */ + + +/* brain_rot_start */ +:root { + --brain-rot-highlight-color: #978b27; +} + +.brain-rot > header > .logo { + background-color: var(--brain-rot-highlight-color); +} +.brain-rot > header > .logo > img { + position: absolute; + bottom: 0px; + right: -5px; + transform: scale(0.9); +} +.brain-rot h1 { + color: var(--brain-rot-highlight-color); +} + +.brain-rot h2, +.brain-rot h3, +.brain-rot h4, +.brain-rot h5, +.brain-rot h6 { + color: var(--brain-rot-highlight-color); + border-color: var(--brain-rot-highlight-color) +} +.brain-rot .new { + color: var(--brain-rot-highlight-color); +} +.rating-box { + float: right; + margin: 10px; + text-align: center; +} +/* brain_rot_end */ + +/* star_trek_start */ + +:root { + --star-trek-highlight-color: #3e7dc0; +} + +body.star-trek > header > .logo { + background-color: var(--star-trek-highlight-color); +} +body.star-trek > header > .logo > img.stbadge { + position: absolute; + bottom: -12px; + right: -6px; + transform: scale(0.8); +} +body.star-trek h1{ + color: var(--star-trek-highlight-color); +} + +.star-trek h2, +.star-trek h3, +.star-trek h4, +.star-trek h5, +.star-trek h6 { + color: var(--star-trek-highlight-color); + border-color: var(--star-trek-highlight-color) +} + +.star-trek .new { + color: var(--star-trek-highlight-color) +} + +img.vert-move:hover { + animation: mover 1s infinite alternate; +} + +@keyframes mover { + 0% { transform: translateY(0); } + 100% { transform: translateY(-10px); } +} + +/* star_trek__end */ + + + +/* bsd_start */ +:root { + --bsd-highlight-color: #ab2b28; +} + +body.bsd > header > .logo { + background-color: var(--bsd-highlight-color); +} +body.bsd > header > .logo > img.beastie { + position: absolute; + bottom: 0px; + right: -11px; + transform: scale(1.1); +} +.bsd h1 { + color: var(--bsd-highlight-color); +} + +.bsd h2, +.bsd h3, +.bsd h4, +.bsd h5, +.bsd h6 { + color: var(--bsd-highlight-color); + border-color: var(--bsd-highlight-color) +} + +.bsd .new { + color: var(--bsd-highlight-color) +} + + +/* bsd_end */ + + + +/* emacs_start */ +:root { + --emacs-highlight-color: #7F5AB6; +} + +body.emacs > header > .logo { + background-color: var(--emacs-highlight-color); +} +body.emacs > header > .logo > img { + position: absolute; + bottom: 0px; + right: -2px; + transform: scale(0.9); +} +.emacs h1 { + color: var(--emacs-h1-color); +} + +.emacs h2, +.emacs h3, +.emacs h4, +.emacs h5, +.emacs h6 { + color: var(--emacs-highlight-color); + border-color: var(--emacs-highlight-color) +} +.emacs .new { + color: var(--emacs-highlight-color) +} + +/* emacs_end */ + + +/* blog_start */ +:root { + --blog-highlight-color: #4c683c;; +} + +body.blog > header > .logo { + background-color: var(--blog-highlight-color); +} +body.blog > header > .logo > img.blogicon { + position: absolute; + bottom: 0px; + right: -2px; + transform: scale(0.9); +} +body.blog h1 { + color: var(--blog-h1-color); +} + +.blog h2, +.blog h3, +.blog h4, +.blog h5, +.blog h6 { + color: var(--blog-highlight-color); + border-color: var(--blog-highlight-color) +} +/* emacs_end */ + +/* omake_start */ +:root { + --omake-highlight-color: #b47379; +} + +.omake h1 { + color: var(--omake-h1-color); +} + + .omake h2, + .omake h3, + .omake h4, + .omake h5, + .omake h6 { + color: var(--omake-highlight-color); + border-color: var(--omake-highlight-color) + } + + /* omake_end */ diff --git a/themes/trek/LICENSE b/themes/trek/LICENSE new file mode 100644 index 0000000..8aa2645 --- /dev/null +++ b/themes/trek/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [year] [fullname] + +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. diff --git a/themes/trek/README.md b/themes/trek/README.md new file mode 100644 index 0000000..7cec74e --- /dev/null +++ b/themes/trek/README.md @@ -0,0 +1,7 @@ +# Theme Name + +## Features + +## Installation + +## Configuration diff --git a/themes/trek/archetypes/default.md b/themes/trek/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/themes/trek/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/themes/trek/assets/css/main.css b/themes/trek/assets/css/main.css new file mode 100644 index 0000000..166ade9 --- /dev/null +++ b/themes/trek/assets/css/main.css @@ -0,0 +1,22 @@ +body { + color: #222; + font-family: sans-serif; + line-height: 1.5; + margin: 1rem; + max-width: 768px; +} + +header { + border-bottom: 1px solid #222; + margin-bottom: 1rem; +} + +footer { + border-top: 1px solid #222; + margin-top: 1rem; +} + +a { + color: #00e; + text-decoration: none; +} diff --git a/themes/trek/assets/js/main.js b/themes/trek/assets/js/main.js new file mode 100644 index 0000000..e2aac52 --- /dev/null +++ b/themes/trek/assets/js/main.js @@ -0,0 +1 @@ +console.log('This site was generated by Hugo.'); diff --git a/themes/trek/content/_index.md b/themes/trek/content/_index.md new file mode 100644 index 0000000..652623b --- /dev/null +++ b/themes/trek/content/_index.md @@ -0,0 +1,9 @@ ++++ +title = 'Home' +date = 2023-01-01T08:00:00-07:00 +draft = false ++++ + +Laborum voluptate pariatur ex culpa magna nostrud est incididunt fugiat +pariatur do dolor ipsum enim. Consequat tempor do dolor eu. Non id id anim anim +excepteur excepteur pariatur nostrud qui irure ullamco. diff --git a/themes/trek/content/posts/_index.md b/themes/trek/content/posts/_index.md new file mode 100644 index 0000000..e7066c0 --- /dev/null +++ b/themes/trek/content/posts/_index.md @@ -0,0 +1,7 @@ ++++ +title = 'Posts' +date = 2023-01-01T08:30:00-07:00 +draft = false ++++ + +Tempor est exercitation ad qui pariatur quis adipisicing aliquip nisi ea consequat ipsum occaecat. Nostrud consequat ullamco laboris fugiat esse esse adipisicing velit laborum ipsum incididunt ut enim. Dolor pariatur nulla quis fugiat dolore excepteur. Aliquip ad quis aliqua enim do consequat. diff --git a/themes/trek/content/posts/post-1.md b/themes/trek/content/posts/post-1.md new file mode 100644 index 0000000..3e3fc6b --- /dev/null +++ b/themes/trek/content/posts/post-1.md @@ -0,0 +1,10 @@ ++++ +title = 'Post 1' +date = 2023-01-15T09:00:00-07:00 +draft = false +tags = ['red'] ++++ + +Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem. + +Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do. diff --git a/themes/trek/content/posts/post-2.md b/themes/trek/content/posts/post-2.md new file mode 100644 index 0000000..22b8287 --- /dev/null +++ b/themes/trek/content/posts/post-2.md @@ -0,0 +1,10 @@ ++++ +title = 'Post 2' +date = 2023-02-15T10:00:00-07:00 +draft = false +tags = ['red','green'] ++++ + +Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia. + +Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud. diff --git a/themes/trek/content/posts/post-3/bryce-canyon.jpg b/themes/trek/content/posts/post-3/bryce-canyon.jpg Binary files differnew file mode 100644 index 0000000..9a923be --- /dev/null +++ b/themes/trek/content/posts/post-3/bryce-canyon.jpg diff --git a/themes/trek/content/posts/post-3/index.md b/themes/trek/content/posts/post-3/index.md new file mode 100644 index 0000000..ca42a66 --- /dev/null +++ b/themes/trek/content/posts/post-3/index.md @@ -0,0 +1,12 @@ ++++ +title = 'Post 3' +date = 2023-03-15T11:00:00-07:00 +draft = false +tags = ['red','green','blue'] ++++ + +Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat. + +![Bryce Canyon National Park](bryce-canyon.jpg) + +Sit excepteur do velit veniam mollit in nostrud laboris incididunt ea. Amet eu cillum ut reprehenderit culpa aliquip labore laborum amet sit sit duis. Laborum id proident nostrud dolore laborum reprehenderit quis mollit nulla amet veniam officia id id. Aliquip in deserunt qui magna duis qui pariatur officia sunt deserunt. diff --git a/themes/trek/hugo.toml b/themes/trek/hugo.toml new file mode 100644 index 0000000..890e58d --- /dev/null +++ b/themes/trek/hugo.toml @@ -0,0 +1,23 @@ +baseURL = 'https://example.org/' +languageCode = 'en-us' +title = 'My New Hugo Site' + +[[menus.main]] +name = 'Home' +pageRef = '/' +weight = 10 + +[[menus.main]] +name = 'Posts' +pageRef = '/posts' +weight = 20 + +[[menus.main]] +name = 'Tags' +pageRef = '/tags' +weight = 30 + +[module] + [module.hugoVersion] + extended = false + min = "0.116.0" diff --git a/themes/trek/layouts/_default/baseof.html b/themes/trek/layouts/_default/baseof.html new file mode 100644 index 0000000..ce9613a --- /dev/null +++ b/themes/trek/layouts/_default/baseof.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}" dir="{{ or site.Language.LanguageDirection `ltr` }}"> +<head> + {{ partial "head.html" . }} +</head> +<body> + <header> + {{ partial "header.html" . }} + </header> + <main> + {{ block "main" . }}{{ end }} + </main> + <footer> + {{ partial "footer.html" . }} + </footer> +</body> +</html> diff --git a/themes/trek/layouts/_default/home.html b/themes/trek/layouts/_default/home.html new file mode 100644 index 0000000..0df6597 --- /dev/null +++ b/themes/trek/layouts/_default/home.html @@ -0,0 +1,7 @@ +{{ define "main" }} + {{ .Content }} + {{ range site.RegularPages }} + <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> + {{ .Summary }} + {{ end }} +{{ end }} diff --git a/themes/trek/layouts/_default/list.html b/themes/trek/layouts/_default/list.html new file mode 100644 index 0000000..50fc92d --- /dev/null +++ b/themes/trek/layouts/_default/list.html @@ -0,0 +1,8 @@ +{{ define "main" }} + <h1>{{ .Title }}</h1> + {{ .Content }} + {{ range .Pages }} + <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> + {{ .Summary }} + {{ end }} +{{ end }} diff --git a/themes/trek/layouts/_default/single.html b/themes/trek/layouts/_default/single.html new file mode 100644 index 0000000..7e286c8 --- /dev/null +++ b/themes/trek/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{ define "main" }} + <h1>{{ .Title }}</h1> + + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> + + {{ .Content }} + {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +{{ end }} diff --git a/themes/trek/layouts/partials/footer.html b/themes/trek/layouts/partials/footer.html new file mode 100644 index 0000000..a7cd916 --- /dev/null +++ b/themes/trek/layouts/partials/footer.html @@ -0,0 +1 @@ +<p>Copyright {{ now.Year }}. All rights reserved.</p> diff --git a/themes/trek/layouts/partials/head.html b/themes/trek/layouts/partials/head.html new file mode 100644 index 0000000..02c2240 --- /dev/null +++ b/themes/trek/layouts/partials/head.html @@ -0,0 +1,5 @@ +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width"> +<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title> +{{ partialCached "head/css.html" . }} +{{ partialCached "head/js.html" . }} diff --git a/themes/trek/layouts/partials/head/css.html b/themes/trek/layouts/partials/head/css.html new file mode 100644 index 0000000..91b928d --- /dev/null +++ b/themes/trek/layouts/partials/head/css.html @@ -0,0 +1,9 @@ +{{- with resources.Get "css/main.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 }} diff --git a/themes/trek/layouts/partials/head/js.html b/themes/trek/layouts/partials/head/js.html new file mode 100644 index 0000000..18fe842 --- /dev/null +++ b/themes/trek/layouts/partials/head/js.html @@ -0,0 +1,12 @@ +{{- with resources.Get "js/main.js" }} + {{- if eq hugo.Environment "development" }} + {{- with . | js.Build }} + <script src="{{ .RelPermalink }}"></script> + {{- end }} + {{- else }} + {{- $opts := dict "minify" true }} + {{- with . | js.Build $opts | fingerprint }} + <script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script> + {{- end }} + {{- end }} +{{- end }} diff --git a/themes/trek/layouts/partials/header.html b/themes/trek/layouts/partials/header.html new file mode 100644 index 0000000..7980a00 --- /dev/null +++ b/themes/trek/layouts/partials/header.html @@ -0,0 +1,2 @@ +<h1>{{ site.Title }}</h1> +{{ partial "menu.html" (dict "menuID" "main" "page" .) }} diff --git a/themes/trek/layouts/partials/menu.html b/themes/trek/layouts/partials/menu.html new file mode 100644 index 0000000..7183180 --- /dev/null +++ b/themes/trek/layouts/partials/menu.html @@ -0,0 +1,51 @@ +{{- /* +Renders a menu for the given menu ID. + +@context {page} page The current page. +@context {string} menuID The menu ID. + +@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }} +*/}} + +{{- $page := .page }} +{{- $menuID := .menuID }} + +{{- with index site.Menus $menuID }} + <nav> + <ul> + {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} + </ul> + </nav> +{{- end }} + +{{- define "partials/inline/menu/walk.html" }} + {{- $page := .page }} + {{- range .menuEntries }} + {{- $attrs := dict "href" .URL }} + {{- if $page.IsMenuCurrent .Menu . }} + {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} + {{- else if $page.HasMenuCurrent .Menu .}} + {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} + {{- end }} + {{- $name := .Name }} + {{- with .Identifier }} + {{- with T . }} + {{- $name = . }} + {{- end }} + {{- end }} + <li> + <a + {{- range $k, $v := $attrs }} + {{- with $v }} + {{- printf " %s=%q" $k $v | safeHTMLAttr }} + {{- end }} + {{- end -}} + >{{ $name }}</a> + {{- with .Children }} + <ul> + {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} + </ul> + {{- end }} + </li> + {{- end }} +{{- end }} diff --git a/themes/trek/layouts/partials/terms.html b/themes/trek/layouts/partials/terms.html new file mode 100644 index 0000000..47cf6e4 --- /dev/null +++ b/themes/trek/layouts/partials/terms.html @@ -0,0 +1,23 @@ +{{- /* +For a given taxonomy, renders a list of terms assigned to the page. + +@context {page} page The current page. +@context {string} taxonomy The taxonony. + +@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +*/}} + +{{- $page := .page }} +{{- $taxonomy := .taxonomy }} + +{{- with $page.GetTerms $taxonomy }} + {{- $label := (index . 0).Parent.LinkTitle }} + <div> + <div>{{ $label }}:</div> + <ul> + {{- range . }} + <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li> + {{- end }} + </ul> + </div> +{{- end }} diff --git a/themes/trek/static/favicon.ico b/themes/trek/static/favicon.ico Binary files differnew file mode 100644 index 0000000..67f8b77 --- /dev/null +++ b/themes/trek/static/favicon.ico diff --git a/themes/trek/theme.toml b/themes/trek/theme.toml new file mode 100644 index 0000000..3ba3164 --- /dev/null +++ b/themes/trek/theme.toml @@ -0,0 +1,31 @@ +name = 'Theme name' +license = 'MIT' +licenselink = 'https://github.com/owner/repo/LICENSE' +description = 'Theme description' + +# The home page of the theme, where the source can be found +homepage = 'https://github.com/owner/repo' + +# If you have a running demo of the theme +demosite = 'https://owner.github.io/repo' + +# Taxonomy terms +tags = ['blog', 'company'] +features = ['some', 'awesome', 'features'] + +# If the theme has multiple authors +authors = [ + {name = 'Name of author', homepage = 'Website of author'}, + {name = 'Name of author', homepage = 'Website of author'} +] + +# If the theme has a single author +[author] + name = 'Your name' + homepage = 'Your website' + +# If porting an existing theme +[original] + author = 'Name of original author' + homepage = 'Website of original author' + repo = 'https://github.com/owner/repo' |