Copy/pasta the new theme tutorial

This commit is contained in:
Luke Murphy 2021-01-09 19:24:31 +01:00
parent c028759e5d
commit ca20407cbc
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
7 changed files with 57 additions and 0 deletions

View File

@ -2,3 +2,19 @@ baseURL = "https://cloud.autonomic.zone"
languageCode = "en-gb"
title = "The Cooperative Cloud"
theme = "cloud.autonomic.zone"
[menu]
[[menu.main]]
name = "Home"
pre = "home"
url = "/"
weight = 1
[[menu.main]]
name = "Posts"
pre = "pen-tool"
url = "/posts/"
weight = 2
[[menu.main]]
name = "Tags"
pre = "tag"
url = "/tags/"
weight = 3

View File

@ -0,0 +1,12 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ range .Pages.ByPublishDate.Reverse }}
<p>
<h3><a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
{{ partial "metadata.html" . }}
<a class="summary" href="{{ .RelPermalink }}">
<p>{{ .Summary }}</p>
</a>
</p>
{{ end }}
{{ end }}

View File

@ -0,0 +1,6 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ partial "metadata.html" . }}
<br><br>
{{ .Content }}
{{ end }}

View File

@ -0,0 +1,5 @@
{{ define "main" }}
<div id="home-jumbotron" class="jumbotron text-center">
<h1 class="title">{{ .Site.Title }}</h1>
</div>
{{ end }}

View File

@ -0,0 +1,3 @@
<p class="footer text-center">
Copyright (c) {{ now.Format "2021"}} Autonomic Cooperative
</p>

View File

@ -0,0 +1,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ $title := print .Site.Title " | " .Title }}
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
<title>{{ $title }}</title>
</head>

View File

@ -0,0 +1,8 @@
<div id="nav-border" class="container">
<nav id="nav" class="nav justify-content-center">
{{ range .Site.Menus.main }}
{{ $text := print .Name | safeHTML }}
{{ $text }}
{{ end }}
</nav>
</div>