diff options
author | silverwind <me@silverwind.io> | 2020-12-20 19:00:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 13:00:03 -0500 |
commit | b4f8da533e1771eb1e0d222d8d586b4220447e4c (patch) | |
tree | c5db36e00ba4cb2383f9773e1e2e5e8950e9fb92 /templates/repo/diff/image_diff.tmpl | |
parent | e0a84d78809f4b19247ec7538e76f73b1f4c499f (diff) | |
download | gitea-b4f8da533e1771eb1e0d222d8d586b4220447e4c.tar.gz gitea-b4f8da533e1771eb1e0d222d8d586b4220447e4c.zip |
Search and Diff CSS enhancements (#14050)
* Search and Diff CSS enhancements
- Use flexbox for language stats
- Improve labels and code boxes on repo and code search
- Use flexbox on diff header and improve suppressed diff text
- Add dedicated color for diff expander
* more diff tweaks, less vertical padding on header
* more minor tweaks
* always show fold icon, image diff improvments
* remove margin
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/repo/diff/image_diff.tmpl')
-rw-r--r-- | templates/repo/diff/image_diff.tmpl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/repo/diff/image_diff.tmpl b/templates/repo/diff/image_diff.tmpl index 6afb985e9a..eda208d744 100644 --- a/templates/repo/diff/image_diff.tmpl +++ b/templates/repo/diff/image_diff.tmpl @@ -2,22 +2,22 @@ {{ $imagePathNew := printf "%s/%s" .root.RawPath (EscapePound .file.Name) }} <tr> - <th class="halfwidth center"> + <th class="halfwidth center pl-3 pr-2"> {{.root.i18n.Tr "repo.diff.file_before"}} </th> - <th class="halfwidth center"> + <th class="halfwidth center pl-2 pr-3"> {{.root.i18n.Tr "repo.diff.file_after"}} </th> </tr> <tr> - <td class="halfwidth center"> + <td class="halfwidth center pl-3 pr-2"> {{if or .file.IsDeleted (not .file.IsCreated)}} <a href="{{$imagePathOld}}" target="_blank"> <img src="{{$imagePathOld}}" class="border red" /> </a> {{end}} </td> - <td class="halfwidth center"> + <td class="halfwidth center pl-2 pr-3"> {{if or .file.IsCreated (not .file.IsDeleted)}} <a href="{{$imagePathNew}}" target="_blank"> <img src="{{$imagePathNew}}" class="border green" /> @@ -29,7 +29,7 @@ {{ $imageInfoHead := (call .root.ImageInfo .file.Name) }} {{if or $imageInfoBase $imageInfoHead }} <tr> - <td class="halfwidth center"> + <td class="halfwidth center pl-3 pr-2"> {{if $imageInfoBase }} {{ $classWidth := "" }} {{ $classHeight := "" }} @@ -52,7 +52,7 @@ {{.root.i18n.Tr "repo.diff.file_byte_size"}}: <span class="text {{$classByteSize}}">{{FileSize $imageInfoBase.ByteSize}}</span> {{end}} </td> - <td class="halfwidth center"> + <td class="halfwidth center pl-2 pr-3"> {{if $imageInfoHead }} {{ $classWidth := "" }} {{ $classHeight := "" }} |