mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-04 05:34:53 +00:00
enhance(citation): render citations server-side (#39373)
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>
This commit is contained in:
+7
-23
@@ -990,24 +990,13 @@
|
||||
background: var(--color-secondary);
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel input {
|
||||
border-radius: 0;
|
||||
padding: 5px 10px;
|
||||
width: 50%;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel .citation.button {
|
||||
#cite-repo-modal .citation.button {
|
||||
font-size: 13px;
|
||||
padding: 7.5px 5px;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel #citation-copy-content {
|
||||
#cite-repo-modal input {
|
||||
border-radius: 0;
|
||||
padding: 5px 10px;
|
||||
font-size: 1.2em;
|
||||
@@ -1015,24 +1004,19 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel #citation-copy-apa,
|
||||
#cite-repo-modal #citation-panel #citation-copy-bibtex {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel #goto-citation-btn {
|
||||
#cite-repo-modal .jump.button {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel > :first-child {
|
||||
#cite-repo-modal .action.input > :first-child {
|
||||
border-radius: var(--border-radius) 0 0 var(--border-radius) !important;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel > :last-child {
|
||||
#cite-repo-modal .action.input > :last-child {
|
||||
border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel .icon.button {
|
||||
#cite-repo-modal .icon.button {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user