summaryrefslogtreecommitdiff
path: root/themes/conspiracy/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'themes/conspiracy/layouts')
-rw-r--r--themes/conspiracy/layouts/404.html0
-rw-r--r--themes/conspiracy/layouts/_default/baseof.html9
-rw-r--r--themes/conspiracy/layouts/_default/list.html18
-rw-r--r--themes/conspiracy/layouts/_default/single.html12
-rw-r--r--themes/conspiracy/layouts/index.html22
-rw-r--r--themes/conspiracy/layouts/partials/breadcrumbs.html7
-rw-r--r--themes/conspiracy/layouts/partials/card.html17
-rw-r--r--themes/conspiracy/layouts/partials/footer.html6
-rw-r--r--themes/conspiracy/layouts/partials/head.html10
-rw-r--r--themes/conspiracy/layouts/partials/header.html17
10 files changed, 118 insertions, 0 deletions
diff --git a/themes/conspiracy/layouts/404.html b/themes/conspiracy/layouts/404.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/conspiracy/layouts/404.html
diff --git a/themes/conspiracy/layouts/_default/baseof.html b/themes/conspiracy/layouts/_default/baseof.html
new file mode 100644
index 0000000..c4963da
--- /dev/null
+++ b/themes/conspiracy/layouts/_default/baseof.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ {{- partial "head.html" . -}}
+ <body>
+ {{- partial "header.html" . -}}
+ {{- block "main" . }}{{- end }}
+ {{- partial "footer.html" . -}}
+ </body>
+</html>
diff --git a/themes/conspiracy/layouts/_default/list.html b/themes/conspiracy/layouts/_default/list.html
new file mode 100644
index 0000000..02703b4
--- /dev/null
+++ b/themes/conspiracy/layouts/_default/list.html
@@ -0,0 +1,18 @@
+{{- define "main" }}
+ {{- if not .IsHome | and .Title }}
+ <header>
+ <h1>{{ .Title }}</h1>
+ {{- partial "breadcrumbs.html" . }}
+ </header>
+ {{- end }}
+ <main class="cards">
+ {{- if .Content }}
+ <div class="intro">
+ {{ .Content }}
+ </div>
+ {{- end }}
+ {{- range .Pages }}
+ {{ partial "card.html" . }}
+ {{- end }}
+ </main>
+{{- end }}
diff --git a/themes/conspiracy/layouts/_default/single.html b/themes/conspiracy/layouts/_default/single.html
new file mode 100644
index 0000000..9f3ff8d
--- /dev/null
+++ b/themes/conspiracy/layouts/_default/single.html
@@ -0,0 +1,12 @@
+{{- define "main" }}
+ {{- if not .IsHome | and .Title }}
+ <header>
+ <h1>{{ .Title }}</h1>
+ {{- partial "breadcrumbs.html" . }}
+ {{- if .Params.Date }} <strong>{{ .Date.Format "2006-01-02" }}</strong>{{- end }}
+ </header>
+ {{- end }}
+ <main>
+ {{ .Content }}
+ </main>
+{{- end }}
diff --git a/themes/conspiracy/layouts/index.html b/themes/conspiracy/layouts/index.html
new file mode 100644
index 0000000..28b5cc5
--- /dev/null
+++ b/themes/conspiracy/layouts/index.html
@@ -0,0 +1,22 @@
+{{- define "main" }}
+ <header>
+ <h1>{{ .Title }}</h1>
+ </header>
+ <main class="cards">
+ {{- if .Content }}
+ <div class="intro">
+ {{ .Content }}
+ </div>
+ {{- end }}
+
+ <h2>Recently updated projects</h2>
+ {{ range first 2 (where site.RegularPages "Section" "==" "projects") }}
+ {{ partial "card.html" . }}
+ {{- end }}
+
+ <h2>Blog</h2>
+ {{ range (where site.RegularPages "Section" "==" "blog") }}
+ {{ partial "card.html" . }}
+ {{- end }}
+ </main>
+{{- end }}
diff --git a/themes/conspiracy/layouts/partials/breadcrumbs.html b/themes/conspiracy/layouts/partials/breadcrumbs.html
new file mode 100644
index 0000000..ff82e73
--- /dev/null
+++ b/themes/conspiracy/layouts/partials/breadcrumbs.html
@@ -0,0 +1,7 @@
+{{/* https://github.com/adityatelange/hugo-PaperMod/blob/master/layouts/partials/breadcrumbs.html */}}
+<ul class="breadcrumbs">
+ {{- range .Ancestors.Reverse }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{- end -}}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+</ul>
diff --git a/themes/conspiracy/layouts/partials/card.html b/themes/conspiracy/layouts/partials/card.html
new file mode 100644
index 0000000..167a9d5
--- /dev/null
+++ b/themes/conspiracy/layouts/partials/card.html
@@ -0,0 +1,17 @@
+<div class="card">
+ {{- if .Title }}<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>{{- end }}
+ {{- if .Date }}<strong>{{ .Date.Format "2006-01-02" }}</strong>{{- end }}
+
+ <div class="summary">
+ {{ .Summary | safeHTML }}
+ <a href="{{ .Permalink }}">Read more</a>
+ </div>
+
+ {{- if .Params.external_links }}
+ <div class="links">
+ {{- range .Params.external_links }}
+ <a href="{{ .url }}">{{ .name }}</a>
+ {{- end }}
+ </div>
+ {{- end }}
+</div>
diff --git a/themes/conspiracy/layouts/partials/footer.html b/themes/conspiracy/layouts/partials/footer.html
new file mode 100644
index 0000000..6071d43
--- /dev/null
+++ b/themes/conspiracy/layouts/partials/footer.html
@@ -0,0 +1,6 @@
+<footer>
+ Copyright © {{ now.Year }} {{ site.Copyright }}
+ {{- range site.Params.footer_links }}
+ / <a href="{{.url | absURL }}">{{ .name }}</a>
+ {{- end }}
+</footer>
diff --git a/themes/conspiracy/layouts/partials/head.html b/themes/conspiracy/layouts/partials/head.html
new file mode 100644
index 0000000..1196d00
--- /dev/null
+++ b/themes/conspiracy/layouts/partials/head.html
@@ -0,0 +1,10 @@
+<head>
+ <meta charset="utf-8">
+ <title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }}</title>
+ <meta name="description" content="">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="color-scheme" content="dark light">
+ {{- $stylesheet := resources.Get "css/style.css" | resources.ExecuteAsTemplate "style.css" . }}
+ <link rel="stylesheet" href="{{ $stylesheet.RelPermalink }}">
+</head>
diff --git a/themes/conspiracy/layouts/partials/header.html b/themes/conspiracy/layouts/partials/header.html
new file mode 100644
index 0000000..675f899
--- /dev/null
+++ b/themes/conspiracy/layouts/partials/header.html
@@ -0,0 +1,17 @@
+<nav>
+ {{- $currentPage := . }}
+ <!-- todo: put this in a "pages" drop down on mobile -->
+ {{- range site.Menus.main }}
+ {{- $menu_item_url := .URL | absURL }}
+ {{- $page_url:= $currentPage.Permalink | absURL }}
+ <a href="{{ .URL }}" title="{{ .Title | default .Name }}" {{- if eq $menu_item_url $page_url }} class="active" {{- end }}>
+ {{- .Pre }}
+ {{- .Name -}}
+ {{ .Post -}}
+ </a>
+ {{- end }}
+ <span class="spacer"></span>
+ {{- range site.Params.profile_links }}
+ <a href="{{ .url | absURL }}" title="{{ .name }}">{{ .name }}</a>
+ {{- end }}
+</nav>