From d5416d850c9b697bc8fb189841e1c1e622494f5e Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 15 Feb 2025 00:32:39 +0800 Subject: templates: *.html.tmpl -> *.tmpl --- templates/repo_commit.tmpl | 91 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 templates/repo_commit.tmpl (limited to 'templates/repo_commit.tmpl') diff --git a/templates/repo_commit.tmpl b/templates/repo_commit.tmpl new file mode 100644 index 0000000..8797092 --- /dev/null +++ b/templates/repo_commit.tmpl @@ -0,0 +1,91 @@ +{{- define "repo_commit" -}} + + + + {{ template "head_common" . }} + {{ .group_name }}/repos/{{ .repo_name }} – {{ .global.forge_title }} + + + {{ template "header" . }} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Commit info
ID{{ .commit_id }}
Author{{ .commit_object.Author.Name }} <{{ .commit_object.Author.Email }}>
Author date{{ .commit_object.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}
Committer{{ .commit_object.Committer.Name }} <{{ .commit_object.Committer.Email }}>
Committer date{{ .commit_object.Committer.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}
Message
{{ .commit_object.Message }}
Actions
Get patch
+
+
+ {{ $parent_commit_hash := .parent_commit_hash }} + {{ $commit_object := .commit_object }} + {{ range .file_patches }} +
+ + +
+ {{ range .Chunks }} + {{ if eq .Operation 0 }} +
{{ .Content }}
+ {{ else if eq .Operation 1 }} +
{{ .Content }}
+ {{ else if eq .Operation 2 }} +
{{ .Content }}
+ {{ else }} +
{{ .Content }}
+ {{ end }} + {{ end }} +
+
+ {{ end }} +
+ + + +{{- end -}} -- cgit v1.2.3