diff options
author | Nolann <62215577+Nolann71@users.noreply.github.com> | 2022-11-11 18:02:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 18:02:50 +0100 |
commit | 9f8e7789187013ab6752c2635b24c9dd1d70cd90 (patch) | |
tree | fe0e6c933d866cebe2aa09d322ba5d18f0ccea99 /templates/repo/cite/cite_buttons.tmpl | |
parent | 9db221780f28e161c02c4106f63d0b6f185933d4 (diff) | |
download | gitea-9f8e7789187013ab6752c2635b24c9dd1d70cd90.tar.gz gitea-9f8e7789187013ab6752c2635b24c9dd1d70cd90.zip |
Copy citation file content, in APA and BibTex format, on repo home page (#19999)
Add feature to easily copy CITATION.cff content in APA and BibTex format.
Diffstat (limited to 'templates/repo/cite/cite_buttons.tmpl')
-rw-r--r-- | templates/repo/cite/cite_buttons.tmpl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/repo/cite/cite_buttons.tmpl b/templates/repo/cite/cite_buttons.tmpl new file mode 100644 index 0000000000..0f4fb43484 --- /dev/null +++ b/templates/repo/cite/cite_buttons.tmpl @@ -0,0 +1,11 @@ +<button class="ui basic citation button" id="citation-copy-apa" data-text=""> +APA +</button> +<button class="ui basic citation button" id="citation-copy-bibtex" data-text=""> +BibTeX +</button> +<!-- the value will be updated by initCitationFileCopyContent, the code below is used to avoid UI flicking --> +<input id="citation-copy-content" value="" size="1" readonly> +<button class="ui basic icon button tooltip" id="citation-clipboard-btn" data-content="{{.locale.Tr "copy"}}" data-clipboard-text="" data-clipboard-target="#citation-copy-content"> + {{svg "octicon-copy"}} +</button> |