- This file has been deleted in this commit. -
- {{ else }} - {{ if .IsBinary }} -- This is a binary file and will not be displayed. -
++ This file has been deleted. +
+ {{ else if .IsCopy }} ++ This file has been copied. +
+ {{ else if .IsRename }} ++ This file has been renamed. +
+ {{ else if .IsBinary }} ++ This is a binary file and will not be displayed. +
{{ else }} + {{ $name := .Name.New }}@@ -130,3 +160,16 @@ {{ end }} {{ end }} {{ end }} + +{{ define "statPill" }} +{{- range .TextFragments -}}{{- end -}} - {{ end }}···{{- $oldStart := .OldPosition -}} {{- $newStart := .NewPosition -}} - {{- $lineNrStyle := "min-w-[3rem] flex-shrink-0 select-none text-right" -}} - {{- $lineNrSepStyle1 := "text-gray-400 dark:text-gray-500 bg-white dark:bg-gray-800" -}} - {{- $lineNrSepStyle2 := "text-gray-400 dark:text-gray-500 bg-white dark:bg-gray-800 pr-2" -}} + {{- $lineNrStyle := "min-w-[3.5rem] flex-shrink-0 select-none text-right bg-white dark:bg-gray-800 scroll-mt-10 target:border target:border-amber-500 target:rounded " -}} + {{- $linkStyle := "text-gray-400 dark:text-gray-500 hover:underline" -}} + {{- $lineNrSepStyle1 := "" -}} + {{- $lineNrSepStyle2 := "pr-2" -}} {{- range .Lines -}} {{- if eq .Op.String "+" -}} @@ -99,7 +130,7 @@ {{- end -}} {{- if eq .Op.String "-" -}}-{{ $oldStart }}+{{ .Op.String }}{{ .Line }}@@ -108,8 +139,8 @@ {{- end -}} {{- if eq .Op.String " " -}}-@@ -119,7 +150,6 @@ {{- end -}} {{- end -}}{{ $oldStart }}-{{ $newStart }}+ +{{ .Op.String }}{{ .Line }}+ {{ if and .Insertions .Deletions }} + +{{ .Insertions }} + -{{ .Deletions }} + {{ else if .Insertions }} + +{{ .Insertions }} + {{ else if .Deletions }} + -{{ .Deletions }} + {{ end }} ++{{ end }} diff --git a/appview/pages/templates/repo/commit.html b/appview/pages/templates/repo/commit.html index 3aecab7..0185448 100644 --- a/appview/pages/templates/repo/commit.html +++ b/appview/pages/templates/repo/commit.html @@ -4,8 +4,6 @@ {{ $repo := .RepoInfo.FullName }} {{ $commit := .Diff.Commit }} -{{ $stat := .Diff.Stat }} -{{ $diff := .Diff.Diff }} @@ -13,7 +11,7 @@@@ -30,8 +28,6 @@ {{ timeFmt $commit.Author.When }} - {{ $stat.FilesChanged }} files (+{{ $stat.Insertions }}, -{{ $stat.Deletions }}) -{{ index $messageParts 0 }}
{{ if gt (len $messageParts) 1 }} -{{ nl2br (unwrapText (index $messageParts 1)) }}
+{{ nl2br (index $messageParts 1) }}
{{ end }}@@ -43,21 +39,6 @@
- {{ nl2br (unwrapText (index $messageParts 1)) }} + {{ nl2br (index $messageParts 1) }}
{{ end }} diff --git a/appview/pages/templates/repo/issues/issues.html b/appview/pages/templates/repo/issues/issues.html index c440353..baf5934 100644 --- a/appview/pages/templates/repo/issues/issues.html +++ b/appview/pages/templates/repo/issues/issues.html @@ -4,7 +4,7 @@filtering -
filtering