summaryrefslogtreecommitdiff
path: root/layouts/notes
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/notes')
-rw-r--r--layouts/notes/list.html41
-rw-r--r--layouts/notes/single.html20
2 files changed, 61 insertions, 0 deletions
diff --git a/layouts/notes/list.html b/layouts/notes/list.html
new file mode 100644
index 0000000..86deddb
--- /dev/null
+++ b/layouts/notes/list.html
@@ -0,0 +1,41 @@
+{{ define "main" }}
+ <article lang="{{ default "en" .Params.lang }}">
+ <header class="document-header">
+ <h1>{{ .Title }}</h1>
+ {{ partial "document-view.html" . }}
+ </header>
+ {{ .Content }}
+ {{- if eq .File.Path "notes/_index.md" }}
+ {{- with .RegularPages.ByTitle }}
+ <section aria-labelledby="standalone-title">
+ <h2 id="standalone-title">STANDALONE NOTES</h2>
+ <ul class="document-list">
+ {{- range . }}
+ <li><time datetime="{{ time.Format "2006-01-02" .Params.updated }}">{{ time.Format "2006-01-02" .Params.updated }}</time> <a href="{{ .RelPermalink }}" lang="{{ .Params.lang }}">{{ .LinkTitle }}</a></li>
+ {{- end }}
+ </ul>
+ </section>
+ {{- end }}
+ {{- with .Sections.ByTitle }}
+ <section aria-labelledby="series-title">
+ <h2 id="series-title">SERIES</h2>
+ <ul class="document-list">
+ {{- range . }}
+ <li><a href="{{ .RelPermalink }}" lang="{{ .Params.lang }}">{{ .LinkTitle }}</a>{{ with .Params.description }} — {{ . }}{{ end }}</li>
+ {{- end }}
+ </ul>
+ </section>
+ {{- end }}
+ {{- else }}
+ <ol class="document-list series-chapter-list">
+ {{- range $index, $page := .RegularPages.ByWeight }}
+ <li>
+ <span class="chapter-number">{{ printf "%02d" (add $index 1) }}</span>
+ <a href="{{ $page.RelPermalink }}" lang="{{ $page.Params.lang }}">{{ $page.LinkTitle }}</a>
+ <span class="list-updated">updated {{ time.Format "2006-01-02" $page.Params.updated }}</span>
+ </li>
+ {{- end }}
+ </ol>
+ {{- end }}
+ </article>
+{{ end }}
diff --git a/layouts/notes/single.html b/layouts/notes/single.html
new file mode 100644
index 0000000..ec3545a
--- /dev/null
+++ b/layouts/notes/single.html
@@ -0,0 +1,20 @@
+{{ define "main" }}
+ <article lang="{{ .Params.lang }}">
+ <header class="document-header">
+ <p class="document-path">{{ .RelPermalink }}</p>
+ <h1>{{ .Title }}</h1>
+ {{- with .Params.series }}{{ partial "series-nav.html" (dict "page" $ "mode" "position") }}{{ end }}
+ <dl class="document-meta">
+ {{- with .Params.created }}
+ <div><dt>created</dt><dd><time datetime="{{ time.Format "2006-01-02" . }}">{{ time.Format "2006-01-02" . }}</time></dd></div>
+ {{- end }}
+ <div><dt>updated</dt><dd><time datetime="{{ time.Format "2006-01-02" .Params.updated }}">{{ time.Format "2006-01-02" .Params.updated }}</time></dd></div>
+ <div><dt>license</dt><dd>{{ .Params.license }}</dd></div>
+ </dl>
+ {{ partial "document-view.html" . }}
+ </header>
+ {{ partial "toc.html" . }}
+ {{ .Content }}
+ {{- with .Params.series }}{{ partial "series-nav.html" (dict "page" $ "mode" "navigation") }}{{ end }}
+ </article>
+{{ end }}