parent
1afed103cc
commit
6229f7fe20
|
@ -7,7 +7,7 @@
|
||||||
"datePublished": {{ .Date.Format "2006-01-02T15:04:05Z07:00" }},
|
"datePublished": {{ .Date.Format "2006-01-02T15:04:05Z07:00" }},
|
||||||
"dateModified": {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }},
|
"dateModified": {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }},
|
||||||
"url" : {{ .Permalink }},
|
"url" : {{ .Permalink }},
|
||||||
"description": "{{ with (.Description | default (replaceRE "\n" " " (.Summary | truncate 170))) }}{{ . }}{{ end }}",
|
"description": {{ with (.Description | default (replaceRE "\n" " " (.Summary | truncate 170))) }}{{ . }}{{ else }}""{{ end }},
|
||||||
{{ with .Params.tags -}}
|
{{ with .Params.tags -}}
|
||||||
"keywords": {{ . }},
|
"keywords": {{ . }},
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
"url" : {{ .Permalink }},
|
"url" : {{ .Permalink }},
|
||||||
"name": {{ .Title }},
|
"name": {{ .Title }},
|
||||||
{{ with $.Param "description" -}}
|
{{ with $.Param "description" -}}
|
||||||
"description": "{{ . }}",
|
"description": {{ . }},
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ with $.Param "image" -}}
|
{{ with $.Param "image" -}}
|
||||||
|
|
|
@ -18,8 +18,10 @@
|
||||||
<div class="modal__icon modal__toolbar--close" title="Close" aria-label="Close Button" data-micromodal-close>
|
<div class="modal__icon modal__toolbar--close" title="Close" aria-label="Close Button" data-micromodal-close>
|
||||||
{{ partial "svgs/etc/close.svg" (dict "width" 25 "height" 25) }}
|
{{ partial "svgs/etc/close.svg" (dict "width" 25 "height" 25) }}
|
||||||
</div>
|
</div>
|
||||||
|
{{ $langprefix := $.Site.Language.Lang }}
|
||||||
|
{{ $folderPathWithoutLangPrefix := replace .RelPermalink (print "/" $langprefix "/") "/" }}
|
||||||
|
{{ $filePath := print "/content/" $langprefix $folderPathWithoutLangPrefix "cite.bib" }}
|
||||||
<main class="modal__cite">
|
<main class="modal__cite">
|
||||||
{{ $filePath := print "/content" (print .Permalink "cite.bib" | relURL) }}
|
|
||||||
{{ if fileExists $filePath }}
|
{{ if fileExists $filePath }}
|
||||||
<div class="modal__cite--exist" id="citeContents">
|
<div class="modal__cite--exist" id="citeContents">
|
||||||
{{ readFile $filePath | markdownify }}
|
{{ readFile $filePath | markdownify }}
|
||||||
|
@ -30,9 +32,11 @@
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</main>
|
</main>
|
||||||
|
{{ if fileExists $filePath }}
|
||||||
<button id="copyBtn" class="button modal__copy" data-color="default" aria-label="Cite Copy Button" data-clipboard-target="#citeContents">
|
<button id="copyBtn" class="button modal__copy" data-color="default" aria-label="Cite Copy Button" data-clipboard-target="#citeContents">
|
||||||
{{ i18n "copy" | default "Copy"}}
|
{{ i18n "copy" | default "Copy"}}
|
||||||
</button>
|
</button>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue