Skip to content

Commit

Permalink
more cleanups and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed May 14, 2023
1 parent f2e72d4 commit 5d182fa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 40 deletions.
4 changes: 2 additions & 2 deletions templates/repo/commits_list_small.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}}

<span class="ui float right shabox">
<span class="ui float right shabox gt-df gt-ac">
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}}
{{$class := "ui sha label"}}
{{if .Signature}}
Expand All @@ -32,7 +32,7 @@
{{$class = (printf "%s%s" $class " isWarning")}}
{{end}}
{{end}}
<a href="{{$commitLink}}" rel="nofollow" class="{{$class}}">
<a href="{{$commitLink}}" rel="nofollow" class="gt-ml-3 {{$class}}">
<span class="shortsha">{{ShortSha .ID.String}}</span>
{{if .Signature}}
{{template "repo/shabox_badge" dict "root" $.root "verification" .Verification}}
Expand Down
4 changes: 2 additions & 2 deletions templates/repo/issue/view_content/comments.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@
{{range $filename, $lines := .Review.CodeComments}}
{{range $line, $comms := $lines}}
<div class="ui segments">
<div class="ui segment gt-py-3 gt-df gt-ac gt-sb">
<div class="ui segment collapsible-comment-box gt-py-3 gt-df gt-ac gt-sb">
{{$invalid := (index $comms 0).Invalidated}}
{{$resolved := (index $comms 0).IsResolved}}
{{$resolveDoer := (index $comms 0).ResolveDoer}}
Expand Down Expand Up @@ -543,7 +543,7 @@
<div class="comment-header-left gt-df gt-ac">
{{if not .OriginalAuthor}}
<a class="avatar">
{{avatar $.Context .Poster}}
{{avatar $.Context .Poster 20}}
</a>
{{end}}
<span class="text grey muted-links">
Expand Down
14 changes: 1 addition & 13 deletions web_src/css/modules/comment.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,8 @@
}

.ui.comments .comment .avatar {
display: block;
width: 2.5em;
height: auto;
float: left;
margin: 0.2em 0 0;
}

.ui.comments .comment img.avatar,
.ui.comments .comment .avatar img {
display: block;
margin: 0 auto;
width: 100%;
height: 100%;
border-radius: 0.25rem;
width: 2.5em;
}

.ui.comments .comment > .content {
Expand Down
27 changes: 4 additions & 23 deletions web_src/css/repository.css
Original file line number Diff line number Diff line change
Expand Up @@ -793,14 +793,6 @@
display: none;
}

/* size adjustment is necessary until fomantic comment module removal */
.repository.view.issue .comment-list .timeline-item .comment-code-cloud img.avatar,
.repository.view.issue .comment-list .timeline-item .comment-code-cloud .avatar img {
width: 20px;
height: 20px;
vertical-align: middle;
}

.repository.view.issue .comment-list .timeline-item:first-child:not(.commit) {
padding-top: 0 !important;
}
Expand Down Expand Up @@ -1059,12 +1051,12 @@

.repository.view.issue .comment-list .code-comment {
border: 1px solid transparent;
padding: 0.25rem 0.5rem;
margin: 0;
}

.repository.view.issue .comment-list .code-comment .content {
border: none !important;
/* fix fomantic's border-radius via :first-child with hidden elements */
.collapsible-comment-box:has(.gt-hidden) {
border-radius: var(--border-radius) !important;
}

.repository.view.issue .comment-list .code-comment .comment-header {
Expand All @@ -1087,14 +1079,7 @@
}

.repository.view.issue .comment-list .comment > .avatar ~ .content {
margin-left: 3em;
}

/* size adjustment is necessary until fomantic comment module removal */
.repository.view.issue .comment-code-cloud .comment-list .code-comment img.avatar,
.repository.view.issue .comment-code-cloud .comment-list .comment img.avatar {
width: 28px;
height: 28px;
margin-left: 42px;
}

.repository.view.issue .comment-list .comment-code-cloud .segment.reactions {
Expand Down Expand Up @@ -1147,10 +1132,6 @@
text-decoration: line-through;
}

.ui.comments .comment .avatar {
margin: 0;
}

.repository .comment.form .ui.comments {
margin-top: -12px;
max-width: 100%;
Expand Down

0 comments on commit 5d182fa

Please sign in to comment.