From 298633d08d2aec62392f2beb797d0b04cb6f5168 Mon Sep 17 00:00:00 2001 From: Bill Stumbo Date: Tue, 4 Nov 2025 23:43:46 -0500 Subject: [PATCH 1/6] Initial attempt to build citation modal dialog box. Citation link, generates modal dialog box whose content is the results of a call to Zotero to get the citation. Currently using apa citation, there are many other options... --- layouts/bibliography/single.html | 114 +++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/layouts/bibliography/single.html b/layouts/bibliography/single.html index fed28338..fcdca52c 100644 --- a/layouts/bibliography/single.html +++ b/layouts/bibliography/single.html @@ -52,6 +52,23 @@

{{ .Title }}

No URL to the document is available. {{ end }}
+ + + {{/* Build Zotero API params (group id + item key + style) */}} + {{ $gid := "2914042" }} + + {{ $key := .File.TranslationBaseName }} + + {{ $style := or site.Params.zotero.style "apa" }} + + {{ if and $gid $key }} +
+ Citation + {{ end }}

Abstract @@ -218,4 +235,101 @@

{{ .Title }}

{{ .Content }} + + + + + + + {{ end }} From 17ca9296aa4d6c7f0849269fdb1c1857e2b1951d Mon Sep 17 00:00:00 2001 From: Bill Stumbo Date: Thu, 6 Nov 2025 07:43:51 -0500 Subject: [PATCH 2/6] Update Citation modal to include both rendered text and html Allow the user to copy either the formatted 'pretty' text or the raw html that creates the entry. --- layouts/bibliography/single.html | 249 +++++++++++++++------- static/js/vendor/prettier/plugins/html.js | 22 ++ static/js/vendor/prettier/standalone.js | 35 +++ 3 files changed, 224 insertions(+), 82 deletions(-) create mode 100644 static/js/vendor/prettier/plugins/html.js create mode 100644 static/js/vendor/prettier/standalone.js diff --git a/layouts/bibliography/single.html b/layouts/bibliography/single.html index fcdca52c..253ae575 100644 --- a/layouts/bibliography/single.html +++ b/layouts/bibliography/single.html @@ -236,100 +236,185 @@

{{ .Title }}

-