diff --git a/static/blog.css b/static/blog.css new file mode 100644 index 0000000..3bbb883 --- /dev/null +++ b/static/blog.css @@ -0,0 +1,13 @@ +:root { + --pagefind-ui-scale: 1; + --pagefind-ui-primary: #034ad8; + --pagefind-ui-text: #ebdbb2; + --pagefind-ui-background: #3c3836; + --pagefind-ui-border: #eeeeee; + --pagefind-ui-tag: #eeeeee; + --pagefind-ui-border-width: 2px; + --pagefind-ui-border-radius: 8px; + ----pagefind-ui-image-border-radius: 8px; + --pagefind-ui-image-box-ratio: 3 / 2; + --pagefind-ui-font: inherit; +} diff --git a/static/gruvbox.css b/static/gruvbox.css new file mode 100644 index 0000000..3b7005b --- /dev/null +++ b/static/gruvbox.css @@ -0,0 +1,53 @@ +main { + -webkit-font-feature-settings: "liga" on, "calt" on; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + font-family: 'JetBrains Mono', 'Input Mono', monospace; + max-width: 38rem; + padding: 2rem; + margin: auto; +} + +@media only screen and (max-device-width: 736px) { + main { + padding: 0.2rem; + } +} + +::selection { + background: #9c0018; +} + +body { + background: #282828; + color: #ebdbb2; +} + +pre { + background-color: #3c3836; + padding: 1em; + border: 0; +} + +a, a:active, a:visited { + color: #e491b6; + background-color: #1d2021; +} + +h1, h2, h3, h4, h5 { + margin-bottom: .1rem; +} + +blockquote { + border-left: 1px solid #bdae93; + margin: 0.5em 10px; + padding: 0.5em 10px; +} + +footer { + align: center; +} + +img { + max-width: 100%; +} diff --git a/themes/gruvbox/layouts/_default/baseof.html b/themes/gruvbox/layouts/_default/baseof.html index 417e5e1..b8c5216 100644 --- a/themes/gruvbox/layouts/_default/baseof.html +++ b/themes/gruvbox/layouts/_default/baseof.html @@ -1,17 +1,24 @@ - - - - - {{- block "title" . }}{{ .Site.Title }}{{ end -}} - + + + + + + + + + {{- block "title" . }}{{ .Site.Title }}{{ end -}} +
- {{- partial "header.html" . -}} - {{- block "main" . }}{{ end -}} - {{- partial "footer.html" . -}} + + {{- partial "header.html" . -}} + {{- block "main" . }}{{ end -}} + {{- partial "footer.html" . -}}
diff --git a/themes/gruvbox/layouts/_default/list.html b/themes/gruvbox/layouts/_default/list.html index 30ddec6..b961351 100644 --- a/themes/gruvbox/layouts/_default/list.html +++ b/themes/gruvbox/layouts/_default/list.html @@ -1,6 +1,7 @@ {{ define "title" }}{{ .Title | lower }} – {{ .Site.Title }}{{ end }} {{ define "main" }} +

{{ .Title | lower }}

{{ .Content }} @@ -13,5 +14,6 @@ {{ end }} +
{{ end }} diff --git a/themes/gruvbox/layouts/_default/rss.xml b/themes/gruvbox/layouts/_default/rss.xml new file mode 100644 index 0000000..e49c966 --- /dev/null +++ b/themes/gruvbox/layouts/_default/rss.xml @@ -0,0 +1,39 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := slice -}} +{{- if or $.IsHome $.IsSection -}} +{{- $pages = $pctx.RegularPages -}} +{{- else -}} +{{- $pages = $pctx.Pages -}} +{{- end -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{- with .OutputFormats.Get "RSS" -}} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end -}} + {{ range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Content | html }} + + {{ end }} + + diff --git a/themes/gruvbox/layouts/_default/single.html b/themes/gruvbox/layouts/_default/single.html index eebbb6e..296378b 100644 --- a/themes/gruvbox/layouts/_default/single.html +++ b/themes/gruvbox/layouts/_default/single.html @@ -1,6 +1,7 @@ {{ define "title" }}{{ .Title }}{{ end }} {{ define "main" }} +

{{ .Title }}

@@ -9,6 +10,7 @@
{{ .Content }} +