aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/meta-context-menu.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/partials/meta-context-menu.html')
-rw-r--r--themes/default/layouts/partials/meta-context-menu.html23
1 files changed, 19 insertions, 4 deletions
diff --git a/themes/default/layouts/partials/meta-context-menu.html b/themes/default/layouts/partials/meta-context-menu.html
index 7269262..1edf80e 100644
--- a/themes/default/layouts/partials/meta-context-menu.html
+++ b/themes/default/layouts/partials/meta-context-menu.html
@@ -1,18 +1,33 @@
-{{- $id := delimit (shuffle (seq 1 7)) "" -}}
+{{- $id := delimit (shuffle (seq 1 7)) "" -}}
+{{- $author := index .Site.Data ((or .Params.author .Site.Author.default.user) | default "default") -}}
+{{- $href := print .Site.BaseURL "/" $author.user "/messages/" (path.Base .Permalink) "/" -}}
+{{- $plain := print .Site.BaseURL "/" $author.user "/messages/" (path.Base .Permalink) "/index.txt" -}}
+
+{{- with .Params.feed.self -}}
+ {{- $href = print $.Site.BaseURL "/" $.Params.feed.self -}}
+ {{- $plain = print $.Site.BaseURL "/" $.Params.feed.self "/index.txt" -}}
+{{- end -}}
+
<micro-metadata-menu>
<context-control>
<label for="context-metadata-{{ $id }}">
- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-down-circle.svg")) }}
+ {{- safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-down-circle.svg")) -}}
<span>menu</span>
</label>
<input hidden type="checkbox" id="context-metadata-{{ $id }}" />
<context-menu right>
{{- partial "meta-markdown.html" . -}}
{{- partial "meta-permalink.html" . -}}
+ <micro-metadata-plain>
+ <a href="{{ $plain }}">
+ {{- safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/file-text.svg")) -}}
+ <span>plaintext</span>
+ </a>
+ </micro-metadata-plain>
<micro-metadata-datetime>
- <a title="{{ .Date.Local | time.Format "3:04 PM Jan 2 2006" -}}">
+ <a title="{{ .Date.Local | time.Format "3:04 PM Jan 2 2006" -}}" href="{{ $href }}">
{{- safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/calendar.svg")) -}}
- {{ .Date.Local | time.Format "Jan 2 2006" | lower -}}
+ <span>{{ .Date.Local | time.Format "Jan 2 2006" | lower -}}</span>
</a>
</micro-metadata-datetime>
</context-menu>