From 47c1289ff658a5aec71635d79ffe30bb29a07876 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 11 May 2023 19:38:03 +0100 Subject: Add content --- layouts/_default/list.html | 17 +++++++++++++++++ layouts/_default/single.html | 30 ++++++++++++++++++++++++++++++ layouts/partials/head_custom.html | 19 +++++++++++++++++++ layouts/partials/post-element.html | 4 ++++ layouts/shortcodes/transclude-1.html | 4 ++++ layouts/shortcodes/transclude-2.html | 4 ++++ layouts/shortcodes/transclude-3.html | 4 ++++ 7 files changed, 82 insertions(+) create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/partials/head_custom.html create mode 100644 layouts/partials/post-element.html create mode 100644 layouts/shortcodes/transclude-1.html create mode 100644 layouts/shortcodes/transclude-2.html create mode 100644 layouts/shortcodes/transclude-3.html (limited to 'layouts') diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..744f390 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,17 @@ +{{ partial "header.html" . }} + +{{if not .IsHome }} +

{{ .Title | markdownify }}

+{{ end }} + +{{ .Content }} + + + +{{ partial "footer.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..f3953af --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,30 @@ +{{ partial "header.html" . }} +
+

{{ .Title | markdownify }}

+ +{{ if (gt .Params.date 0) }}

{{ .Date.Format "2006/01/02" }}

{{ end }} +
+ +
+{{ .Content }} +
+ + {{ if (.Page.Param "backlinks") }} +

Referenced from

+ {{ range (.Page.Param "backlinks") }} + {{ with ($.Site.GetPage (printf "/zettel/%s" .)) }} + {{ partial "post-element.html" . }} + {{- end }} + {{ end }} + {{ end }} + + {{ if (.Page.Param "forwardlinks") }} +

Links to

+ {{ range (.Page.Param "forwardlinks") }} + {{ with ($.Site.GetPage (printf "/zettel/%s" .)) }} + {{ partial "post-element.html" . }} + {{- end }} + {{ end }} + {{ end }} + +{{ partial "footer.html" . }} diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html new file mode 100644 index 0000000..47ba699 --- /dev/null +++ b/layouts/partials/head_custom.html @@ -0,0 +1,19 @@ + + + + diff --git a/layouts/partials/post-element.html b/layouts/partials/post-element.html new file mode 100644 index 0000000..b45a1e1 --- /dev/null +++ b/layouts/partials/post-element.html @@ -0,0 +1,4 @@ +
  • + {{ .Date.Format "2006/01/02" }} + {{ .Title | markdownify }} +
  • diff --git a/layouts/shortcodes/transclude-1.html b/layouts/shortcodes/transclude-1.html new file mode 100644 index 0000000..80a24da --- /dev/null +++ b/layouts/shortcodes/transclude-1.html @@ -0,0 +1,4 @@ +
    +

    {{ .Get "zettel" }}: {{ with ($.Site.GetPage (printf "/zettel/%s" (.Get "zettel"))) }}{{ .Title | markdownify }}{{ end }}

    + {{ .Inner | markdownify }} +
    diff --git a/layouts/shortcodes/transclude-2.html b/layouts/shortcodes/transclude-2.html new file mode 100644 index 0000000..a63de87 --- /dev/null +++ b/layouts/shortcodes/transclude-2.html @@ -0,0 +1,4 @@ +
    +

    {{ .Get "zettel" }}: {{ with ($.Site.GetPage (printf "/zettel/%s" (.Get "zettel"))) }}{{ .Title | markdownify }}{{ end }}

    + {{ .Inner | markdownify }} +
    diff --git a/layouts/shortcodes/transclude-3.html b/layouts/shortcodes/transclude-3.html new file mode 100644 index 0000000..1e43c85 --- /dev/null +++ b/layouts/shortcodes/transclude-3.html @@ -0,0 +1,4 @@ +
    +

    {{ .Get "zettel" }}: {{ with ($.Site.GetPage (printf "/zettel/%s" (.Get "zettel"))) }}{{ .Title | markdownify }}{{ end }}

    + {{ .Inner | markdownify }} +
    -- cgit