|
1 | 1 | {{if $.IsSplitStyle}}
|
2 |
| - {{range $k, $line := $.section.Lines}} |
3 |
| - <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}"> |
4 |
| - {{if eq .GetType 4}} |
5 |
| - <td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"> |
6 |
| - {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }} |
7 |
| - <i class="ui blob-excerpt fa fa-caret-down" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=down" data-anchor="{{$.Anchor}}"></i> |
8 |
| - {{end}} |
9 |
| - {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }} |
10 |
| - <i class="ui blob-excerpt fa fa-caret-up" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up" data-anchor="{{$.Anchor}}"></i> |
11 |
| - {{end}} |
12 |
| - {{if eq $line.GetExpandDirection 2}} |
13 |
| - <span class="ui blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=" data-anchor="{{$.Anchor}}">{{svg "octicon-fold" 16}}</span> |
14 |
| - {{end}} |
15 |
| - </td> |
16 |
| - <td colspan="5" class="lines-code lines-code-old "><span class="mono wrap">{{$.section.GetComputedInlineDiffFor $line}}</span></td> |
17 |
| - {{else}} |
18 |
| - <td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{Sha1 $.fileName}}L{{$line.LeftIdx}}{{end}}"></span></td> |
19 |
| - <td class="blob-excerpt lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="mono" data-type-marker=""></span>{{end}}</td> |
20 |
| - <td class="blob-excerpt lines-code lines-code-old halfwidth"><span class="mono wrap">{{if $line.LeftIdx}}{{$.section.GetComputedInlineDiffFor $line}}{{end}}</span></td> |
21 |
| - <td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{Sha1 $.fileName}}R{{$line.RightIdx}}{{end}}"></span></td> |
22 |
| - <td class="blob-excerpt lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="mono" data-type-marker=""></span>{{end}}</td> |
23 |
| - <td class="blob-excerpt lines-code lines-code-new halfwidth"><span class="mono wrap">{{if $line.RightIdx}}{{$.section.GetComputedInlineDiffFor $line}}{{end}}</span></td> |
24 |
| - {{end}} |
25 |
| - </tr> |
26 |
| - {{end}} |
| 2 | + {{range $k, $line := $.section.Lines}} |
| 3 | + <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}"> |
| 4 | + {{if eq .GetType 4}} |
| 5 | + <td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"> |
| 6 | + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }} |
| 7 | + <a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=down" data-anchor="{{$.Anchor}}"> |
| 8 | + {{svg "octicon-fold-down" 16}} |
| 9 | + </a> |
| 10 | + {{end}} |
| 11 | + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }} |
| 12 | + <a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up" data-anchor="{{$.Anchor}}"> |
| 13 | + {{svg "octicon-fold-up" 16}} |
| 14 | + </a> |
| 15 | + {{end}} |
| 16 | + {{if eq $line.GetExpandDirection 2}} |
| 17 | + <a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=" data-anchor="{{$.Anchor}}"> |
| 18 | + {{svg "octicon-fold" 16}} |
| 19 | + </a> |
| 20 | + {{end}} |
| 21 | + </td> |
| 22 | + <td colspan="5" class="lines-code lines-code-old "><span class="mono wrap">{{$.section.GetComputedInlineDiffFor $line}}</span></td> |
| 23 | + {{else}} |
| 24 | + <td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{Sha1 $.fileName}}L{{$line.LeftIdx}}{{end}}"></span></td> |
| 25 | + <td class="blob-excerpt lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="mono" data-type-marker=""></span>{{end}}</td> |
| 26 | + <td class="blob-excerpt lines-code lines-code-old halfwidth"><span class="mono wrap">{{if $line.LeftIdx}}{{$.section.GetComputedInlineDiffFor $line}}{{end}}</span></td> |
| 27 | + <td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{Sha1 $.fileName}}R{{$line.RightIdx}}{{end}}"></span></td> |
| 28 | + <td class="blob-excerpt lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="mono" data-type-marker=""></span>{{end}}</td> |
| 29 | + <td class="blob-excerpt lines-code lines-code-new halfwidth"><span class="mono wrap">{{if $line.RightIdx}}{{$.section.GetComputedInlineDiffFor $line}}{{end}}</span></td> |
| 30 | + {{end}} |
| 31 | + </tr> |
| 32 | + {{end}} |
27 | 33 | {{else}}
|
28 |
| - {{range $k, $line := $.section.Lines}} |
29 |
| - <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}"> |
30 |
| - {{if eq .GetType 4}} |
31 |
| - <td colspan="2" class="lines-num"> |
32 |
| - {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }} |
33 |
| - <i class="ui blob-excerpt fa fa-caret-up" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=up" data-anchor="{{$.Anchor}}"></i> |
34 |
| - {{end}} |
35 |
| - {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }} |
36 |
| - <i class="ui blob-excerpt fa fa-caret-down" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down" data-anchor="{{$.Anchor}}"></i> |
37 |
| - {{end}} |
38 |
| - {{if eq $line.GetExpandDirection 2}} |
39 |
| - <span class="ui blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=" data-anchor="{{$.Anchor}}">{{svg "octicon-fold" 16}}</span> |
40 |
| - {{end}} |
41 |
| - </td> |
42 |
| - {{else}} |
43 |
| - <td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{Sha1 $.fileName}}L{{$line.LeftIdx}}{{end}}"></span></td> |
44 |
| - <td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{Sha1 $.fileName}}R{{$line.RightIdx}}{{end}}"></span></td> |
45 |
| - {{end}} |
46 |
| - <td class="blob-excerpt lines-type-marker"><span class="mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> |
47 |
| - <td class="blob-excerpt lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}"><span class="mono wrap">{{$.section.GetComputedInlineDiffFor $line}}</span></td> |
48 |
| - </tr> |
49 |
| - {{end}} |
| 34 | + {{range $k, $line := $.section.Lines}} |
| 35 | + <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}"> |
| 36 | + {{if eq .GetType 4}} |
| 37 | + <td colspan="2" class="lines-num"> |
| 38 | + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }} |
| 39 | + <a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down" data-anchor="{{$.Anchor}}"> |
| 40 | + {{svg "octicon-fold-down" 16}} |
| 41 | + </a> |
| 42 | + {{end}} |
| 43 | + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }} |
| 44 | + <a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=up" data-anchor="{{$.Anchor}}"> |
| 45 | + {{svg "octicon-fold-up" 16}} |
| 46 | + </a> |
| 47 | + {{end}} |
| 48 | + {{if eq $line.GetExpandDirection 2}} |
| 49 | + <a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=" data-anchor="{{$.Anchor}}"> |
| 50 | + {{svg "octicon-fold" 16}} |
| 51 | + </a> |
| 52 | + {{end}} |
| 53 | + </td> |
| 54 | + {{else}} |
| 55 | + <td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{Sha1 $.fileName}}L{{$line.LeftIdx}}{{end}}"></span></td> |
| 56 | + <td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{Sha1 $.fileName}}R{{$line.RightIdx}}{{end}}"></span></td> |
| 57 | + {{end}} |
| 58 | + <td class="blob-excerpt lines-type-marker"><span class="mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> |
| 59 | + <td class="blob-excerpt lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}"><span class="mono wrap">{{$.section.GetComputedInlineDiffFor $line}}</span></td> |
| 60 | + </tr> |
| 61 | + {{end}} |
50 | 62 | {{end}}
|
0 commit comments