Skip to content

Conversation

@stumbo
Copy link
Member

@stumbo stumbo commented Nov 7, 2025

Adds a citation button that brings up a modal window showing both the formatted citation and html text representing the formatted citation. Allows user to copy either option.

Issue 2349 has several screenshots.

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...
Allow the user to copy either the formatted 'pretty' text or
the raw html that creates the entry.
Move citations button to bottom of page with Zotero button.
@stumbo stumbo self-assigned this Nov 7, 2025
@stumbo stumbo linked an issue Nov 7, 2025 that may be closed by this pull request
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

@pamoroso pamoroso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works with no issues for me with Firefox and Chrome on Linux.

{{- end -}}

<!-- Citation -->
{{/* Build Zotero API params (group id + item key + style) */}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lines that are only Hugo operations should have {{- & -}} delimiters so whitespace between them is stripped from the output. (Generally, no functional effect, but helps with readability if looking at "page source" in the browser. Also, smaller pages.

<div class="citation-actions">
<button type="button" id="copyCitation">Copy Text</button>
<button type="button" id="copyCitationHtml">Copy HTML</button>
<button type="button" class="citation-close">Close</button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This "Close" is a larger font, and no border, compared to the two buttons adjacent.

In the process I discovered a couple minor errors in the
layout of the bibliography and fixed them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bibliography: Add citations

4 participants