diff options
author | silverwind <me@silverwind.io> | 2024-06-12 16:58:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 14:58:03 +0000 |
commit | 21ba5ca03be47a9a7051d13fcfa258bb03dd93df (patch) | |
tree | 14ec0be5dbefe8ba98984ffb33278611261f0d17 /templates | |
parent | 45dbeb5600d1f552c0134721fe49e8fd1099b5a4 (diff) | |
download | gitea-21ba5ca03be47a9a7051d13fcfa258bb03dd93df.tar.gz gitea-21ba5ca03be47a9a7051d13fcfa258bb03dd93df.zip |
Fix navbar `+` menu flashing on page load (#31281)
Fixes
https://github.com/go-gitea/gitea/pull/31273#issuecomment-2153771331.
Same method as used in https://github.com/go-gitea/gitea/pull/30215. All
left-opening dropdowns need to use it method.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/head_navbar.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/issue/labels/label_list.tmpl | 24 |
2 files changed, 14 insertions, 16 deletions
diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 2b52247303..4889924819 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -4,7 +4,7 @@ {{end}} <nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}"> - <div class="navbar-left ui secondary menu"> + <div class="navbar-left"> <!-- the logo --> <a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}"> <img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true"> @@ -61,7 +61,7 @@ </div> <!-- the full dropdown menus --> - <div class="navbar-right ui secondary menu"> + <div class="navbar-right"> {{if and .IsSigned .MustChangePassword}} <div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}"> <span class="text tw-flex tw-items-center"> @@ -104,7 +104,7 @@ <span class="not-mobile">{{svg "octicon-triangle-down"}}</span> <span class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span> </span> - <div class="menu left"> + <div class="menu"> <a class="item" href="{{AppSubUrl}}/repo/create"> {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} </a> diff --git a/templates/repo/issue/labels/label_list.tmpl b/templates/repo/issue/labels/label_list.tmpl index 8d7fc2c3db..413d6405b2 100644 --- a/templates/repo/issue/labels/label_list.tmpl +++ b/templates/repo/issue/labels/label_list.tmpl @@ -1,19 +1,17 @@ <h4 class="ui top attached header"> {{ctx.Locale.Tr "repo.issues.label_count" .NumLabels}} <div class="ui right"> - <div class="ui secondary menu"> - <!-- Sort --> - <div class="item ui jump dropdown tw-py-2"> - <span class="text"> - {{ctx.Locale.Tr "repo.issues.filter_sort"}} - </span> - {{svg "octicon-triangle-down" 14 "dropdown icon"}} - <div class="menu"> - <a class="{{if or (eq .SortType "alphabetically") (not .SortType)}}active {{end}}item" href="?sort=alphabetically&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a> - <a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="?sort=reversealphabetically&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a> - <a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="?sort=leastissues&state={{$.State}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}</a> - <a class="{{if eq .SortType "mostissues"}}active {{end}}item" href="?sort=mostissues&state={{$.State}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_issues"}}</a> - </div> + <!-- Sort --> + <div class="item ui jump dropdown tw-py-2"> + <span class="text"> + {{ctx.Locale.Tr "repo.issues.filter_sort"}} + </span> + {{svg "octicon-triangle-down" 14 "dropdown icon"}} + <div class="menu"> + <a class="{{if or (eq .SortType "alphabetically") (not .SortType)}}active {{end}}item" href="?sort=alphabetically&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a> + <a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="?sort=reversealphabetically&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a> + <a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="?sort=leastissues&state={{$.State}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}</a> + <a class="{{if eq .SortType "mostissues"}}active {{end}}item" href="?sort=mostissues&state={{$.State}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_issues"}}</a> </div> </div> </div> <!-- filter menu --> |