Based quest initial theme.
authorJoann Mõndresku <joann@cernodile.com>
Wed, 21 Sep 2022 17:58:23 +0000 (20:58 +0300)
committerJoann Mõndresku <joann@cernodile.com>
Wed, 21 Sep 2022 17:58:23 +0000 (20:58 +0300)
13 files changed:
LICENSE [new file with mode: 0644]
archetypes/default.md [new file with mode: 0644]
layouts/_default/baseof.html [new file with mode: 0644]
layouts/_default/list.html [new file with mode: 0644]
layouts/_default/single.html [new file with mode: 0644]
layouts/index.html [new file with mode: 0644]
layouts/partials/footer.html [new file with mode: 0644]
layouts/partials/header.html [new file with mode: 0644]
layouts/partials/links.html [new file with mode: 0644]
layouts/partials/tags.html [new file with mode: 0644]
layouts/shortcodes/tags.html [new file with mode: 0644]
static/bquest.css [new file with mode: 0644]
theme.toml [new file with mode: 0644]

diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..147d594
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2022 YOUR_NAME_HERE
+
+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/archetypes/default.md b/archetypes/default.md
new file mode 100644 (file)
index 0000000..26f317f
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: "{{ replace .Name "-" " " | title }}"
+date: {{ .Date }}
+draft: true
+---
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644 (file)
index 0000000..a9c83cd
--- /dev/null
@@ -0,0 +1,4 @@
+{{ - partial "header.html" . - }}
+<h1>hi</h1>
+</body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644 (file)
index 0000000..d45fa5f
--- /dev/null
@@ -0,0 +1,8 @@
+{{ partial "header.html" . -}}
+<h2>{{.Site.Title}} &ndash; Articles for {{.Title}}</h2>
+<ul>
+{{- range.Pages }}
+       <li><a href="{{ .RelPermalink }}">{{ .Date.Format "02/01/2006" }} {{.Title}}</a></li>
+{{ end -}}
+</ul>
+{{ partial "footer.html" .}}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644 (file)
index 0000000..9072580
--- /dev/null
@@ -0,0 +1,8 @@
+{{ partial "header.html" . -}}
+<p><a href="{{.Site.BaseURL}}">&lt;-- Back</a></p>
+<div id="post">
+       <h1>{{.Site.Title }} &ndash; {{ .Title }}</h1>
+       <p class="cern-blue">Posted on {{ .Date.Format "02/01/2006 15:04:05" }}</p>
+       {{ .Content }}
+</div>
+{{ partial "footer.html" . }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644 (file)
index 0000000..0495271
--- /dev/null
@@ -0,0 +1,37 @@
+{{ partial "header.html" . -}}
+<p>&gt; curl {{ .Site.Title }} -v<br>
+* Trying 127.0.0.1:80...<br>
+* Connected to {{ .Site.Title }} (127.0.0.1) port 80 (#0)<br>
+&gt; GET / HTTP 1.1<br>
+&gt; Host: based.quest<br>
+&gt; User-Agent: curl/b.45.3d<br>
+&gt; Accept */*<br>
+&gt;<br><br></p>
+<p>&lt; HTTP/1.1 200 OK<br>
+&lt; Server: nginx<br>
+&lt; Date: Right now o'clock<br>
+&lt; Content-Type: base/based<br>
+&lt; Last-Modified: Doesn't need to be modified, is perfect as-is.<br>
+&lt; Connection: keep-alive<br><br></p>
+<p>based<br><br></p>
+
+{{ partial "links.html" }}
+
+<p>Tags: {{ range $name, $taxonomy := .Site.Taxonomies.tags }}<a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}/">{{ $name }}</a> {{ end }}</p>
+{{ range .Pages.GroupBy "Section" "desc"}}
+{{ with $.Site.GetPage "section" .Key }}
+<h2>{{ .Title }}</h2>
+<ul>
+       {{ range first 5 .Pages }}
+               <li><a href="{{ .RelPermalink }}">{{ .Date.Format "02/01/2006" }} {{ .Title }}</a></li>
+       {{ end }}
+       {{ if gt (len .Pages) 5 }}
+               <br>
+               <p><a href="{{ .RelPermalink }}">Read all the posts</a></p>
+       {{ end }}
+</ul>
+{{ end }}
+{{ end }}
+
+{{ partial "tags.html" . }}
+{{ partial "footer.html" . }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644 (file)
index 0000000..26e9c59
--- /dev/null
@@ -0,0 +1,2 @@
+<p class="cern-blue"><br><br>Join us at Matrix: {{ .Site.Params.Matrix }}</p>
+<p class="cern-blue">&copy; 2021 - 2022 {{ .Site.Title }} | Powered by <a href="https://gohugo.io">Hugo</a> | <a href="{{ .Site.Params.Donate }}">Donate</a> | <a href="index.xml">Atom RSS</a></p>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644 (file)
index 0000000..558ff53
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+"http://www.w3.org/TR/html4/strict.dtd">
+<html lang="{{ .Site.Language }}">
+<head>
+       <title>{{ .Site.Title }}</title>
+       <meta name="viewport" content="width=device-width, initial-scale=1">
+       <link rel="stylesheet" type="text/css" href="/bquest.css">
+       <meta property="og:title" content="{{.Site.Title}}">
+       <meta property="og:description" content="{{ if not .IsHome }}{{ .Description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
+       {{ if .Params.img }}<meta property="og:image" content="{{ .Site.BaseURL }}img/{{ .Params.img }}">{{ end }}
+</head>
+<body>
diff --git a/layouts/partials/links.html b/layouts/partials/links.html
new file mode 100644 (file)
index 0000000..8e879f5
--- /dev/null
@@ -0,0 +1,2 @@
+<p class="cern-blue">Create layouts/partials/links.html to create your own links section here.</p>
+<br><br>
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
new file mode 100644 (file)
index 0000000..757db6f
--- /dev/null
@@ -0,0 +1,13 @@
+        {{- if isset .Params "tags" -}}
+            {{- $tagsLen := len .Params.tags -}}
+            {{- if gt $tagsLen 0 -}}
+        <div style="clear:both" class=taglist>
+               {{- with .Site.Params.relatedtext }}{{ . }}<br>{{ end -}}
+                {{- range $k, $v := .Params.tags -}}
+                {{- $url := printf "tags/%s" (. | urlize | lower) -}}
+                <a id="tag_{{ . | lower }}" href="{{ $url | absURL }}">{{ . | title }}</a>
+                {{- if lt $k (sub $tagsLen 1) }} &middot; {{ end -}}
+                {{- end -}}
+        </div>
+            {{- end -}}
+        {{- end }}
diff --git a/layouts/shortcodes/tags.html b/layouts/shortcodes/tags.html
new file mode 100644 (file)
index 0000000..c6c5e02
--- /dev/null
@@ -0,0 +1,3 @@
+{{ if isset .Site.Taxonomies "tags" }}{{ if not (eq (len .Site.Taxonomies.tags) 0) }}   <p>
+    {{ range $name, $items := .Site.Taxonomies.tags }}{{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}}<li><a href="{{ $url | absURL }}" id="tag_{{ $name }}">{{ $name | title }}</a></li>
+    {{ end }}</p>{{ end }}{{ end }}
diff --git a/static/bquest.css b/static/bquest.css
new file mode 100644 (file)
index 0000000..f640d12
--- /dev/null
@@ -0,0 +1 @@
+body,html{background:#000;color:#fff;max-width:1024px;margin:1em auto;padding:0 0.5em;font-family:monospace;font-size:large;}.cern-blue{color:#397ef6;}a,a:visited{color:#fff;}p{margin:0;padding:0}#post p{margin:12px 0;margin:revert;text-align:justify;}#post a,#post a:visited{color:#00b7ff;}pre code {display:block;padding:1em 1em 1em 1em;overflow-x:auto;}code{border:1px solid #ffb300;border-radius:5px;color:#19ca24;background:#202020;display:inline-block;}
diff --git a/theme.toml b/theme.toml
new file mode 100644 (file)
index 0000000..926f0f2
--- /dev/null
@@ -0,0 +1,13 @@
+# theme.toml template for a Hugo theme
+# See https://github.com/gohugoio/hugoThemes#themetoml for an example
+
+name = "bquest"
+description = "The theme for based.quest website"
+homepage = "https://based.quest/"
+tags = ["blog"]
+features = []
+min_version = "0.41.0"
+
+[author]
+  name = "Joann Mondresku"
+  homepage = "https://cernodile.com"