Skip to content

Commit 0c47fe2

Browse files
jaqralafriks
jaqra
authored andcommitted
[fix #7384] make show private icon when repo avatar set (#8144)
1 parent 2837563 commit 0c47fe2

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

public/css/index.css

+2
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,8 @@ footer .ui.left,footer .ui.right{line-height:40px}
417417
.repository .repo-header .ui.header{margin-top:0}
418418
.repository .repo-header .mega-octicon{width:30px;font-size:30px}
419419
.repository .repo-header .ui.huge.breadcrumb{font-weight:400;font-size:1.5rem}
420+
.repository .repo-header .ui.huge.breadcrumb i.mega-octicon{position:relative;top:5px}
421+
.repository .repo-header .ui.huge.breadcrumb i.octicon-lock{margin-left:5px}
420422
.repository .repo-header .fork-flag{margin-left:36px;margin-top:3px;display:block;font-size:12px;white-space:nowrap}
421423
.repository .repo-header .octicon.octicon-repo-forked{margin-top:-1px;font-size:15px}
422424
.repository .repo-header .button{margin-top:2px;margin-bottom:2px}

public/less/_repository.less

+9
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@
2020
.ui.huge.breadcrumb {
2121
font-weight: 400;
2222
font-size: 1.5rem;
23+
24+
i.mega-octicon {
25+
position: relative;
26+
top: 5px;
27+
}
28+
29+
i.octicon-lock {
30+
margin-left: 5px;
31+
}
2332
}
2433

2534
.fork-flag {

templates/repo/header.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
1212
<div class="divider"> / </div>
1313
<a href="{{$.RepoLink}}">{{.Name}}</a>
14+
{{if and .RelAvatarLink .IsPrivate}}<i class="mega-octicon octicon-lock"></i>{{end}}
1415
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
1516
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$.Mirror.Address}}">{{$.Mirror.Address}}</a></div>{{end}}
1617
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}

0 commit comments

Comments
 (0)