diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-03-24 18:35:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-24 18:35:38 +0800 |
commit | 8d5fbeb7a290791dda8e8e8a1a0fd6824b76494f (patch) | |
tree | 4f7651105a8ad92d99de5a44daa943b70d79c38c /templates/base | |
parent | 87f0f7e670c6c0e6aeab8c4458bfdb9d954eacec (diff) | |
download | gitea-8d5fbeb7a290791dda8e8e8a1a0fd6824b76494f.tar.gz gitea-8d5fbeb7a290791dda8e8e8a1a0fd6824b76494f.zip |
Use data-tooltip-content for tippy tooltip (#23649)
Follow:
* #23574
* Remove all ".tooltip[data-content=...]"
Major changes:
* Remove "tooltip" class, use "[data-tooltip-content=...]" instead of
".tooltip[data-content=...]"
* Remove legacy `data-position`, it's dead code since last Fomantic
Tooltip -> Tippy Tooltip refactoring
* Rename reaction attribute from `data-content` to
`data-reaction-content`
* Add comments for some `data-content`: `{{/* used by the form */}}`
* Remove empty "ui" class
* Use "text color" for SVG icons (a few)
Diffstat (limited to 'templates/base')
-rw-r--r-- | templates/base/head_navbar.tmpl | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 24b4e18fbf..a61c623964 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -9,7 +9,7 @@ </a> <div class="gt-df gt-ac"> {{if .IsSigned}} - <a href="{{AppSubUrl}}/notifications" class="tooltip mobile-only gt-mr-4 gt-mt-3" data-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> + <a href="{{AppSubUrl}}/notifications" class="mobile-only gt-mr-4 gt-mt-3" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> <span class="fitted item"> {{svg "octicon-bell"}} <span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}"> @@ -57,7 +57,7 @@ {{if and .IsSigned .MustChangePassword}} <div class="right stackable menu"> - <div class="ui dropdown jump item tooltip" tabindex="-1" data-content="{{.locale.Tr "user_profile_and_more"}}"> + <div class="ui dropdown jump item" tabindex="-1" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}"> <span class="text"> {{avatar $.Context .SignedUser 24 "tiny"}} <span class="sr-only">{{.locale.Tr "user_profile_and_more"}}</span> @@ -100,25 +100,23 @@ {{.CsrfTokenHtml}} <button type="submit" - class="ui button mini compact basic icon fitted tooltip" - data-content="{{.locale.Tr "repo.issues.stop_tracking"}}" - data-position="top right" + class="ui button mini compact basic icon fitted" + data-tooltip-content="{{.locale.Tr "repo.issues.stop_tracking"}}" >{{svg "octicon-square-fill"}}</button> </form> <form class="stopwatch-cancel" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel"> {{.CsrfTokenHtml}} <button type="submit" - class="ui button mini compact basic icon fitted tooltip" - data-content="{{.locale.Tr "repo.issues.cancel_tracking"}}" - data-position="top right" + class="ui button mini compact basic icon fitted" + data-tooltip-content="{{.locale.Tr "repo.issues.cancel_tracking"}}" >{{svg "octicon-trash"}}</button> </form> </div> </div> {{end}} - <a href="{{AppSubUrl}}/notifications" class="item tooltip not-mobile gt-mx-0" data-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> + <a href="{{AppSubUrl}}/notifications" class="item not-mobile gt-mx-0" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> <span class="fitted item"> {{svg "octicon-bell"}} <span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}"> @@ -127,7 +125,7 @@ </span> </a> - <div class="ui dropdown jump item tooltip gt-mx-0" data-content="{{.locale.Tr "create_new"}}"> + <div class="ui dropdown jump item gt-mx-0" data-tooltip-content="{{.locale.Tr "create_new"}}"> <span class="text"> <span class="fitted">{{svg "octicon-plus"}}</span> <span class="sr-mobile-only">{{.locale.Tr "create_new"}}</span> @@ -150,7 +148,7 @@ </div><!-- end content create new menu --> </div><!-- end dropdown menu create new --> - <div class="ui dropdown jump item tooltip gt-mx-0" data-content="{{.locale.Tr "user_profile_and_more"}}"> + <div class="ui dropdown jump item gt-mx-0" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}"> <span class="text"> {{avatar $.Context .SignedUser 24 "tiny"}} <span class="sr-only">{{.locale.Tr "user_profile_and_more"}}</span> |