Load citation JS only when needed (#29855)

Previously, the citation js would load every time when opening a citable
repo. Now it only loads when the user clicks the button for it. The
loading state is representend with a spinner on the button:

<img width="83" alt="Screenshot 2024-03-17 at 00 25 13"
src="29649089-13f3-4974-ab81-e12c0f8e651f">

Diff ist best viewed with whitespace hidden.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
silverwind 2024-03-17 11:04:59 +01:00 committed by GitHub
parent c20b56815d
commit 4b1c88628a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 19 deletions

View file

@ -13,6 +13,10 @@
opacity: 0.3;
}
.button.is-loading > * {
opacity: 0;
}
.is-loading::after {
content: "";
position: absolute;