forked from forgejo/forgejo
Fix code view (diff) broken layout (#23096)
Close #22911 I think it's ready for review now, feel free to test it, welcome to help to improve. ### Before  ### After 
This commit is contained in:
parent
d93f3222a5
commit
d149093ce3
7 changed files with 33 additions and 38 deletions
|
@ -1,4 +1,11 @@
|
|||
{{$file := .file}}
|
||||
<colgroup>
|
||||
<col width="50">
|
||||
<col width="50">
|
||||
<col width="10">
|
||||
<col width="10">
|
||||
<col>
|
||||
</colgroup>
|
||||
{{range $j, $section := $file.Sections}}
|
||||
{{range $k, $line := $section.Lines}}
|
||||
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{DiffLineTypeToStr .GetType}}">
|
||||
|
@ -49,7 +56,6 @@
|
|||
</tr>
|
||||
{{if gt (len $line.Comments) 0}}
|
||||
<tr class="add-comment" data-line-type="{{DiffLineTypeToStr .GetType}}">
|
||||
<td colspan="3" class="lines-num"></td>
|
||||
<td class="add-comment-left add-comment-right" colspan="5">
|
||||
{{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}}
|
||||
</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue