From 7386392b8cd08e73e4f5fa6080e8f4fcf20831f6 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 27 Jul 2024 08:00:00 +0800 Subject: Some more HTML sanities --- templates/commit.html | 185 +++++++++++++++++++++++++------------------------- 1 file changed, 93 insertions(+), 92 deletions(-) (limited to 'templates/commit.html') diff --git a/templates/commit.html b/templates/commit.html index c592523..c556fa8 100644 --- a/templates/commit.html +++ b/templates/commit.html @@ -1,105 +1,106 @@ {{ define "commit" }} -{{ template "head" . }} -{{ template "repoheader" . }} - - {{ template "nav" . }} -
-
-
{{- .commit.Message -}}
-
- {{ .commit.Author.Name }} {{ .commit.Author.Email}} -
{{ .commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}
-
- -
- commit -

- - {{ .commit.This }} - -

-
- - {{ if .commit.Parent }} -
- parent -

- - {{ .commit.Parent }} - -

-
- {{ end }} - -
-
- {{ .stat.FilesChanged }} files changed, - {{ .stat.Insertions }} insertions(+), - {{ .stat.Deletions }} deletions(-) + {{ template "head" . }} + + {{ template "repoheader" . }} + {{ template "nav" . }} +
+
+
{{- .commit.Message -}}
+
+ {{ .commit.Author.Name }} + {{ .commit.Author.Email }} +
{{ .commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}
+
-
- jump to - {{ range .diff }} - - {{ end }} + commit +

+ + {{ .commit.This }} + +

+
+ + {{ if .commit.Parent }} + + {{ end }} + +
+
+ {{ .stat.FilesChanged }} files changed, + {{ .stat.Insertions }} insertions(+), + {{ .stat.Deletions }} deletions(-) +
+
+
+ Jump to: + {{ range .diff }} + + {{ end }} +
-
-
-
- {{ $repo := .name }} - {{ $this := .commit.This }} - {{ $parent := .commit.Parent }} - {{ range .diff }} +
+
+ {{ $repo := .name }} + {{ $this := .commit.This }} + {{ $parent := .commit.Parent }} + {{ range .diff }}
- {{ if .IsNew }} - A - {{ end }} - {{ if .IsDelete }} - D - {{ end }} - {{ if not (or .IsNew .IsDelete) }} - M - {{ end }} - {{ if .Name.Old }} - {{ .Name.Old }} - {{ if .Name.New }} - → - {{ .Name.New }} - {{ end }} - {{ else }} - {{ .Name.New }} - {{- end -}} - {{ if .IsBinary }} -

Not showing binary file.

- {{ else }} -
-					{{- range .TextFragments -}}
-					

{{- .Header -}}

- {{- range .Lines -}} - {{- if eq .Op.String "+" -}} - {{ .String }} + {{ if .IsNew }} + A + {{ end }} + {{ if .IsDelete }} + D + {{ end }} + {{ if not (or .IsNew .IsDelete) }} + M + {{ end }} + {{ if .Name.Old }} + {{ .Name.Old }} + {{ if .Name.New }} + → + {{ .Name.New }} + {{ end }} + {{ else }} + {{ .Name.New }} {{- end -}} - {{- if eq .Op.String "-" -}} - {{ .String }} + {{ if .IsBinary }} +

Not showing binary file.

+ {{ else }} +
+							{{- range .TextFragments -}}
+								

{{- .Header -}}

+ {{- range .Lines -}} + {{- if eq .Op.String "+" -}} + {{ .String }} + {{- end -}} + {{- if eq .Op.String "-" -}} + {{ .String }} + {{- end -}} + {{- if eq .Op.String " " -}} + {{ .String }} + {{- end -}} + {{- end -}} + {{- end -}} +
{{- end -}} - {{- if eq .Op.String " " -}} - {{ .String }} - {{- end -}} - {{- end -}} - {{- end -}} - {{- end -}} -
-
+
- {{ end }} -
-
- + {{ end }} + + + {{ end }} -- cgit v1.2.3