aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/meta-context-menu.html
blob: 977f938ca37c0100b925cc601f779892517fc591 (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
{{- $id     := partial "card-id.html" . -}}
{{- $href   := print .Permalink -}}
{{- $plain  := print $href "index.txt" -}}

<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 "15:04 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. */ -}}