Skip to content

Commit 3621000

Browse files
Cherrgtechknowlogick
authored andcommitted
ui - issue view - fix icon position (#7354)
* issue view - fix icon position - move style from template to css - add bullets to: key, circle-slash, comment Signed-off-by: Michael Gnehr <[email protected]> * add border to symbols Signed-off-by: Michael Gnehr <[email protected]> * fix circle slash position Signed-off-by: Michael Gnehr <[email protected]> * fix top margin Signed-off-by: Michael Gnehr <[email protected]> * changed mixed space/tab indent to tabindent only Signed-off-by: Michael Gnehr <[email protected]>
1 parent 5b92bc1 commit 3621000

File tree

5 files changed

+115
-67
lines changed

5 files changed

+115
-67
lines changed

public/css/index.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,12 +553,18 @@ footer .ui.left,footer .ui.right{line-height:40px}
553553
.repository.view.issue .comment-list .comment .ui.form textarea{height:200px;font-family:'SF Mono',Consolas,Menlo,'Liberation Mono',Monaco,'Lucida Console',monospace}
554554
.repository.view.issue .comment-list .comment .edit.buttons{margin-top:10px}
555555
.repository.view.issue .comment-list .event{position:relative;margin:15px 0 15px 79px;padding-left:25px}
556+
.repository.view.issue .comment-list .event>.octicon:not(.issue-symbol){text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}
557+
.repository.view.issue .comment-list .event>.octicon.issue-symbol{font-size:20px;margin-left:-35px;margin-right:-1px;margin-top:0!important;height:28px;width:28px;border-radius:50%;text-align:center;line-height:28px;background:#eee}
558+
.repository.view.issue .comment-list .event>.octicon.issue-symbol::before{width:15px;display:inline-block}
559+
.repository.view.issue .comment-list .event>.octicon.issue-symbol.octicon-key::before{width:18px}
560+
.repository.view.issue .comment-list .event>.octicon.issue-symbol.octicon-circle-slash::before{width:17px}
561+
.repository.view.issue .comment-list .event>.octicon.issue-symbol.octicon-comment{font-size:21px;line-height:33px}
562+
.repository.view.issue .comment-list .event>.octicon.issue-symbol.octicon-comment::before{width:20px}
556563
.repository.view.issue .comment-list .event .octicon{width:30px;float:left;text-align:center}
557564
.repository.view.issue .comment-list .event .octicon.octicon-circle-slash{margin-top:5px;margin-left:-34.5px;font-size:20px;color:#bd2c00}
558-
.repository.view.issue .comment-list .event .octicon.octicon-primitive-dot{margin-left:-28.5px;margin-right:-1px;font-size:30px;color:#6cc644}
559-
.repository.view.issue .comment-list .event .octicon.octicon-bookmark{margin-top:3px;margin-left:-31px;margin-right:-1px;font-size:25px}
560-
.repository.view.issue .comment-list .event .octicon.octicon-comment{margin-top:4px;margin-left:-35px;font-size:24px}
561-
.repository.view.issue .comment-list .event .octicon.octicon-eye{margin-top:3px;margin-left:-35px;margin-right:0;font-size:22px}
565+
.repository.view.issue .comment-list .event .octicon.octicon-primitive-dot{margin-top:-1px;margin-left:-28.5px;margin-right:-1px;font-size:30px;color:#6cc644}
566+
.repository.view.issue .comment-list .event .octicon.octicon-bookmark{margin-top:2px;margin-left:-31px;margin-right:-1px;font-size:25px}
567+
.repository.view.issue .comment-list .event .octicon.octicon-eye{margin-top:3px;margin-left:-36px;margin-right:0;font-size:22px}
562568
.repository.view.issue .comment-list .event .octicon.octicon-x{margin-left:-33px;font-size:25px}
563569
.repository.view.issue .comment-list .event .detail{font-size:.9rem;margin-top:5px;margin-left:35px}
564570
.repository.view.issue .comment-list .event .detail .octicon.octicon-git-commit{margin-top:2px}

public/css/theme-arc-green.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ footer{background:#2e323e;border-top:1px solid #313131}
112112
.repository.view.issue .comment-list .comment .content>.bottom.segment{background:#353945}
113113
.repository.view.issue .comment-list .comment .content .header{color:#dbdbdb;background-color:#404552;border-bottom:1px solid #353944}
114114
.repository.view.issue .comment-list .comment .content .merge-section{background-color:#404552;border-top:1px solid #353944}
115+
.repository.view.issue .comment-list .event>.octicon.issue-symbol{background:#3b4954}
116+
.repository.view.issue .comment-list .event>.octicon:not(.issue-symbol){text-shadow:-2px 0 #383c4a,0 2px #383c4a,2px 0 #383c4a,0 -2px #383c4a}
115117
.ui .text.grey a{color:#dbdbdb!important}
116118
.ui.comments .comment .actions a{color:#dbdbdb}
117119
.repository.view.issue .comment-list .comment .content .header:after{border-right-color:#404552}

public/less/_repository.less

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,45 @@
920920
margin: 15px 0 15px 79px;
921921
padding-left: 25px;
922922

923+
& > .octicon:not(.issue-symbol) {
924+
text-shadow: -2px 0 #fff, 0 2px #fff, 2px 0 #fff, 0 -2px #fff;
925+
}
926+
927+
& > .octicon.issue-symbol {
928+
font-size: 20px;
929+
margin-left: -35px;
930+
margin-right: -1px;
931+
margin-top: 0 !important;
932+
height: 28px;
933+
width: 28px;
934+
border-radius: 50%;
935+
text-align: center;
936+
line-height: 28px;
937+
background: #eee;
938+
939+
&::before {
940+
width: 15px;
941+
display: inline-block;
942+
}
943+
944+
&.octicon-key::before {
945+
width: 18px;
946+
}
947+
948+
&.octicon-circle-slash::before {
949+
width: 17px;
950+
}
951+
952+
&.octicon-comment {
953+
font-size: 21px;
954+
line-height: 33px;
955+
956+
&::before {
957+
width: 20px;
958+
}
959+
}
960+
}
961+
923962
.octicon {
924963
width: 30px;
925964
float: left;
@@ -933,28 +972,23 @@
933972
}
934973

935974
&.octicon-primitive-dot {
975+
margin-top: -1px;
936976
margin-left: -28.5px;
937977
margin-right: -1px;
938978
font-size: 30px;
939979
color: #6cc644;
940980
}
941981

942982
&.octicon-bookmark {
943-
margin-top: 3px;
983+
margin-top: 2px;
944984
margin-left: -31px;
945985
margin-right: -1px;
946986
font-size: 25px;
947987
}
948988

949-
&.octicon-comment {
950-
margin-top: 4px;
951-
margin-left: -35px;
952-
font-size: 24px;
953-
}
954-
955989
&.octicon-eye {
956990
margin-top: 3px;
957-
margin-left: -35px;
991+
margin-left: -36px;
958992
margin-right: 0;
959993
font-size: 22px;
960994
}

public/less/themes/arc-green.less

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,14 @@ a.ui.basic.green.label:hover {
595595
border-top: 1px solid #353944;
596596
}
597597

598+
.repository.view.issue .comment-list .event > .octicon.issue-symbol {
599+
background: #3b4954;
600+
}
601+
602+
.repository.view.issue .comment-list .event > .octicon:not(.issue-symbol) {
603+
text-shadow: -2px 0 #383c4a, 0 2px #383c4a, 2px 0 #383c4a, 0 -2px #383c4a;
604+
}
605+
598606
.ui .text.grey a {
599607
color: #dbdbdb !important;
600608
}

templates/repo/issue/view_content/comments.tmpl

Lines changed: 53 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
</div>
8383
{{else if eq .Type 2}}
8484
<div class="event">
85-
<span class="octicon octicon-circle-slash"></span>
85+
<span class="octicon octicon-circle-slash issue-symbol"></span>
8686
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
8787
<img src="{{.Poster.RelAvatarLink}}">
8888
</a>
@@ -172,7 +172,7 @@
172172
{{$.i18n.Tr "repo.issues.delete_branch_at" (.CommitSHA|Escape) $createdStr | Safe}}
173173
</span>
174174
</div>
175-
{{else if eq .Type 12}}
175+
{{else if eq .Type 12}}
176176
<div class="event">
177177
<span class="octicon octicon-primitive-dot"></span>
178178
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
@@ -245,55 +245,55 @@
245245
</div>
246246
{{else if eq .Type 19}}
247247
<div class="event">
248-
<span class="octicon octicon-primitive-dot"></span>
249-
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
248+
<span class="octicon octicon-primitive-dot"></span>
249+
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
250250
<img src="{{.Poster.RelAvatarLink}}">
251-
</a>
252-
<span class="text grey">
253-
{{$.i18n.Tr "repo.issues.dependency.added_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
254-
</span>
255-
<div class="detail">
256-
<span class="octicon octicon-plus"></span>
251+
</a>
252+
<span class="text grey">
253+
{{$.i18n.Tr "repo.issues.dependency.added_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
254+
</span>
255+
<div class="detail">
256+
<span class="octicon octicon-plus"></span>
257257
<span class="text grey"><a href="{{$.RepoLink}}/issues/{{.DependentIssue.Index}}">#{{.DependentIssue.Index}} {{.DependentIssue.Title}}</a></span>
258258
</div>
259-
</div>
259+
</div>
260260
{{else if eq .Type 20}}
261261
<div class="event">
262-
<span class="octicon octicon-primitive-dot"></span>
263-
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
264-
<img src="{{.Poster.RelAvatarLink}}">
265-
</a>
266-
<span class="text grey">
267-
{{$.i18n.Tr "repo.issues.dependency.removed_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
268-
</span>
269-
<div class="detail">
270-
<span class="text grey octicon octicon-trashcan"></span>
262+
<span class="octicon octicon-primitive-dot"></span>
263+
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
264+
<img src="{{.Poster.RelAvatarLink}}">
265+
</a>
266+
<span class="text grey">
267+
{{$.i18n.Tr "repo.issues.dependency.removed_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
268+
</span>
269+
<div class="detail">
270+
<span class="text grey octicon octicon-trashcan"></span>
271271
<span class="text grey"><a href="{{$.RepoLink}}/issues/{{.DependentIssue.Index}}">#{{.DependentIssue.Index}} {{.DependentIssue.Title}}</a></span>
272-
</div>
273-
</div>
272+
</div>
273+
</div>
274274
{{else if eq .Type 22}}
275-
<div class="event" id="{{.HashTag}}">
276-
<span class="octicon octicon-{{.Review.Type.Icon}}"></span>
277-
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
278-
<img src="{{.Poster.RelAvatarLink}}">
279-
</a>
280-
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
281-
{{if eq .Review.Type 1}}
282-
{{$.i18n.Tr "repo.issues.review.approve" $createdStr | Safe}}
283-
{{else if eq .Review.Type 2}}
284-
{{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}}
285-
{{else if eq .Review.Type 3}}
286-
{{$.i18n.Tr "repo.issues.review.reject" $createdStr | Safe}}
287-
{{else}}
288-
{{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}}
289-
{{end}}
290-
</span>
291-
{{if .Content}}
292-
<div class="detail">
275+
<div class="event" id="{{.HashTag}}">
276+
<span class="octicon octicon-{{.Review.Type.Icon}} issue-symbol"></span>
277+
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
278+
<img src="{{.Poster.RelAvatarLink}}">
279+
</a>
280+
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
281+
{{if eq .Review.Type 1}}
282+
{{$.i18n.Tr "repo.issues.review.approve" $createdStr | Safe}}
283+
{{else if eq .Review.Type 2}}
284+
{{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}}
285+
{{else if eq .Review.Type 3}}
286+
{{$.i18n.Tr "repo.issues.review.reject" $createdStr | Safe}}
287+
{{else}}
288+
{{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}}
289+
{{end}}
290+
</span>
291+
{{if .Content}}
292+
<div class="detail">
293293
<span class="octicon octicon-quote"></span>
294-
<span class="text grey">{{.Content}}</span>
295-
</div>
296-
{{end}}
294+
<span class="text grey">{{.Content}}</span>
295+
</div>
296+
{{end}}
297297
{{ range $filename, $lines := .Review.CodeComments}}
298298
{{range $line, $comms := $lines}}
299299
<div class="ui segments">
@@ -358,36 +358,34 @@
358358
</div>
359359
{{end}}
360360
{{end}}
361-
</div>
361+
</div>
362362
{{else if eq .Type 23}}
363363
<div class="event">
364-
<span class="octicon octicon-lock"
365-
style="font-size:20px;margin-left:-28.5px; margin-right: -1px"></span>
364+
<span class="octicon octicon-lock issue-symbol"></span>
366365
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
367366
<img src="{{.Poster.RelAvatarLink}}">
368367
</a>
369368

370369
{{ if .Content }}
371-
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
370+
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
372371
{{$.i18n.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}}
373-
</span>
372+
</span>
374373
{{ else }}
375-
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
374+
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
376375
{{$.i18n.Tr "repo.issues.lock_no_reason" $createdStr | Safe}}
377-
</span>
376+
</span>
378377
{{ end }}
379378
</div>
380379
{{else if eq .Type 24}}
381380
<div class="event">
382-
<span class="octicon octicon-key"
383-
style="font-size:20px;margin-left:-28.5px; margin-right: -1px"></span>
381+
<span class="octicon octicon-key issue-symbol"></span>
384382
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
385383
<img src="{{.Poster.RelAvatarLink}}">
386384
</a>
387385

388-
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
389-
{{$.i18n.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
390-
</span>
386+
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
387+
{{$.i18n.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
388+
</span>
391389
</div>
392390
{{end}}
393391
{{end}}

0 commit comments

Comments
 (0)