diff options
author | silverwind <me@silverwind.io> | 2021-11-18 04:26:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 11:26:50 +0800 |
commit | 6874fe90e591fa1bfb4b0575b27d876ab544e6e0 (patch) | |
tree | beabcb9bd531347090c3f678d364cf02099b1274 /templates/user | |
parent | c98dd7a3e0a08b1e890d6030dd51aae9dd45aaf9 (diff) | |
download | gitea-6874fe90e591fa1bfb4b0575b27d876ab544e6e0.tar.gz gitea-6874fe90e591fa1bfb4b0575b27d876ab544e6e0.zip |
Cleanup and use global style on popups (#17674)
* Cleanup and use global style on popups
- Fix typo 'poping' to 'popping'
- Remove most inline 'data-variation' attributes
- Initialize all popups with 'inverted tiny' variation
* misc tweaks
* rename to .tooltip, use jQuery
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/dashboard/repolist.tmpl | 4 | ||||
-rw-r--r-- | templates/user/profile.tmpl | 4 | ||||
-rw-r--r-- | templates/user/settings/keys_gpg.tmpl | 4 | ||||
-rw-r--r-- | templates/user/settings/profile.tmpl | 10 |
4 files changed, 11 insertions, 11 deletions
diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl index 83a0f6b3ad..5791be9c0f 100644 --- a/templates/user/dashboard/repolist.tmpl +++ b/templates/user/dashboard/repolist.tmpl @@ -31,7 +31,7 @@ {{.i18n.Tr "home.my_repos"}} <span class="ui grey label ml-3">${reposTotalCount}</span> </div> - <a class="poping up" :href="subUrl + '/repo/create'" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center"> + <a class="tooltip" :href="subUrl + '/repo/create'" data-content="{{.i18n.Tr "new_repo"}}" data-position="left center"> {{svg "octicon-plus"}} <span class="sr-only">{{.i18n.Tr "new_repo"}}</span> </a> @@ -168,7 +168,7 @@ {{.i18n.Tr "home.my_orgs"}} <span class="ui grey label ml-3">${organizationsTotalCount}</span> </div> - <a v-if="canCreateOrganization" class="poping up" :href="subUrl + '/org/create'" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center"> + <a v-if="canCreateOrganization" class="tooltip" :href="subUrl + '/org/create'" data-content="{{.i18n.Tr "new_org"}}" data-position="left center"> {{svg "octicon-plus"}} <span class="sr-only">{{.i18n.Tr "new_org"}}</span> </a> diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index e5962db65c..1c40bd21b5 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -5,7 +5,7 @@ <div class="ui five wide column"> <div class="ui card"> {{if eq .SignedUserName .Owner.Name}} - <a class="image poping up" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center"> + <a class="image tooltip" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-position="bottom center"> {{avatar .Owner 290}} </a> {{else}} @@ -54,7 +54,7 @@ {{range .Orgs}} {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.HasMemberWithUserID $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}} <li> - <a class="poping up" href="{{.HomeLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"> + <a class="tooltip" href="{{.HomeLink}}" data-content="{{.Name}}" data-position="top center"> {{avatar .}} </a> </li> diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index 20ccea9f00..81f9bf20be 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -58,10 +58,10 @@ </div> <div class="content"> {{if .Verified}} - <span class="poping up" data-content="{{$.i18n.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.i18n.Tr "settings.gpg_key_verified"}}</strong></span> + <span class="tooltip" data-content="{{$.i18n.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.i18n.Tr "settings.gpg_key_verified"}}</strong></span> {{end}} {{if gt (len .Emails) 0}} - <span class="poping up" data-content="{{$.i18n.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.i18n.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span> + <span class="tooltip" data-content="{{$.i18n.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.i18n.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span> {{end}} <div class="print meta"> <b>{{$.i18n.Tr "settings.key_id"}}:</b> {{.KeyID}} diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index 0b14e3c0d3..9429db1ad6 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -30,7 +30,7 @@ </div> <div class="inline field"> <div class="ui checkbox" id="keep-email-private"> - <label class="poping up" data-content="{{.i18n.Tr "settings.keep_email_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_email_private"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "settings.keep_email_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_email_private"}}</strong></label> <input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}> </div> </div> @@ -69,11 +69,11 @@ <div class="menu"> {{range $mode := .AllowedUserVisibilityModes}} {{if $mode.IsPublic}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.i18n.Tr "settings.visibility.public"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.i18n.Tr "settings.visibility.public"}}</div> {{else if $mode.IsLimited}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.i18n.Tr "settings.visibility.limited"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.i18n.Tr "settings.visibility.limited"}}</div> {{else if $mode.IsPrivate}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.i18n.Tr "settings.visibility.private"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.i18n.Tr "settings.visibility.private"}}</div> {{end}} {{end}} </div> @@ -82,7 +82,7 @@ <div class="field"> <div class="ui checkbox" id="keep-activity-private"> - <label class="poping up" data-content="{{.i18n.Tr "settings.keep_activity_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_activity_private"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "settings.keep_activity_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_activity_private"}}</strong></label> <input name="keep_activity_private" type="checkbox" {{if .SignedUser.KeepActivityPrivate}}checked{{end}}> </div> </div> |