aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/meta-context-menu.html
blob: 26c3842e99db2883428c1d92d79c08f4ee9543ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{{- $id     := delimit (shuffle (seq 1 7)) "" -}}
{{- $author := partial "function-authors-data.html" . -}}
{{- $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")) -}}
      <span>menu</span>
    </label>
    <input hidden type="checkbox" id="context-metadata-{{ $id }}" />
    <context-menu anchor>
      {{- partial "meta-markdown.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>
      {{- partial "meta-permalink.html" . -}}
      <micro-metadata-datetime>
        <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")) -}}
          <span>{{ .Date.Local | time.Format "Jan 2 2006" | lower -}}</span>
        </a>
      </micro-metadata-datetime>
    </context-menu>
  </context-control>
</micro-metadata-menu>
{{- /* This comment removes trailing newlines and white spaces. */ -}}