|
2 | 2 | {{range $k, $line := $.section.Lines}}
|
3 | 3 | <tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}} line-expanded">
|
4 | 4 | {{if eq .GetType 4}}
|
| 5 | + {{$expandDirection := $line.GetExpandDirection}} |
5 | 6 | <td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}">
|
6 |
| - <div class="tw-flex"> |
7 |
| - {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} |
| 7 | + <div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}"> |
| 8 | + {{if or (eq $expandDirection 3) (eq $expandDirection 5)}} |
8 | 9 | <button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
|
9 | 10 | {{svg "octicon-fold-down"}}
|
10 | 11 | </button>
|
11 | 12 | {{end}}
|
12 |
| - {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} |
| 13 | + {{if or (eq $expandDirection 3) (eq $expandDirection 4)}} |
13 | 14 | <button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
|
14 | 15 | {{svg "octicon-fold-up"}}
|
15 | 16 | </button>
|
16 | 17 | {{end}}
|
17 |
| - {{if eq $line.GetExpandDirection 2}} |
| 18 | + {{if eq $expandDirection 2}} |
18 | 19 | <button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
|
19 | 20 | {{svg "octicon-fold"}}
|
20 | 21 | </button>
|
|
48 | 49 | {{range $k, $line := $.section.Lines}}
|
49 | 50 | <tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}} line-expanded">
|
50 | 51 | {{if eq .GetType 4}}
|
| 52 | + {{$expandDirection := $line.GetExpandDirection}} |
51 | 53 | <td colspan="2" class="lines-num">
|
52 |
| - <div class="tw-flex"> |
53 |
| - {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} |
| 54 | + <div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}"> |
| 55 | + {{if or (eq $expandDirection 3) (eq $expandDirection 5)}} |
54 | 56 | <button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?data-query={{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
|
55 | 57 | {{svg "octicon-fold-down"}}
|
56 | 58 | </button>
|
57 | 59 | {{end}}
|
58 |
| - {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} |
| 60 | + {{if or (eq $expandDirection 3) (eq $expandDirection 4)}} |
59 | 61 | <button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?data-query={{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
|
60 | 62 | {{svg "octicon-fold-up"}}
|
61 | 63 | </button>
|
62 | 64 | {{end}}
|
63 |
| - {{if eq $line.GetExpandDirection 2}} |
| 65 | + {{if eq $expandDirection 2}} |
64 | 66 | <button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?data-query={{$line.GetBlobExcerptQuery}}&style=unified&direction=&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}">
|
65 | 67 | {{svg "octicon-fold"}}
|
66 | 68 | </button>
|
|
0 commit comments