mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Fix Citation modal responsiveness and clipboard copy (#29799)
The modal was broken in two ways: - On small screens, the input box was partially hanging outside the modal. Fixed with flexbox and increased modal width. - The clipboard copy was not working because the modal had both `data-clipboard-text` and `data-clipboard-target`, while we only support one of those. Made a small tweak in clipboard as well so that it will still fall back to target if text is empty.
This commit is contained in:
@ -6,6 +6,6 @@ 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 icon button" id="citation-clipboard-btn" data-tooltip-content="{{ctx.Locale.Tr "copy"}}" data-clipboard-text="" data-clipboard-target="#citation-copy-content">
|
||||
<button class="ui icon button" id="citation-clipboard-btn" data-tooltip-content="{{ctx.Locale.Tr "copy"}}" data-clipboard-target="#citation-copy-content">
|
||||
{{svg "octicon-copy"}}
|
||||
</button>
|
||||
|
@ -1,16 +1,14 @@
|
||||
<div class="ui tiny modal" id="cite-repo-modal">
|
||||
<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="fitted item">
|
||||
<div class="ui action input" id="citation-panel">
|
||||
{{template "repo/cite/cite_buttons" .}}
|
||||
<a id="goto-citation-btn" class="ui basic jump icon button" href="{{$.RepoLink}}/src/{{$.BranchName}}/CITATION.cff" data-tooltip-content="{{ctx.Locale.Tr "repo.find_file.go_to_file"}}">
|
||||
{{svg "octicon-file-moved"}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui action input" id="citation-panel">
|
||||
{{template "repo/cite/cite_buttons" .}}
|
||||
<a id="goto-citation-btn" class="ui basic jump icon button" href="{{$.RepoLink}}/src/{{$.BranchName}}/CITATION.cff" data-tooltip-content="{{ctx.Locale.Tr "repo.find_file.go_to_file"}}">
|
||||
{{svg "octicon-file-moved"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user