From cc1220bfd794dff1fc28bd39cafb63c4b1093cf8 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Appel Date: Mon, 25 Dec 2023 17:17:21 -0500 Subject: rewrite layouts --- layouts/partials/adaptive_details.html | 26 ++++++++++++++++ layouts/partials/card.html | 53 +++++++++++++++++++++++++++++++++ layouts/partials/card/date.html | 13 ++++++++ layouts/partials/card/full_summary.html | 7 +++++ layouts/partials/categories.html | 5 ++++ layouts/partials/footer.html | 2 ++ layouts/partials/header.html | 10 +++++++ layouts/partials/katex.html | 22 ++++++++++++++ layouts/partials/links/email.html | 5 ++++ layouts/partials/links/github.html | 5 ++++ layouts/partials/links/link.html | 6 ++++ layouts/partials/links/linkedin.html | 5 ++++ layouts/partials/links/site.html | 5 ++++ layouts/partials/meta-tag_nav.html | 13 ++++++++ layouts/partials/section_preview.html | 4 +++ layouts/partials/tags.html | 5 ++++ 16 files changed, 186 insertions(+) create mode 100644 layouts/partials/adaptive_details.html create mode 100644 layouts/partials/card.html create mode 100644 layouts/partials/card/date.html create mode 100644 layouts/partials/card/full_summary.html create mode 100644 layouts/partials/categories.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/katex.html create mode 100644 layouts/partials/links/email.html create mode 100644 layouts/partials/links/github.html create mode 100644 layouts/partials/links/link.html create mode 100644 layouts/partials/links/linkedin.html create mode 100644 layouts/partials/links/site.html create mode 100644 layouts/partials/meta-tag_nav.html create mode 100644 layouts/partials/section_preview.html create mode 100644 layouts/partials/tags.html (limited to 'layouts/partials') diff --git a/layouts/partials/adaptive_details.html b/layouts/partials/adaptive_details.html new file mode 100644 index 0000000..2180325 --- /dev/null +++ b/layouts/partials/adaptive_details.html @@ -0,0 +1,26 @@ + diff --git a/layouts/partials/card.html b/layouts/partials/card.html new file mode 100644 index 0000000..c451066 --- /dev/null +++ b/layouts/partials/card.html @@ -0,0 +1,53 @@ +{{ $cardConfig := .Scratch.Get "cardConfig" }} +
+ +
  • +
    +

    {{ .LinkTitle }}

    +

    {{ partial "card/date.html" . }}

    + {{ if $cardConfig.fullSummary }} + {{ partial "card/full_summary.html" . }} + {{ else }} +

    {{ .Summary }}

    + {{ end }} +
    + + {{ with .Resources.GetMatch .Params.thumbnail }} + {{ $image := .Fit "800x500" }} +
    + {{ .Name }} +
    + {{ else }} + {{ with .Resources.GetMatch "thumbnail.*" }} + {{ $image := .Fit "400x400" }} +
    + {{ $image.Name }} +
    + {{ end }} + {{ end }} +
  • +
    +{{ if $cardConfig.showMeta }} +
    + {{ with .Params.github }} + {{ partial "links/github.html" . }} + {{ end }} + {{ with .Params.link }} + {{ partial "links/link.html" . }} + {{ end }} + {{ with .Params.site }} + {{ partial "links/site.html" . }} + {{ end }} + {{ $hasMetaAttrs := or $cardConfig.showCategories $cardConfig.showTags }} + {{ if $hasMetaAttrs }} +
    + {{ if $cardConfig.showCategories }} + {{ partial "categories.html" . }} + {{ end }} + {{ if $cardConfig.showTags }} + {{ partial "tags.html" . }} + {{ end }} +
    + {{ end }} +{{ end }} +
    diff --git a/layouts/partials/card/date.html b/layouts/partials/card/date.html new file mode 100644 index 0000000..bcf1851 --- /dev/null +++ b/layouts/partials/card/date.html @@ -0,0 +1,13 @@ +{{ if .Params.start_date }} + {{ time.Format "January 2006" .Params.start_date }} + — + {{ if .Params.end_date }} + {{ time.Format "January 2006" .Params.end_date }} + {{ else }} + Present + {{ end }} +{{ else }} + {{ if .Date }} + {{ .Date.Format "January 2006" }} + {{ end }} +{{ end }} diff --git a/layouts/partials/card/full_summary.html b/layouts/partials/card/full_summary.html new file mode 100644 index 0000000..1230df6 --- /dev/null +++ b/layouts/partials/card/full_summary.html @@ -0,0 +1,7 @@ +
    + {{ .Params.summary }} + {{ if .Params.abstract }} +

    Abstract

    +

    {{ .Params.abstract }}

    + {{ end }} +
    diff --git a/layouts/partials/categories.html b/layouts/partials/categories.html new file mode 100644 index 0000000..fa48e5b --- /dev/null +++ b/layouts/partials/categories.html @@ -0,0 +1,5 @@ +{{ with .Params.categories }} + {{ range . }} + {{ title . }} + {{ end }} +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..1057cac --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,2 @@ + +

    © {{ now.Format "2006" }} JP Appel

    diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..0128c2f --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,10 @@ + + diff --git a/layouts/partials/katex.html b/layouts/partials/katex.html new file mode 100644 index 0000000..e0468d2 --- /dev/null +++ b/layouts/partials/katex.html @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/layouts/partials/links/email.html b/layouts/partials/links/email.html new file mode 100644 index 0000000..87ddc8a --- /dev/null +++ b/layouts/partials/links/email.html @@ -0,0 +1,5 @@ + + + diff --git a/layouts/partials/links/github.html b/layouts/partials/links/github.html new file mode 100644 index 0000000..9cb2dbb --- /dev/null +++ b/layouts/partials/links/github.html @@ -0,0 +1,5 @@ + + + diff --git a/layouts/partials/links/link.html b/layouts/partials/links/link.html new file mode 100644 index 0000000..f45c0b9 --- /dev/null +++ b/layouts/partials/links/link.html @@ -0,0 +1,6 @@ + + + diff --git a/layouts/partials/links/linkedin.html b/layouts/partials/links/linkedin.html new file mode 100644 index 0000000..86efb09 --- /dev/null +++ b/layouts/partials/links/linkedin.html @@ -0,0 +1,5 @@ + + + diff --git a/layouts/partials/links/site.html b/layouts/partials/links/site.html new file mode 100644 index 0000000..58787ad --- /dev/null +++ b/layouts/partials/links/site.html @@ -0,0 +1,5 @@ + + + diff --git a/layouts/partials/meta-tag_nav.html b/layouts/partials/meta-tag_nav.html new file mode 100644 index 0000000..8e68c5c --- /dev/null +++ b/layouts/partials/meta-tag_nav.html @@ -0,0 +1,13 @@ + + diff --git a/layouts/partials/section_preview.html b/layouts/partials/section_preview.html new file mode 100644 index 0000000..c973b06 --- /dev/null +++ b/layouts/partials/section_preview.html @@ -0,0 +1,4 @@ +
  • + {{ .Title }} +

    {{ .Summary }}

    +
  • diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html new file mode 100644 index 0000000..9ca38af --- /dev/null +++ b/layouts/partials/tags.html @@ -0,0 +1,5 @@ +{{ with .Params.tags }} + {{ range . }} + {{ title . }} + {{ end }} +{{ end }} -- cgit v1.2.3