diff options
author | Yarden Shoham <git@yardenshoham.com> | 2024-03-31 18:39:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-31 15:39:50 +0000 |
commit | 0497b2607d1052e771af4017c2c4180adb7d86b2 (patch) | |
tree | 0daea274e576ec1cafbc6cb7a4d9ea627da50492 /templates | |
parent | 8da9130c1ffe93e0e97290fddb908ae5b67432e2 (diff) | |
download | gitea-0497b2607d1052e771af4017c2c4180adb7d86b2.tar.gz gitea-0497b2607d1052e771af4017c2c4180adb7d86b2.zip |
Remove most jQuery function calls from the repository topic box (#30191)
Remove most jQuery function calls
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/home.tmpl | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 4241f77ead..ab37f7e318 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -18,22 +18,21 @@ </div> </form> </div> - <div class="tw-flex tw-items-center tw-flex-wrap tw-gap-1" id="repo-topics"> - {{range .Topics}}<a class="ui repo-topic large label topic tw-m-0" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}} + <div class="tw-flex tw-items-center tw-flex-wrap tw-gap-2 tw-my-2" id="repo-topics"> + {{/* it should match the code in issue-home.js */}} + {{range .Topics}}<a class="repo-topic ui large label" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}} {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<button id="manage_topic" class="btn interact-fg tw-text-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button>{{end}} </div> {{end}} {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} - <div class="ui form tw-hidden tw-flex tw-flex-col tw-mt-4" id="topic_edit"> - <div class="field tw-flex-1 tw-mb-1"> - <div class="ui fluid multiple search selection dropdown tw-flex-wrap" data-text-count-prompt="{{ctx.Locale.Tr "repo.topic.count_prompt"}}" data-text-format-prompt="{{ctx.Locale.Tr "repo.topic.format_prompt"}}"> - <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}"> - {{range .Topics}} - {{/* keey the same layout as Fomantic UI generated labels */}} - <a class="ui label transition visible tw-cursor-default tw-inline-block" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a> - {{end}} - <div class="text"></div> - </div> + <div class="ui form tw-hidden tw-flex tw-gap-2 tw-my-2" id="topic_edit"> + <div class="ui fluid multiple search selection dropdown tw-flex-wrap tw-flex-1"> + <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}"> + {{range .Topics}} + {{/* keep the same layout as Fomantic UI generated labels */}} + <a class="ui label transition visible tw-cursor-default tw-inline-block" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a> + {{end}} + <div class="text"></div> </div> <div> <button class="ui basic button" id="cancel_topic_edit">{{ctx.Locale.Tr "cancel"}}</button> |