mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-19 16:18:11 +00:00
Replace citation-js with a Go port of ruby-cff, which GitHub uses for "Cite this repository", rendering APA and BibTeX server-side and dropping about 770KB of JS. Output matches GitHub on 1568 of 1571 real-world files, the rest are improvements over GitHub. - `CITATION.cff` wins over `CITATION.bib`, matched case-insensitively and through symlinks - `CITATION.bib` is offered as-is, without APA Signed-off-by: silverwind <me@silverwind.io>
32 lines
1.1 KiB
Handlebars
32 lines
1.1 KiB
Handlebars
<div class="ui small modal" id="cite-repo-modal">
|
|
<div class="header">
|
|
{{ctx.Locale.Tr "repo.cite_this_repo"}}
|
|
</div>
|
|
<div class="content">
|
|
<div class="ui stackable secondary menu">
|
|
<div class="ui action input tw-flex tw-w-full" data-global-init="initRepoCitationPanel">
|
|
{{if .CitationAPA}}
|
|
<button type="button" class="ui citation button citation-apa" data-text="{{.CitationAPA}}">
|
|
APA
|
|
</button>
|
|
{{end}}
|
|
<button type="button" class="ui citation button citation-bibtex" data-text="{{.CitationBibTeX}}">
|
|
BibTeX
|
|
</button>
|
|
<input value="" size="1" readonly autofocus>
|
|
<button type="button" class="ui icon button citation-copy" data-tooltip-content="{{ctx.Locale.Tr "copy"}}">
|
|
{{svg "octicon-copy"}}
|
|
</button>
|
|
<a class="ui basic jump icon button" href="{{$.RepoLink}}/src/{{$.RefTypeNameSubURL}}/{{PathEscapeSegments $.CitationFileName}}" data-tooltip-content="{{ctx.Locale.Tr "repo.find_file.go_to_file"}}">
|
|
{{svg "octicon-file-moved"}}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="actions">
|
|
<button type="button" class="ui cancel button">
|
|
{{ctx.Locale.Tr "cancel"}}
|
|
</button>
|
|
</div>
|
|
</div>
|