diff --git a/appview/pages/templates/repo/fragments/diff.html b/appview/pages/templates/repo/fragments/diff.html index af614302..a737b297 100644 --- a/appview/pages/templates/repo/fragments/diff.html +++ b/appview/pages/templates/repo/fragments/diff.html @@ -3,12 +3,14 @@ #filesToggle:checked ~ div label[for="filesToggle"] .show-text { display: none; } #filesToggle:checked ~ div label[for="filesToggle"] .hide-text { display: inline; } #filesToggle:not(:checked) ~ div label[for="filesToggle"] .hide-text { display: none; } - #filesToggle:checked ~ div div#files { width: fit-content; max-width: 15vw; margin-right: 1rem; } + #filesToggle:checked ~ div div#files { width: fit-content; max-width: 15vw; } #filesToggle:not(:checked) ~ div div#files { width: 0; display: none; margin-right: 0; } + #filesToggle:not(:checked) ~ div div#resize-files { display: none; } {{ template "diffTopbar" . }} {{ block "diffLayout" . }} {{ end }} + {{ template "fragments/resizable" }} {{ end }} {{ define "diffTopbar" }} @@ -78,6 +80,19 @@ {{ end }} +{{ define "resize-grip" }} + {{ $id := index . 0 }} + {{ $target := index . 1 }} + {{ $direction := index . 2 }} + +{{ end }} + {{ define "diffLayout" }} {{ $diff := index . 0 }} {{ $opts := index . 1 }} @@ -90,8 +105,10 @@ + {{ template "resize-grip" (list "resize-files" "files" "before") }} + -
+
{{ template "diffFiles" (list $diff $opts) }}
diff --git a/appview/pages/templates/repo/pulls/pull.html b/appview/pages/templates/repo/pulls/pull.html index b13d15c2..0f6f5ca9 100644 --- a/appview/pages/templates/repo/pulls/pull.html +++ b/appview/pages/templates/repo/pulls/pull.html @@ -111,6 +111,19 @@ {{ end }} {{ end }} +{{ define "resize-grip" }} + {{ $id := index . 0 }} + {{ $target := index . 1 }} + {{ $direction := index . 2 }} + +{{ end }} + {{ define "diffLayout" }} {{ $diff := index . 0 }} {{ $opts := index . 1 }} @@ -124,11 +137,15 @@
+ {{ template "resize-grip" (list "resize-files" "files" "before") }} + -
+
{{ template "diffFiles" (list $diff $opts) }}
+ {{ template "resize-grip" (list "resize-subs" "subs" "after") }} + {{ template "subsPanel" $ }}
@@ -187,7 +204,6 @@ {{ define "subsToggle" }}