From fdd1941d976f48330515ed361b9fd88629eecb3f Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Sun, 24 May 2020 00:05:20 +0200 Subject: [PATCH] Fix styling and padding for commit list on PR view (#11588) * Fix styling and padding for commit list on PR view * fix bold on author --- templates/repo/commits_list_small.tmpl | 6 ++++-- templates/repo/issue/view_content/comments.tmpl | 2 +- web_src/less/_repository.less | 9 +++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/templates/repo/commits_list_small.tmpl b/templates/repo/commits_list_small.tmpl index 1450cdafbc733..fa564ca86b151 100644 --- a/templates/repo/commits_list_small.tmpl +++ b/templates/repo/commits_list_small.tmpl @@ -1,9 +1,10 @@ {{ $r:= List .Commits}} {{ $index := 0}} +
{{range $r}} {{ $tag := printf "%s-%d" $.HashTag $index }} {{ $index = Add $index 1}} -
+
{{svg "octicon-git-commit" 16}} {{if .User}} @@ -42,7 +43,7 @@ {{ $commitLink:= printf "%s/%s/%s/commit/%s" AppSubUrl $.Issue.PullRequest.BaseRepo.OwnerName $.Issue.PullRequest.BaseRepo.Name .ID }} - {{RenderCommitMessageLinkSubject .Message ($.Issue.PullRequest.BaseRepo.Link|Escape) $commitLink $.Issue.PullRequest.BaseRepo.ComposeMetas}} + {{RenderCommitMessageLinkSubject .Message ($.Issue.PullRequest.BaseRepo.Link|Escape) $commitLink $.Issue.PullRequest.BaseRepo.ComposeMetas}} {{if IsMultilineCommitMessage .Message}} @@ -55,3 +56,4 @@ {{end}}
{{end}} +
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 24984baebbfe3..78e38e4ca24cb 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -602,7 +602,7 @@ - {{.Poster.GetDisplayName}} + {{.Poster.GetDisplayName}} {{ if .IsForcePush }} {{$.i18n.Tr "repo.issues.force_push_codes" $.Issue.PullRequest.HeadBranch (ShortSha .OldCommit) ($.Issue.Repo.CommitLink .OldCommit) (ShortSha .NewCommit) ($.Issue.Repo.CommitLink .NewCommit) $createdStr | Safe}} {{else}} diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index b7b04009754ca..2328690b0b3f3 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -751,11 +751,11 @@ } } - &:first-child { + &:first-child:not(.commit) { padding-top: 0 !important; } - &:last-child { + &:last-child:not(.commit) { padding-bottom: 0 !important; } @@ -807,8 +807,9 @@ line-height: 30px; } - &.event.small-line-spacing { - padding: 2px 0 0 15px; + &.commits-list { + padding-left: 15px; + padding-top: 0; } &.event > .commit-status-link {