Skip to content

Commit 83d6e5e

Browse files
MayMeowtechknowlogick
authored andcommitted
Update UI for topics labels on projects (#6639)
1 parent 8371168 commit 83d6e5e

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

public/css/index.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2775,7 +2775,7 @@ function initTopicbar() {
27752775

27762776
var last = viewDiv.children("a").last();
27772777
for (var i=0; i < topicArray.length; i++) {
2778-
$('<div class="ui green basic label topic" style="cursor:pointer;">'+topicArray[i]+'</div>').insertBefore(last)
2778+
$('<div class="ui small label topic" style="cursor:pointer;">'+topicArray[i]+'</div>').insertBefore(last)
27792779
}
27802780
}
27812781
editDiv.css('display', 'none');
@@ -2817,7 +2817,7 @@ function initTopicbar() {
28172817
basic: true,
28182818
},
28192819
className: {
2820-
label: 'ui green basic label'
2820+
label: 'ui small label'
28212821
},
28222822
apiSettings: {
28232823
url: suburl + '/api/v1/topics/search?q={query}',

public/less/_explore.less

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
font-size: 12px;
4848
color: #808080;
4949
}
50+
.ui.tags {
51+
margin-bottom: 1em;
52+
}
5053
}
5154
}
5255

templates/explore/repo_list.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
</div>
2525
{{if .DescriptionHTML}}<p class="has-emoji">{{.DescriptionHTML}}</p>{{end}}
2626
{{if .Topics }}
27-
<div>
27+
<div class="ui tags">
2828
{{range .Topics}}
29-
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui green basic label topic">{{.}}</div></a>{{end}}
29+
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
3030
{{end}}
3131
</div>
3232
{{end}}

templates/repo/home.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{{end}}
2525
</div>
2626
<div class="ui" id="repo-topics">
27-
{{range .Topics}}<a class="ui repo-topic green basic label topic" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
27+
{{range .Topics}}<a class="ui repo-topic small label topic" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
2828
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<a id="manage_topic">{{.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}}
2929
</div>
3030
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
@@ -34,7 +34,7 @@
3434
<div class="ui fluid multiple search selection dropdown">
3535
<input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if lt (Add $i 1) (len $.Topics)}},{{end}}{{end}}">
3636
{{range .Topics}}
37-
<div class="ui green basic label topic transition visible" data-value="{{.Name}}" style="display: inline-block !important; cursor: default;">{{.Name}}<i class="delete icon"></i></div>
37+
<div class="ui small label topic transition visible" data-value="{{.Name}}" style="display: inline-block !important; cursor: default;">{{.Name}}<i class="delete icon"></i></div>
3838
{{end}}
3939
<div class="text"></div>
4040
</div>

0 commit comments

Comments
 (0)