Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 29733fd

Browse files
delvhsilverwind
authored andcommittedMay 20, 2023
Center the newly created excerpts too
1 parent abd9756 commit 29733fd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎templates/repo/diff/blob_excerpt.tmpl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@
33
<tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}">
44
{{if eq .GetType 4}}
55
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}">
6+
<div class="gt-df">
67
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
7-
<button class="blob-excerpt button button-ghost" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
8+
<button class="blob-excerpt button button-ghost gt-f1" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
89
{{svg "octicon-fold-down"}}
910
</button>
1011
{{end}}
1112
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}}
12-
<button class="blob-excerpt button button-ghost" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
13+
<button class="blob-excerpt button button-ghost gt-f1" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
1314
{{svg "octicon-fold-up"}}
1415
</button>
1516
{{end}}
1617
{{if eq $line.GetExpandDirection 2}}
17-
<button class="blob-excerpt button button-ghost" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
18+
<button class="blob-excerpt button button-ghost gt-f1" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
1819
{{svg "octicon-fold"}}
1920
</button>
2021
{{end}}
22+
</div>
2123
</td>
2224
<td colspan="7" class="lines-code lines-code-old ">{{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}}{{/*
2325
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.locale}}</td>

0 commit comments

Comments
 (0)
Please sign in to comment.