diff options
12 files changed, 31 insertions, 30 deletions
diff --git a/themes/default/layouts/_default/_markup/render-codeblock.html b/themes/default/layouts/_default/_markup/render-codeblock.html index 1555553..f5c0e13 100644 --- a/themes/default/layouts/_default/_markup/render-codeblock.html +++ b/themes/default/layouts/_default/_markup/render-codeblock.html @@ -7,7 +7,7 @@ {{ .Type }} </language-label> <button> - {{ safeHTML (readFile "static/icons/feather/copy.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/copy.svg")) }} <span>Copy</span> </button> </header> diff --git a/themes/default/layouts/_default/home.rss-style.xsl b/themes/default/layouts/_default/home.rss-style.xsl index 7d3fc96..b537d38 100644 --- a/themes/default/layouts/_default/home.rss-style.xsl +++ b/themes/default/layouts/_default/home.rss-style.xsl @@ -23,7 +23,7 @@ <nav> <icon-button> <a id="back" href="/"> - {{ safeHTML (readFile "static/icons/feather/arrow-left.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/arrow-left.svg")) }} <small>Back</small> </a> </icon-button> @@ -36,7 +36,7 @@ <icon-navigator hidden=""> <icon-button> <a id="nav-middle-home" href="/"> - {{ safeHTML (readFile "static/icons/feather/home.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/home.svg")) }} <small>Home</small> </a> </icon-button> @@ -45,7 +45,7 @@ <icon-navigator hidden=""> <icon-button> <a id="nav-middle-tag" href="/tags/"> - {{ safeHTML (readFile "static/icons/feather/tag.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/tag.svg")) }} <small>Tags</small> </a> </icon-button> @@ -54,7 +54,7 @@ <icon-navigator hidden=""> <icon-button> <a id="nav-middle-clock" href="/archives/messages/"> - {{ safeHTML (readFile "static/icons/tabler/clock.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/tabler/clock.svg")) }} <small>History</small> </a> </icon-button> @@ -63,7 +63,7 @@ <icon-navigator hidden=""> <icon-button> <a id="nav-middle-book-2" href="/archives/tags/"> - {{ safeHTML (readFile "static/icons/tabler/book-2.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/tabler/book-2.svg")) }} <small>Records</small> </a> </icon-button> @@ -72,7 +72,7 @@ <icon-navigator hidden=""> <icon-button> <a id="nav-middle-users" href="/authors/"> - {{ safeHTML (readFile "static/icons/feather/users.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/users.svg")) }} <small>Authors</small> </a> </icon-button> @@ -81,7 +81,7 @@ <icon-navigator hidden=""> <icon-button> <a id="nav-middle-rss" href="/rss.xml"> - {{ safeHTML (readFile "static/icons/feather/rss.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/rss.svg")) }} <small>RSS</small> </a> </icon-button> @@ -90,7 +90,7 @@ <icon-navigator hidden=""> <icon-button> <a id="nav-middle-circle" href="/index.json"> - {{ safeHTML (readFile "static/icons/feather/circle.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/circle.svg")) }} <small>JSON</small> </a> </icon-button> @@ -99,7 +99,7 @@ <icon-navigator hidden=""> <icon-button> <a id="nav-middle-git-commit" href="/sources/"> - {{ safeHTML (readFile "static/icons/feather/git-commit.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/git-commit.svg")) }} <small>Sources</small> </a> </icon-button> diff --git a/themes/default/layouts/_default/summary.html b/themes/default/layouts/_default/summary.html index ec0037f..fc3c305 100644 --- a/themes/default/layouts/_default/summary.html +++ b/themes/default/layouts/_default/summary.html @@ -12,7 +12,7 @@ <micro-unsafe> <details> <summary> - {{ safeHTML (readFile "static/icons/feather/alert-circle.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/alert-circle.svg")) }} <span>Danger: Unsafe Content. <b><u>Click here</u></b> to show/hide</span> </summary> </details> diff --git a/themes/default/layouts/partials/author-card.html b/themes/default/layouts/partials/author-card.html index 057bb8b..26a8e31 100644 --- a/themes/default/layouts/partials/author-card.html +++ b/themes/default/layouts/partials/author-card.html @@ -39,7 +39,7 @@ <h3><a title="{{ .Data.name }}" href="{{ "" | absURL }}/{{ .Data.user }}/#">@{{ .Data.user }}</a></h3> </micro-header> <a title="Follow with RSS Reader" href="{{ "" | absURL }}/{{ .Data.user }}/rss.xml"> - {{ safeHTML (readFile "static/icons/feather/rss.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/rss.svg")) }} <span>Follow</span> </a> </micro-summary> diff --git a/themes/default/layouts/partials/card-meta.html b/themes/default/layouts/partials/card-meta.html index 5d3fe20..4359586 100644 --- a/themes/default/layouts/partials/card-meta.html +++ b/themes/default/layouts/partials/card-meta.html @@ -6,7 +6,7 @@ {{ if or .Weight .Params.Liked .Params.feed }} <anchored-entry> {{- if .Params.feed -}} - {{ safeHTML (readFile "static/icons/feather/rss.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/rss.svg")) }} <a data-hover title="{{ partial "author-user.html" . }}@{{ (urls.Parse .Site.BaseURL).Host }}" href="{{ .Site.BaseURL }}/{{ partial "author-user.html" . }}/feeds/#"> @@ -16,14 +16,14 @@ {{ if .Weight }} <anchored-pinned> - {{ safeHTML (readFile "static/icons/tabler/pinned.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/tabler/pinned.svg")) }} </anchored-pinned> <span>Pinned</span> {{ end }} {{ if .Params.Liked }} <anchored-liked> - {{ safeHTML (readFile "static/icons/feather/heart.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/heart.svg")) }} </anchored-liked> <span>Liked</span> {{ end }} @@ -45,7 +45,7 @@ {{ if .Params.Unlisted }} · <unlisted-entry title="This message is off the record"> - {{ safeHTML (readFile "static/icons/feather/eye-off.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/eye-off.svg")) }} <span>unlisted</span></unlisted-entry> {{ end }} diff --git a/themes/default/layouts/partials/function-paths-static.html b/themes/default/layouts/partials/function-paths-static.html new file mode 100644 index 0000000..b34dbeb --- /dev/null +++ b/themes/default/layouts/partials/function-paths-static.html @@ -0,0 +1 @@ +{{ return "static" }} diff --git a/themes/default/layouts/partials/meta-expiry-date.html b/themes/default/layouts/partials/meta-expiry-date.html index bf111f9..275e04e 100644 --- a/themes/default/layouts/partials/meta-expiry-date.html +++ b/themes/default/layouts/partials/meta-expiry-date.html @@ -5,7 +5,7 @@ <time datetime= "{{ .ExpiryDate | time.Format "2006-01-02T15:04:05Z" }}" title="Self destructs within {{ $duration }} days ({{ .ExpiryDate | time.Format "Monday, January 2 2006 at 15:04:05 MST" }})"> - {{ safeHTML (readFile "static/icons/feather/trash-2.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/trash-2.svg")) }} {{ .ExpiryDate | time.Format "Jan 2 2006" }} </time> </expiry-date> diff --git a/themes/default/layouts/partials/navigator-left.html b/themes/default/layouts/partials/navigator-left.html index bb4a0dd..41aaa2e 100644 --- a/themes/default/layouts/partials/navigator-left.html +++ b/themes/default/layouts/partials/navigator-left.html @@ -6,7 +6,7 @@ <a id="nav-left-{{ path.Base .Identifier }}" href="{{ .URL | absURL }}"> <span>{{ .Name }}</span> {{ with .Identifier }} - {{ $icon := print "static/icons/" . ".svg" }} + {{ $icon := print (partial "function-paths-static.html") "/icons/" . ".svg" }} {{ safeHTML (readFile $icon) }} {{ end }} </a> diff --git a/themes/default/layouts/partials/navigator-middle-walk.html b/themes/default/layouts/partials/navigator-middle-walk.html index 5f69db8..a0832a8 100644 --- a/themes/default/layouts/partials/navigator-middle-walk.html +++ b/themes/default/layouts/partials/navigator-middle-walk.html @@ -4,7 +4,7 @@ <icon-button> <a id="nav-middle-{{ path.Base .Identifier }}" href="{{ .URL | absURL }}"> {{ with .Identifier }} - {{ $icon := print "static/icons/" . ".svg" }} + {{ $icon := print (partial "function-paths-static.html") "/icons/" . ".svg" }} {{ safeHTML (readFile $icon) }} {{ end }} <small>{{ delimit (first 1 (split .Name " ")) " " }}</small> diff --git a/themes/default/layouts/partials/navigator-middle.html b/themes/default/layouts/partials/navigator-middle.html index cca3466..418b237 100644 --- a/themes/default/layouts/partials/navigator-middle.html +++ b/themes/default/layouts/partials/navigator-middle.html @@ -8,9 +8,9 @@ href="{{ or $href "#" }}" > {{ with .Icon }} - {{ safeHTML (readFile (print "static/icons/feather/" . ".svg")) }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/" . ".svg")) }} {{ else }} - {{ safeHTML (readFile "static/icons/feather/arrow-up.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/arrow-up.svg")) }} {{ end }} {{ with .IconLabel }} <small>{{ . }}</small> @@ -46,7 +46,7 @@ aria-label="search input" /> <button id="search-submit"> - {{ safeHTML (readFile "static/icons/feather/search.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/search.svg")) }} <small>Search</small> </button> <ul hidden id="search-results"></ul> diff --git a/themes/default/layouts/partials/pagination.html b/themes/default/layouts/partials/pagination.html index b9e377c..d9360c4 100644 --- a/themes/default/layouts/partials/pagination.html +++ b/themes/default/layouts/partials/pagination.html @@ -23,7 +23,7 @@ aria-label="Back" title="Back" role="button"> - {{ safeHTML (readFile "static/icons/feather/arrow-left.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/arrow-left.svg")) }} Back </a> {{ else }} @@ -31,7 +31,7 @@ data-invisible title="Disabled" aria-label="Back"> - {{ safeHTML (readFile "static/icons/feather/arrow-left.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/arrow-left.svg")) }} Back </button> {{- end -}} @@ -43,7 +43,7 @@ title="Next" role="button"> Next - {{ safeHTML (readFile "static/icons/feather/arrow-right.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/arrow-right.svg")) }} </a> {{ else }} <button @@ -51,7 +51,7 @@ title="Disabled" aria-label="Next"> Next - {{ safeHTML (readFile "static/icons/feather/arrow-right.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/arrow-right.svg")) }} </button> {{- end -}} diff --git a/themes/default/layouts/partials/profile.html b/themes/default/layouts/partials/profile.html index 161f73d..1f01b23 100644 --- a/themes/default/layouts/partials/profile.html +++ b/themes/default/layouts/partials/profile.html @@ -28,21 +28,21 @@ <footer> <p> - {{ safeHTML (readFile "static/icons/feather/map-pin.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/map-pin.svg")) }} <span>{{- $author.place | markdownify -}}</span> </p> <p> - {{ safeHTML (readFile "static/icons/feather/globe.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/globe.svg")) }} <a href="{{ $author.domain.url }}"> {{- $author.domain.host | markdownify -}} </a> </p> <p> - {{ safeHTML (readFile "static/icons/feather/clock.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/clock.svg")) }} <span>{{- $author.epoch | markdownify -}}</span> </p> <p> - {{ safeHTML (readFile "static/icons/feather/user.svg") }} + {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/user.svg")) }} <span><b>{{ with $author.webring.rss }}{{ len . }}{{ else }} 0 {{ end }}</b> Following</span> </p> </footer> |