diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 11 | ||||
-rw-r--r-- | layouts/_default/baseof.txt | 1 | ||||
-rw-r--r-- | layouts/_default/rss.xml | 39 | ||||
-rw-r--r-- | layouts/_default/single.html | 3 | ||||
-rw-r--r-- | layouts/_default/single.txt | 3 | ||||
-rw-r--r-- | layouts/blog/list.html | 8 | ||||
-rw-r--r-- | layouts/blog/list.rss.xml | 39 | ||||
-rw-r--r-- | layouts/blog/single.html | 7 | ||||
-rw-r--r-- | layouts/news/list.html | 7 | ||||
-rw-r--r-- | layouts/news/list.txt | 12 | ||||
-rw-r--r-- | layouts/news/single.html | 6 | ||||
-rw-r--r-- | layouts/news/single.txt | 6 | ||||
-rw-r--r-- | layouts/page/index.html | 16 | ||||
-rw-r--r-- | layouts/page/index.txt | 3 | ||||
-rw-r--r-- | layouts/partials/footer.html | 6 | ||||
-rw-r--r-- | layouts/partials/head.html | 12 | ||||
-rw-r--r-- | layouts/partials/navbar.html | 15 | ||||
-rw-r--r-- | layouts/shortcodes/pkg.html | 1 | ||||
-rw-r--r-- | layouts/shortcodes/pkg.txt | 1 |
19 files changed, 196 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..a4f747b --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> + {{- partial "head.html" . -}} + <body> + {{- partial "navbar.html" . -}} + <div id="content"> + {{- block "main" . }}{{- end }} + </div> + {{- partial "footer.html" . -}} + </body> +</html> diff --git a/layouts/_default/baseof.txt b/layouts/_default/baseof.txt new file mode 100644 index 0000000..49d010f --- /dev/null +++ b/layouts/_default/baseof.txt @@ -0,0 +1 @@ +{{- block "main" . }}{{- end }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..e49c966 --- /dev/null +++ b/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 "<?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>{{ with .Site.LanguageCode }} + <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} + <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} + <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} + <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} + <lastBuildDate>{{ .Date.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 }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} + <guid>{{ .Permalink }}</guid> + <description>{{ .Content | html }}</description> + </item> + {{ end }} + </channel> +</rss> diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..bfa8dcd --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,3 @@ +{{define "main"}} +{{ .Content }} +{{ end }} diff --git a/layouts/_default/single.txt b/layouts/_default/single.txt new file mode 100644 index 0000000..bfa8dcd --- /dev/null +++ b/layouts/_default/single.txt @@ -0,0 +1,3 @@ +{{define "main"}} +{{ .Content }} +{{ end }} diff --git a/layouts/blog/list.html b/layouts/blog/list.html new file mode 100644 index 0000000..63388b7 --- /dev/null +++ b/layouts/blog/list.html @@ -0,0 +1,8 @@ +{{define "main"}} +{{.Content}} +<ul> +{{ range .Pages }} +<li>{{.Date.Format "2006-01-02"}} | <a href="{{.Permalink}}">{{.Title}}</a></li> +{{ end }} +</ul> +{{ end }} diff --git a/layouts/blog/list.rss.xml b/layouts/blog/list.rss.xml new file mode 100644 index 0000000..fe84c3f --- /dev/null +++ b/layouts/blog/list.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 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>Carbs Linux Blog</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>{{ with .Site.LanguageCode }} + <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} + <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} + <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} + <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} + <lastBuildDate>{{ .Date.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 }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} + <guid>{{ .Permalink }}</guid> + <description>{{ .Content | html }}</description> + </item> + {{ end }} + </channel> +</rss> diff --git a/layouts/blog/single.html b/layouts/blog/single.html new file mode 100644 index 0000000..6a9f636 --- /dev/null +++ b/layouts/blog/single.html @@ -0,0 +1,7 @@ +{{define "main"}} +<header> +<h1 class="title">{{.Title}}</h1> +<p class="subtitle">posted on {{.PublishDate.Format "Jan 02, 2006"}}</p> +</header> +{{ .Content }} +{{ end }} diff --git a/layouts/news/list.html b/layouts/news/list.html new file mode 100644 index 0000000..67eb4fb --- /dev/null +++ b/layouts/news/list.html @@ -0,0 +1,7 @@ +{{define "main"}} +<h1>News Index</h1> +{{ range .Pages }} +<h2><a href="{{.Permalink}}">{{.Date.Format "Jan 02, 2006"}}</a></h2> +<p>{{ .Content }}</p> +{{ end }} +{{ end }} diff --git a/layouts/news/list.txt b/layouts/news/list.txt new file mode 100644 index 0000000..ab0a732 --- /dev/null +++ b/layouts/news/list.txt @@ -0,0 +1,12 @@ +{{define "main"}} +NEWS INDEX +========== + +{{ range .Pages }} +{{.Date.Format "Jan 02, 2006"}} +------------------------------- + +{{ .RawContent }} + +{{ end }} +{{ end }} diff --git a/layouts/news/single.html b/layouts/news/single.html new file mode 100644 index 0000000..2a2d481 --- /dev/null +++ b/layouts/news/single.html @@ -0,0 +1,6 @@ +{{define "main"}} +<header> +<h2 class="title">{{.PublishDate.Format "Jan 02, 2006"}}</h2> +</header> +{{ .Content }} +{{ end }} diff --git a/layouts/news/single.txt b/layouts/news/single.txt new file mode 100644 index 0000000..e59d69f --- /dev/null +++ b/layouts/news/single.txt @@ -0,0 +1,6 @@ +{{define "main"}} +{{.PublishDate.Format "Jan 02, 2006"}} +============ + +{{ .RawContent }} +{{ end }} diff --git a/layouts/page/index.html b/layouts/page/index.html new file mode 100644 index 0000000..a8d5d04 --- /dev/null +++ b/layouts/page/index.html @@ -0,0 +1,16 @@ +{{define "main"}} +{{ .Content }} +<h2>Latest Blog Posts</h2> +<ul> + {{ range first 3 (where .Site.RegularPages.ByDate.Reverse "Section" "blog") }} + <li>{{.Date.Format "2006-02-01"}} | <a href="{{.Permalink}}">{{.Title}}</a></li> + {{ end }} +</ul> +<h2>News</h2> +<a href="{{"news/index.xml"|relURL}}">RSS Feed</a> | +<a href="{{"news"|relURL}}">See all news</a> +{{ range first 5 (where .Site.RegularPages.ByDate.Reverse "Section" "news") }} +<h3><a href="{{.Permalink}}">{{.Date.Format "Jan 02, 2006"}}</a></h3> +<p>{{ .Content }}</p> +{{ end }} +{{ end }} diff --git a/layouts/page/index.txt b/layouts/page/index.txt new file mode 100644 index 0000000..d2cdac2 --- /dev/null +++ b/layouts/page/index.txt @@ -0,0 +1,3 @@ +{{- define "main" -}} +{{- .RawContent}} +{{- end}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..e64836f --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,6 @@ +<div id="postamble" class="status"> +<footer> + <p>Linux® is a registered trademark of Linus Torvalds</p> + <p>Copyright © 2019-2021 Cem Keylan</p> +</footer> +</div> diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..7a5d194 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,12 @@ +<meta charset="utf-8"> +<style> +</style> +<link rel=icon href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACUlBMVEUKHisJHisJHioIHSoJHSoHHSkLHisSIS8bJTQjKDknKjsmKTsgJzcXIzINHy0VIjEzL0JaPld8TGuVVnikXIGsX4WvYYevYIeqXoSdWX2GUHBhQVw2MEMUIjAkKDleQFqWVnm1Y4vAZ5HCaJLCaJHBaJHAaJG2Y4uTVXdTO1QZJDQdJjZlQl2oXoPAZ5C/Z5C+Z4+ZV3pHNk0OIC1BNEmbWHy5ZIx1SWYcJTUQIC5gQVu0Y4qPVHVwR2O8Zo6+Zo+LUnNuRmNbP1hSO1NfQFp3SmgeJjYPIC5tRmK7ZY6QVHZQOlI3MESyYomHUHAYIzJbPlijW4BOOVETIjAHHSoLHyw2MEQ6MUaxYYgYJDNzSGWfWn4pKzwZJDOUVniFT28RIS9cP1g1L0NdP1mUVXghJzitYIYzLkFcP1liQVw9Mke5ZY0oKjsUIjGXV3oOHy0qKz1ZPldGNky9Zo+2ZIumXYJ4SmiKUXKBTm2VVnkWIzJpRGCgW39kQl2hW39nRF+aWHtwR2R9TGsMHyyCTm6OU3VvRmMaJDRWPFUtLD46MUVNOVCoXYOIUXGiW4BJN04rKz2KUnKDT25DNUtCNUoSITCMUnNsRmI+M0i4ZIxVPFR0SGZUPFQiKDiJUXJ5S2kfJjeZWHs7MkaqX4SYV3pMOE8LHiwoKjy3ZIw7MUZqRGBANEkrKz5KOE97S2qrX4WpXoSlXIG7ZY1rRWEzLkKwYYhYPVaSVXY4MEQyLkF6S2muYIecWXxWPVWNU3S6ZY23ZIt+TWxjQlxvR2NgQFv///+cltOiAAAAAWJLR0TFY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fUfBn4aoaCqrfN34zfO9sDe3GgJ0taUH/Oj8Kfg786XDY3R7IjVKWtqI8u9Zd0w0yYf/YbyvG41mgreo8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTktMTItMDNUMDY6NDU6NTIrMDA6MDDFY+wcAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE5LTEyLTAzVDA2OjQ1OjUyKzAwOjAwtD5UoAAAAABJRU5ErkJggg=='> +<link rel="stylesheet" href="/style.css" type="text/css" media="screen" /> +<link rel="alternate" type="application/rss+xml" href="https://carbslinux.org/news/index.xml" title="Carbs Linux News"> +<link rel="alternate" type="application/rss+xml" href="https://carbslinux.org/blog/index.xml" title="Carbs Linux Blog"> +<meta name="robots" content="index, follow" /> +<meta name="viewport" content="width=device-width, initial-scale=1" /> +<meta name="referrer" content="no-referrer"> +<meta name="description" content="A simple Linux distribution" /> +<title>{{.Title}} | Carbs Linux</title> diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html new file mode 100644 index 0000000..916e360 --- /dev/null +++ b/layouts/partials/navbar.html @@ -0,0 +1,15 @@ +<div id="preamble"> +<div id="titlebar"> + <a href="/" class=maintitle>Carbs Linux</a> +</div> +<nav id="navbar"> + <ul id=navbarlist> + <li><a href="/" title="Home Page">Home</a></li> + <li><a href="/blog/" title="Blog Posts">Blog</a></li> + <li><a href="/docs/" title="Documentation">Docs</a></li> + <li><a href="/sources/" title="Sources and Projects">Sources</a></li> + <li><a href="/install/" title="Installation Instructions">Installation</a></li> + <li><a href="/download/" title="Download Carbs Linux">Download</a></li> + </ul> +</nav> +</div> diff --git a/layouts/shortcodes/pkg.html b/layouts/shortcodes/pkg.html new file mode 100644 index 0000000..0c2eeff --- /dev/null +++ b/layouts/shortcodes/pkg.html @@ -0,0 +1 @@ +<a href="https://git.carbslinux.org/repository/tree/{{ index .Params 0 }}">{{ or (index .Params 1 ) (index .Params 0 | path.Base)}}</a> diff --git a/layouts/shortcodes/pkg.txt b/layouts/shortcodes/pkg.txt new file mode 100644 index 0000000..148dca4 --- /dev/null +++ b/layouts/shortcodes/pkg.txt @@ -0,0 +1 @@ +{{index .Params 0 | path.Base}} |