Skip to content

Commit f8bb101

Browse files
authored
Tweak repo topics bar (#25769)
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"> ---------
1 parent 52b3052 commit f8bb101

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/repo/home.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
</div>
3030
{{end}}
3131
</div>
32-
<div class="gt-df gt-ac gt-fw gt-mt-3" id="repo-topics">
33-
{{range .Topics}}<a class="ui repo-topic large label topic" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
34-
{{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}}
32+
<div class="gt-df gt-ac gt-fw gt-gap-2" id="repo-topics">
33+
{{range .Topics}}<a class="ui repo-topic large label topic gt-m-0" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
34+
{{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}}
3535
</div>
3636
{{end}}
3737
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}

web_src/css/repo.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@
231231
display: flex;
232232
justify-content: space-between;
233233
align-items: center;
234+
margin-bottom: 5px;
234235
}
235236

236237
@media (max-width: 767.68px) {
@@ -2777,7 +2778,6 @@ tbody.commit-list {
27772778
#repo-topics .repo-topic {
27782779
font-weight: var(--font-weight-normal);
27792780
cursor: pointer;
2780-
margin: 2px;
27812781
}
27822782

27832783
#new-dependency-drop-list.ui.selection.dropdown {

0 commit comments

Comments
 (0)