]> source.dussan.org Git - gitea.git/commitdiff
Tweak repo topics bar (#25769)
authorsilverwind <me@silverwind.io>
Sat, 8 Jul 2023 18:12:30 +0000 (20:12 +0200)
committerGitHub <noreply@github.com>
Sat, 8 Jul 2023 18:12:30 +0000 (18:12 +0000)
Minor tweaks to repo topics:

- Use gap instead of margin to align "Manage Topics" when no topics
present
- Add margin to description instead

Before:

<img width="1232" alt="Screenshot 2023-07-08 at 13 08 15"
src="https://github.com/go-gitea/gitea/assets/115237/a5d3586c-6cbf-4b74-8137-11d91f2cbb45">
<img width="1233" alt="Screenshot 2023-07-08 at 13 08 05"
src="https://github.com/go-gitea/gitea/assets/115237/59b18d93-e4cb-4f2b-9bc2-d6aa63f93827">

After:

<img width="1232" alt="Screenshot 2023-07-08 at 13 08 42"
src="https://github.com/go-gitea/gitea/assets/115237/470d42ad-3f7e-40f9-b0a1-203b4af77eb9">
<img width="1231" alt="Screenshot 2023-07-08 at 13 08 32"
src="https://github.com/go-gitea/gitea/assets/115237/42d18048-748c-4a3f-ab89-3403866cef34">

---------

templates/repo/home.tmpl
web_src/css/repo.css

index 394bab1e38be12ea63a9de109d8dd11e9d9013c7..aaa1a1b9748d8eb5814ab845b71086967c6d3124 100644 (file)
@@ -29,9 +29,9 @@
                                </div>
                        {{end}}
                </div>
-               <div class="gt-df gt-ac gt-fw gt-mt-3" id="repo-topics">
-                       {{range .Topics}}<a class="ui repo-topic large label topic" 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 gt-ml-2 gt-font-12">{{.locale.Tr "repo.topic.manage_topics"}}</button>{{end}}
+               <div class="gt-df gt-ac gt-fw gt-gap-2" id="repo-topics">
+                       {{range .Topics}}<a class="ui repo-topic large label topic gt-m-0" 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 gt-font-12">{{.locale.Tr "repo.topic.manage_topics"}}</button>{{end}}
                </div>
                {{end}}
                {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
index 3862436701957538250f3e1145bdaf9cbe7cebb8..da5cd06b3e8a426b105522f070ac4570ef9da2b9 100644 (file)
   display: flex;
   justify-content: space-between;
   align-items: center;
+  margin-bottom: 5px;
 }
 
 @media (max-width: 767.68px) {
@@ -2777,7 +2778,6 @@ tbody.commit-list {
 #repo-topics .repo-topic {
   font-weight: var(--font-weight-normal);
   cursor: pointer;
-  margin: 2px;
 }
 
 #new-dependency-drop-list.ui.selection.dropdown {