From 0ea36025f45c14dc32d1644d483d1db8ed18a223 Mon Sep 17 00:00:00 2001
From: "oppili.bsky.social"
+{{- range .TextFragments -}}{{- .Header -}}{{- range .Lines -}} - {{- if eq .Op.String "+" -}} --- {{- end -}} - {{- if eq .Op.String "-" -}} -{{ .Op.String }}-{{ .Line }}--- {{- end -}} - {{- if eq .Op.String " " -}} -{{ .Op.String }}-{{ .Line }}--- {{- end -}} - {{- end -}} - {{- end -}}{{ .Op.String }}-{{ .Line }}-
{{- end -}} {{ end }} diff --git a/appview/pages/templates/fragments/editRepoDescription.html b/appview/pages/templates/fragments/editRepoDescription.html index d0c094b..c931b9c 100644 --- a/appview/pages/templates/fragments/editRepoDescription.html +++ b/appview/pages/templates/fragments/editRepoDescription.html @@ -1,10 +1,10 @@ {{ define "fragments/editRepoDescription" }} diff --git a/appview/pages/templates/fragments/repoDescription.html b/appview/pages/templates/fragments/repoDescription.html index 9f292d0..4a6735f 100644 --- a/appview/pages/templates/fragments/repoDescription.html +++ b/appview/pages/templates/fragments/repoDescription.html @@ -1,5 +1,5 @@ {{ define "fragments/repoDescription" }} - + {{ if .RepoInfo.Description }} {{ .RepoInfo.Description }} {{ else }} @@ -7,8 +7,8 @@ {{ end }} {{ if .RepoInfo.Roles.IsOwner }} - diff --git a/appview/pages/templates/repo/blob.html b/appview/pages/templates/repo/blob.html index 18a2cdc..d4c7643 100644 --- a/appview/pages/templates/repo/blob.html +++ b/appview/pages/templates/repo/blob.html @@ -60,7 +60,7 @@ {{ else }}{{- range .TextFragments -}}···+ {{- $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" -}} + {{- range .Lines -}} + {{- if eq .Op.String "+" -}} +++ {{- $newStart = add64 $newStart 1 -}} + {{- end -}} + {{- if eq .Op.String "-" -}} ++{{ $newStart }}+{{ .Op.String }}+{{ .Line }}+++ {{- $oldStart = add64 $oldStart 1 -}} + {{- end -}} + {{- if eq .Op.String " " -}} +{{ $oldStart }}++{{ .Op.String }}+{{ .Line }}+++ {{- $newStart = add64 $newStart 1 -}} + {{- $oldStart = add64 $oldStart 1 -}} + {{- end -}} + {{- end -}} + {{- end -}}{{ $oldStart }}+{{ $newStart }}+{{ .Op.String }}+{{ .Line }}+