mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
feat(ui): add switch between formats when previewing CITATION.{cff,bib} files (#9103)
See #8222 for context (loosely related to #4595). ## Implemented changes The conversion logic is kept in the frontend and the related npm libraries are lazy-loaded (unchanged). ### Show some tabs on the preview of the `CITATION.*` file to switch between the formats:   ### Convert the "Cite repository" to a simple link to the citation file So that this change can be considered non-breaking ## Current state (before this PR) The last non-test call of `git.Blob.GetBlobContent` is made to retrieve the content of an eventual CITATION file. This is available in the `...` menu near the clone URL:  And is displayed as a popup:  Co-authored-by: 0ko <0ko@noreply.codeberg.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9103 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: oliverpool <git@olivier.pfad.fr> Co-committed-by: oliverpool <git@olivier.pfad.fr>
This commit is contained in:
parent
0737196842
commit
8f28cdefe0
23 changed files with 225 additions and 195 deletions
|
|
@ -438,6 +438,10 @@ pdf-object {
|
|||
justify-content: center;
|
||||
}
|
||||
|
||||
citation-information .tab:not(.active) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.repository.file.list .non-diff-file-content .plain-text {
|
||||
padding: 1em 2em;
|
||||
}
|
||||
|
|
@ -1897,48 +1901,6 @@ details.repo-search-result summary::marker {
|
|||
font-weight: var(--font-weight-medium);
|
||||
}
|
||||
|
||||
#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-copy-content {
|
||||
border-radius: 0;
|
||||
padding: 5px 10px;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.4;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel #citation-copy-bibtex {
|
||||
font-size: 13px;
|
||||
padding: 7.5px 5px;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel #goto-citation-btn {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel > :first-child {
|
||||
border-radius: var(--border-radius) 0 0 var(--border-radius) !important;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel > :last-child {
|
||||
border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
|
||||
}
|
||||
|
||||
#cite-repo-modal #citation-panel .icon.button {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
#search-user-box .results .result .image {
|
||||
order: 0;
|
||||
margin-right: 12px;
|
||||
|
|
@ -2381,6 +2343,7 @@ tbody.commit-list {
|
|||
overflow-x: auto;
|
||||
padding: 6px 12px !important;
|
||||
font-size: 13px !important;
|
||||
min-height: 46px;
|
||||
}
|
||||
|
||||
.file-info {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue