Move all layouts to platters theme

This commit is contained in:
Eryn Wells 2024-10-07 21:39:17 -07:00
parent de8101efed
commit 66adceaf24
91 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,3 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
<a href="#{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</a>
</h{{ .Level }}>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="{{ site.Language.Lang }}">
{{ partial "head.html" . }}
<body>
{{ block "body" . -}}
{{- block "before" . -}}{{- end -}}
{{- block "header" . -}}{{ partial "header.html" .}}{{- end -}}
<main class="{{ .Type }} {{ .Kind }} {{ if gt (len .Pages) 1 }}list{{ else }}page{{ end }}">
{{ block "main" . }}{{ end }}
</main>
{{- block "footer" . -}}
{{ partial "footer.html" . }}
{{- end -}}
{{- end -}}
{{- partial "development/page_info.html" . -}}
</body>
{{ with partial "resources/root_css.html" . -}}
{{ range . }}<link rel="stylesheet" as="style" href="{{ .Permalink }}">{{ end }}
{{- end -}}
{{- with partial "resources/section_css.html" . -}}
{{ range . }}<link rel="stylesheet" as="style" href="{{ .RelPermalink }}">{{ end }}
{{- end -}}
{{- with partial "resources/page_css.html" . -}}
{{ range . }}<link rel="stylesheet" as="style" href="{{ .RelPermalink }}">{{ end }}
{{- end -}}
{{ block "styles" . }}{{ end }}
{{ block "scripts" . }}{{ end }}
{{- with partial "resources/site_js.html" . -}}
<script type="module" src="{{ .Permalink }}"></script>
{{ end }}
{{ if .HasShortcode "ruby" }}
{{ with partial "resources/script.html" "ruby_switch" }}
<script type="module" src="{{ .Permalink }}"></script>
{{ end }}
{{ end }}
</html>

View file

@ -0,0 +1,37 @@
{{ define "header" }}
{{ partial "header.html" . }}
{{ end }}
{{ define "main" }}
<header class="page">
<h1>{{ .Title }}</h1>
</header>
{{- $pagesByTag := dict -}}
{{- range $page := .Pages }}
{{- range $tag := .GetTerms "tags" -}}
{{- $tagName := $tag.Name -}}
{{- if not (in $pagesByTag $tagName) -}}
{{- $pagesByTag = merge $pagesByTag (dict $tagName (slice $page)) -}}
{{- else -}}
{{- $pagesForTag := index $pagesByTag $tagName -}}
{{- $pagesForTag = $pagesForTag | append $page -}}
{{- $pagesByTag = merge $pagesByTag (dict $tagName $pagesForTag) -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{ range $tag, $pages := $pagesByTag }}
<h3>{{ $tag }}</h3>
<ul>
{{- range $pages -}}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{- end -}}
</ul>
{{ end }}
{{ end }}
{{ define "footer" }}
{{ partial "footer.html" . }}
{{ end }}

View file

@ -0,0 +1,21 @@
<article class="post">
<header>
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "Jan 2, 2006" }}</time>
<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
</header>
{{ if .Description }}
<p>{{ .Description }}</p>
{{ else if lt .WordCount 110 }}
{{ .Content }}
{{ else }}
{{ if not .Draft }}
{{ warnf "Post \"%s\" doesn't have a description or content suitable for the blog list" .Title }}
{{ end }}
<p>{{ .WordCount }} words</p>
{{ end }}
{{ partial "footer_tags.html" . }}
{{ partial "development/draft_tag.html" . }}
</article>

View file

@ -0,0 +1,4 @@
{{/*
Intentionally empty to stop pages that shouldn't be included in the RSS feed
from being rendered with the default RSS template.
*/}}

View file

@ -0,0 +1,11 @@
{{ define "main" }}
{{ partial "single_main.html" . }}
{{ end }}
{{ define "styles" }}
{{ partial "single_styles.html" . }}
{{ end }}
{{ define "scripts" }}
{{ partial "single_scripts.html" . }}
{{ end }}

View file

@ -0,0 +1,4 @@
{
"title": "{{ .Title }}",
"main": "{{ partial `single_main.html` . }}"
}

View file

@ -0,0 +1,31 @@
{{ define "header" }}
{{ partial "header.html" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
</header>
{{ partial "ruby_controls.html" . }}
{{- $hasContent := false -}}
{{ with .Content }}
{{- $hasContent = true -}}
{{ . }}
{{ end }}
{{ if .Params.posts | default true }}
{{ if $hasContent }}
<h2>Posts</h2>
{{ end }}
{{- range .Pages -}}
{{ .Render "li_grid_with_date" }}
{{- end -}}
{{ end }}
{{ end }}
{{ define "footer" }}
{{ partial "footer.html" . }}
{{ end }}

View file

@ -0,0 +1,25 @@
{{ define "header" }}
{{ partial "header.html" . }}
{{ end }}
{{ define "main" }}
<header class="page">
<h1>{{ .Title }}</h1>
</header>
{{ .Content }}
{{- range .Data.Terms.Alphabetical -}}
<h2>{{ .Name | title }}</h2>
{{- range .WeightedPages -}}
{{ if or (not .Draft) (not hugo.IsProduction) }}
{{ .Render "li_grid_with_date" }}
{{ end }}
{{- end -}}
{{- end -}}
{{ end }}
{{ define "footer" }}
{{ partial "footer.html" . }}
{{ end }}