Cleaning up layouts

This commit is contained in:
Brandon Rozek 2023-01-05 00:35:01 -05:00
parent 7b5e4f3aa4
commit 0247538cec
No known key found for this signature in database
GPG key ID: 26E457DA82C9F480
16 changed files with 8 additions and 76 deletions

View file

@ -16,7 +16,7 @@
{{ .Scratch.Set "obs" $dataJ }}
{{ .Scratch.Set "obs_url" .Permalink }}
{{ partial "inat.html" . }}
{{ partial "external/inat.html" . }}
{{ end }}
{{ end }}
</main>

View file

@ -62,7 +62,7 @@
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/schema.html" . -}}
<!-- {{- template "_internal/twitter_cards.html" . -}} -->
{{- partial "twitter_cards.html" . -}}
{{- partial "external/twitter_cards.html" . -}}
<script src="https://polyfill.io/v3/polyfill.js"></script>

View file

@ -1,2 +1,2 @@
{{ .Scratch.Set "gpxFile" (.Get 0) }}
{{ partial "gpxstudio.html" . }}
{{ partial "external/gpxstudio.html" . }}

View file

@ -4,4 +4,4 @@
{{ $dataJ := getJSON $api_url }}
{{ .Scratch.Set "toot" $dataJ }}
{{ partial "toot.html" . }}
{{ partial "external/toot.html" . }}

View file

@ -3,4 +3,4 @@
{{ $dataJ := getJSON $url }}
{{ .Scratch.Set "toot" $dataJ }}
{{ partial "toot.html" . }}
{{ partial "external/toot.html" . }}

View file

@ -1,7 +0,0 @@
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}
<body>
{{- block "main" . -}}{{- end -}}
</body>
</html>

View file

@ -1,10 +0,0 @@
[{{ range $index, $page := .Pages }}{{ if ne $index 0 }},{{ end }}
{
"ref": "{{ $page.Permalink }}",
"title": {{ $page.Title | jsonify }},
"section": "{{ $page.Section }}",
"tags": {{ $page.Params.tags | jsonify }},
"date" : {{ $page.Date.Format "2006.01.02" | jsonify }},
"body": {{ $page.Plain | jsonify }}
}
{{ end }}]

View file

@ -1,25 +0,0 @@
{{ define "main"}}
<h1 class='title'>{{ .Title }}</h1>
{{ partial "header.html" . }}
<!-- date -->
{{ if not .Date.IsZero }}
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
{{ end }}
<!-- tags -->
<div id="tags">
<ul>
{{ range .Param "tags" }}
{{ $name := . }}
{{ with $.Site.GetPage (printf "/tags/%s" ($name | urlize)) }}
<li><a href="{{ .Permalink }}">{{ $name }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
<!-- content -->
<div class="e-content">
{{ .Content }}
</div>
{{ partial "footer.html" . }}
{{ end }}

View file

@ -1,26 +0,0 @@
{{ define "main"}}
{{ partial "header.html" . }}
<main>
{{ $posts := where site.RegularPages "Type" "blog" }}
{{ $postCount := len $posts }}
{{ range last 1 $posts }}
{{ $tags := .Site.Taxonomies.tags }}
<div class='bloglist-teaser block-center'>
Here you'll find <strong>{{ $postCount | lang.NumFmt 0 }} posts</strong>
written spanning <strong>{{ len $tags }} topics</strong>.
</div>
{{ end }}
<br/>
<div class="tags tags-all">
<ul>
{{ range .Site.Taxonomies.tags.ByCount }}
<li><a href="{{ .Page.Permalink }}">{{ .Page.Title }} ({{ .Count }})</a></li>
{{ end }}
</ul>
</div>
<div class="e-content">
{{ .Content }}
</div>
</main>
{{ partial "footer.html" . }}
{{ end }}

View file

@ -21,7 +21,7 @@
}}
{{ .Scratch.Set "toot" $dataJ }}
{{ partial "toot.html" . }}
{{ partial "external/toot.html" . }}
{{ end }}
{{ end }}
</main>

View file

@ -18,7 +18,7 @@
}}
{{ .Scratch.Set "toot" $dataJ }}
{{ partial "toot.html" . }}
{{ partial "external/toot.html" . }}
</main>

View file

@ -18,7 +18,7 @@
<!-- content -->
<div class="e-content">
{{ .Scratch.Set "gpxFile" .Params.gpx }}
{{ partial "gpxstudio.html" . }}
{{ partial "external/gpxstudio.html" . }}
{{ .Content }}
</div>
</article>