From dfbefd1a54a9de15ffeeaaac742b194329e2b2e3 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 28 Mar 2023 03:32:11 +0800 Subject: [PATCH] Fix SVG close tag, improve commit graph page UI alignment (#23751) Follow #23748 Thanks to @delvh ---- And, fix the UI alignment by the way (adding some `gt-mr-xx`) Before: ![image](https://user-images.githubusercontent.com/2114189/228034794-7a6ac8d6-01fa-4dd2-97d4-0df0368f8ee0.png) After: ![image](https://user-images.githubusercontent.com/2114189/228034938-64edeadf-7c99-4e74-b658-0ca62b72d596.png) --- templates/repo/graph/commits.tmpl | 12 ++++++------ templates/repo/graph/svgcontainer.tmpl | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/repo/graph/commits.tmpl b/templates/repo/graph/commits.tmpl index 0c1e777c34..4a01fefedd 100644 --- a/templates/repo/graph/commits.tmpl +++ b/templates/repo/graph/commits.tmpl @@ -28,10 +28,10 @@ {{- end -}} - + {{RenderCommitMessage $.Context $commit.Subject $.RepoLink $.Repository.ComposeMetas}} - + {{range $commit.Refs}} {{$refGroup := .RefGroup}} {{if eq $refGroup "pull"}} @@ -54,20 +54,20 @@ {{svg "octicon-git-branch" 16 "gt-mr-2"}}{{.ShortName}} {{else}} - + {{end}} {{end}} - + {{$userName := $commit.Commit.Author.Name}} {{if $commit.User}} {{if $commit.User.FullName}} {{$userName = $commit.User.FullName}} {{end}} - {{avatar $.Context $commit.User}} + {{avatar $.Context $commit.User}} {{$userName}} {{else}} - {{avatarByEmail $.Context $commit.Commit.Author.Email $userName}} + {{avatarByEmail $.Context $commit.Commit.Author.Email $userName}} {{$userName}} {{end}} diff --git a/templates/repo/graph/svgcontainer.tmpl b/templates/repo/graph/svgcontainer.tmpl index 12c2cb4eb9..26528ef81a 100644 --- a/templates/repo/graph/svgcontainer.tmpl +++ b/templates/repo/graph/svgcontainer.tmpl @@ -14,9 +14,9 @@ {{- else if eq $glyph.Glyph '_' -}} M {{Add (Mul $glyph.Column 5) 0}} {{Add (Mul $glyph.Row 12) 12}} h 10 {{/* */ -}} {{- end -}} - {{- end}}" stroke-width="1" fill="none" id="flow-{{$flow.ID}}-path" stroke-linecap="round"> + {{- end}}" stroke-width="1" fill="none" id="flow-{{$flow.ID}}-path" stroke-linecap="round"> {{range $flow.Commits}} - + {{end}} {{end}}