From 69c9a476a926cae3ddfba8eaad1e66965cfabc13 Mon Sep 17 00:00:00 2001 From: "kebler.net" Date: Tue, 26 Apr 2022 19:56:47 -0700 Subject: [PATCH] added updated, rawhtml and file shortcodes --- layouts/shortcodes/file.html | 5 +++++ layouts/shortcodes/rawhtml.html | 2 ++ layouts/shortcodes/updated.html | 6 ++++++ static/css/{custom.css => uci-shortcodes-custom.css} | 1 + 4 files changed, 14 insertions(+) create mode 100644 layouts/shortcodes/file.html create mode 100644 layouts/shortcodes/rawhtml.html create mode 100644 layouts/shortcodes/updated.html rename static/css/{custom.css => uci-shortcodes-custom.css} (98%) diff --git a/layouts/shortcodes/file.html b/layouts/shortcodes/file.html new file mode 100644 index 0000000..1deb478 --- /dev/null +++ b/layouts/shortcodes/file.html @@ -0,0 +1,5 @@ +{{ $path := "/files/" }} +{{ with $.Site.Params.filespath }} {{ $path := ( . ) }}{{ end }} +{{ $numOfParams := ( len .Params ) }} +{{ if eq $numOfParams 1 }} {{ .Get 0 }}{{ end }} +{{ if eq $numOfParams 2 }} {{ .Get 1 }} {{ end }} \ No newline at end of file diff --git a/layouts/shortcodes/rawhtml.html b/layouts/shortcodes/rawhtml.html new file mode 100644 index 0000000..520ec17 --- /dev/null +++ b/layouts/shortcodes/rawhtml.html @@ -0,0 +1,2 @@ + +{{.Inner}} \ No newline at end of file diff --git a/layouts/shortcodes/updated.html b/layouts/shortcodes/updated.html new file mode 100644 index 0000000..b6269f6 --- /dev/null +++ b/layouts/shortcodes/updated.html @@ -0,0 +1,6 @@ +
+{{/* {{ now | .Format " Jan 1 " }} */}} +{{ $now := (now) }} +site updated: {{ $now | time.Format ":date_long" }}@{{ $now | time.Format ":time_short" }}
+{{ with $.Site.Params.status }} status: {{ . }}{{ end }}
+
diff --git a/static/css/custom.css b/static/css/uci-shortcodes-custom.css similarity index 98% rename from static/css/custom.css rename to static/css/uci-shortcodes-custom.css index 08aab88..3adfb5e 100644 --- a/static/css/custom.css +++ b/static/css/uci-shortcodes-custom.css @@ -3,3 +3,4 @@ font-size: 2em; font-weight: bold; } +