Initial commit
This commit is contained in:
67
layouts/_default/baseof.html
Normal file
67
layouts/_default/baseof.html
Normal file
@@ -0,0 +1,67 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{{ if .Site.Author.name }}
|
||||
<meta content="{{ .Site.Author.name }}" name="author">
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
<meta content="{{ .Description }}" name="description">
|
||||
{{ end }}
|
||||
{{ if or .Keywords .Params.tags .Params.categories }}
|
||||
<meta content="{{ delimit (sort (union (union .Keywords .Params.tags) .Params.categories)) `, ` }}" name="keywords">
|
||||
{{ end }}
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ if and (and .Title .Site.Title) (or (not (eq .Title .Site.Title)) (not .IsHome)) }}
|
||||
<title>{{ .Title | markdownify | plainify }} · {{ .Site.Title | markdownify | plainify }}</title>
|
||||
{{ else if .Title }}
|
||||
<title>{{ .Title | markdownify | plainify }}</title>
|
||||
{{ else if .Site.Title }}
|
||||
<title>{{ .Site.Title | markdownify | plainify }}</title>
|
||||
{{ end }}
|
||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" rel="stylesheet">
|
||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.9.1/font/bootstrap-icons.css" rel="stylesheet">
|
||||
{{ range .AlternativeOutputFormats }}
|
||||
<link href="{{ .Permalink }}" rel="{{ .Rel }}" title="{{ $.Site.Title }}" type="{{ .MediaType.Type }}">
|
||||
{{ end }}
|
||||
{{ if templates.Exists "partials/head.html" }}
|
||||
{{ partial "head" . }}
|
||||
{{ end }}
|
||||
</head>
|
||||
<body class="d-flex flex-column">
|
||||
<div class="container flex-fill">
|
||||
<header>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<nav class="d-flex justify-content-center my-3">
|
||||
<ul class="nav nav-pills">
|
||||
{{ $p := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ $active := or (and (eq .URL `/`) (eq $p.RelPermalink `/`)) (and (ne .URL `/`) (hasPrefix $p.RelPermalink .URL)) }}
|
||||
<li class="nav-item"><a href="{{ .URL }}" class="nav-link{{if $active }} active{{ end }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
<footer>
|
||||
<div class="pb-3 row">
|
||||
<div class="col text-center text-muted">{{ .Site.Copyright | markdownify }}</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script crossorigin="anonymous" integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa" src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
{{ if .Site.GoogleAnalytics }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
||||
{{ if templates.Exists "partials/body.html" }}
|
||||
{{ partial "body" . }}
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
72
layouts/_default/list.html
Normal file
72
layouts/_default/list.html
Normal file
@@ -0,0 +1,72 @@
|
||||
{{ define "main" }}
|
||||
{{ if not (or .Title .Description .Content .Pages) }}
|
||||
<section>
|
||||
<h1 class="display-5 fw-bold text-center">Nothing Here</h1>
|
||||
</section>
|
||||
{{ else }}
|
||||
<section>
|
||||
{{ if or .Title .Description }}
|
||||
<header>
|
||||
<div class="row text-center justify-content-center">
|
||||
<div class="col" style="max-width:100ch">
|
||||
{{ if .Title }}
|
||||
<h1 class="display-5 fw-bold">
|
||||
{{ if .Params.link }}
|
||||
<a href="{{ .Params.link }}">{{ .Title | markdownify }}</a>
|
||||
{{ else }}
|
||||
{{ .Title | markdownify }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
<p class="lead">{{ .Description | markdownify }}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ if .Content }}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="mx-auto" style="max-width:66ch">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if .Pages }}
|
||||
{{ $p := .Paginate (.Pages.ByDate.Reverse.GroupByDate "January 2006") }}
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="mx-auto text-center" style="max-width:100ch">
|
||||
{{ range $p.PageGroups }}
|
||||
<h5>{{ .Key }}</h5>
|
||||
{{ range .Pages }}
|
||||
<p>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||
{{ if .Description }}
|
||||
<br />{{ .Description | markdownify }}
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ if or $p.HasPrev $p.HasNext }}
|
||||
<footer>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="d-flex justify-content-center pt-3">
|
||||
{{ partial "pagination" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
42
layouts/_default/single.html
Normal file
42
layouts/_default/single.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{{ define "main" }}
|
||||
{{ if not (or .Title .Description .PublishDate .Content) }}
|
||||
<section>
|
||||
<h1 class="display-5 fw-bold text-center">Nothing Here</h1>
|
||||
</section>
|
||||
{{ else }}
|
||||
<article>
|
||||
{{ if or .Title .Description .PublishDate }}
|
||||
<header>
|
||||
<div class="row text-center justify-content-center">
|
||||
<div class="col" style="max-width:100ch">
|
||||
{{ if .Title }}
|
||||
<h1 class="display-5 fw-bold">
|
||||
{{ if .Params.link }}
|
||||
<a href="{{ .Params.link }}">{{ .Title | markdownify }}</a>
|
||||
{{ else }}
|
||||
{{ .Title | markdownify }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
<p class="lead">{{ .Description | markdownify }}</p>
|
||||
{{ end }}
|
||||
{{ if .PublishDate }}
|
||||
<p class="text-muted"><time datetime="{{ .PublishDate.Format `2006-01-02` }}">{{ .PublishDate.Format "January 2, 2006" }}</time></p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ if .Content }}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="mx-auto" style="max-width:66ch">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
40
layouts/_default/taxonomy.html
Normal file
40
layouts/_default/taxonomy.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{{ define "main" }}
|
||||
{{ if not (or .Title .Pages) }}
|
||||
<section>
|
||||
<h1 class="display-5 fw-bold text-center">Nothing Here</h1>
|
||||
</section>
|
||||
{{ else }}
|
||||
<section>
|
||||
{{ if .Title }}
|
||||
<header>
|
||||
<div class="row text-center">
|
||||
<div class="col">
|
||||
<h1 class="display-5 fw-bold" style="max-width:100ch">
|
||||
{{ if .Params.link }}
|
||||
<a href="{{ .Params.link }}">{{ .Title | markdownify }}</a>
|
||||
{{ else }}
|
||||
{{ .Title | markdownify }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ if .Pages }}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="mx-auto text-center" style="max-width:66ch">
|
||||
<ul class="list-inline">
|
||||
{{ range (sort .Pages "Title") }}
|
||||
<li class="list-inline-item">
|
||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
Reference in New Issue
Block a user