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/_footer.html.tmpl | 3 -- templates/_footer.tmpl | 3 ++ templates/_head.html.tmpl | 5 -- templates/_head.tmpl | 5 ++ templates/_header.html.tmpl | 14 ------ templates/_header.tmpl | 14 ++++++ templates/group_repos.html.tmpl | 36 --------------- templates/group_repos.tmpl | 36 +++++++++++++++ templates/index.html.tmpl | 59 ------------------------ templates/index.tmpl | 59 ++++++++++++++++++++++++ templates/login.html.tmpl | 55 ---------------------- templates/login.tmpl | 55 ++++++++++++++++++++++ templates/repo_commit.html.tmpl | 91 ------------------------------------- templates/repo_commit.tmpl | 91 +++++++++++++++++++++++++++++++++++++ templates/repo_index.html.tmpl | 93 -------------------------------------- templates/repo_index.tmpl | 93 ++++++++++++++++++++++++++++++++++++++ templates/repo_log.html.tmpl | 44 ------------------ templates/repo_log.tmpl | 44 ++++++++++++++++++ templates/repo_raw_dir.html.tmpl | 42 ----------------- templates/repo_raw_dir.tmpl | 42 +++++++++++++++++ templates/repo_tree_dir.html.tmpl | 60 ------------------------ templates/repo_tree_dir.tmpl | 60 ++++++++++++++++++++++++ templates/repo_tree_file.html.tmpl | 22 --------- templates/repo_tree_file.tmpl | 22 +++++++++ 24 files changed, 524 insertions(+), 524 deletions(-) delete mode 100644 templates/_footer.html.tmpl create mode 100644 templates/_footer.tmpl delete mode 100644 templates/_head.html.tmpl create mode 100644 templates/_head.tmpl delete mode 100644 templates/_header.html.tmpl create mode 100644 templates/_header.tmpl delete mode 100644 templates/group_repos.html.tmpl create mode 100644 templates/group_repos.tmpl delete mode 100644 templates/index.html.tmpl create mode 100644 templates/index.tmpl delete mode 100644 templates/login.html.tmpl create mode 100644 templates/login.tmpl delete mode 100644 templates/repo_commit.html.tmpl create mode 100644 templates/repo_commit.tmpl delete mode 100644 templates/repo_index.html.tmpl create mode 100644 templates/repo_index.tmpl delete mode 100644 templates/repo_log.html.tmpl create mode 100644 templates/repo_log.tmpl delete mode 100644 templates/repo_raw_dir.html.tmpl create mode 100644 templates/repo_raw_dir.tmpl delete mode 100644 templates/repo_tree_dir.html.tmpl create mode 100644 templates/repo_tree_dir.tmpl delete mode 100644 templates/repo_tree_file.html.tmpl create mode 100644 templates/repo_tree_file.tmpl (limited to 'templates') diff --git a/templates/_footer.html.tmpl b/templates/_footer.html.tmpl deleted file mode 100644 index b4cce19..0000000 --- a/templates/_footer.html.tmpl +++ /dev/null @@ -1,3 +0,0 @@ -{{- define "footer" -}} -Lindenii Forge {{ .global.forge_version }} (source, upstream) -{{- end -}} diff --git a/templates/_footer.tmpl b/templates/_footer.tmpl new file mode 100644 index 0000000..b4cce19 --- /dev/null +++ b/templates/_footer.tmpl @@ -0,0 +1,3 @@ +{{- define "footer" -}} +Lindenii Forge {{ .global.forge_version }} (source, upstream) +{{- end -}} diff --git a/templates/_head.html.tmpl b/templates/_head.html.tmpl deleted file mode 100644 index 4641107..0000000 --- a/templates/_head.html.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{{- define "head_common" -}} - - - -{{- end -}} diff --git a/templates/_head.tmpl b/templates/_head.tmpl new file mode 100644 index 0000000..4641107 --- /dev/null +++ b/templates/_head.tmpl @@ -0,0 +1,5 @@ +{{- define "head_common" -}} + + + +{{- end -}} diff --git a/templates/_header.html.tmpl b/templates/_header.html.tmpl deleted file mode 100644 index 6d0a3a2..0000000 --- a/templates/_header.html.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{{- define "header" -}} -
- -
- {{ if ne .user_id "" }} - {{ .username }} - {{ else }} - Login - {{ end }} -
-
-{{- end -}} diff --git a/templates/_header.tmpl b/templates/_header.tmpl new file mode 100644 index 0000000..6d0a3a2 --- /dev/null +++ b/templates/_header.tmpl @@ -0,0 +1,14 @@ +{{- define "header" -}} +
+ +
+ {{ if ne .user_id "" }} + {{ .username }} + {{ else }} + Login + {{ end }} +
+
+{{- end -}} diff --git a/templates/group_repos.html.tmpl b/templates/group_repos.html.tmpl deleted file mode 100644 index 8c95c91..0000000 --- a/templates/group_repos.html.tmpl +++ /dev/null @@ -1,36 +0,0 @@ -{{- define "group_repos" -}} - - - - {{ template "head_common" . }} - Repos in {{ .group_name }} – {{ .global.forge_title }} - - - {{ template "header" . }} -
- - - - - - - - {{- range .repos }} - - - - - {{- end }} - -
Repos in {{ .group_name }}
- {{ .Name }} - - {{ .Description }} -
-
- - - -{{- end -}} diff --git a/templates/group_repos.tmpl b/templates/group_repos.tmpl new file mode 100644 index 0000000..8c95c91 --- /dev/null +++ b/templates/group_repos.tmpl @@ -0,0 +1,36 @@ +{{- define "group_repos" -}} + + + + {{ template "head_common" . }} + Repos in {{ .group_name }} – {{ .global.forge_title }} + + + {{ template "header" . }} +
+ + + + + + + + {{- range .repos }} + + + + + {{- end }} + +
Repos in {{ .group_name }}
+ {{ .Name }} + + {{ .Description }} +
+
+ + + +{{- end -}} diff --git a/templates/index.html.tmpl b/templates/index.html.tmpl deleted file mode 100644 index 5f30f0c..0000000 --- a/templates/index.html.tmpl +++ /dev/null @@ -1,59 +0,0 @@ -{{- define "index" -}} - - - - {{ template "head_common" . }} - Index – {{ .global.forge_title }} - - - {{ template "header" . }} -
- - - - - - - - {{- range .groups }} - - - - - {{- end }} - -
- Groups -
- {{ .Name }} - - {{ .Description }} -
-
-
- - - - - - - - - - - - - - - - -
- Info -
SSH public key{{ .global.server_public_key_string }}
SSH fingerprint{{ .global.server_public_key_fingerprint }}
-
- - - -{{- end -}} diff --git a/templates/index.tmpl b/templates/index.tmpl new file mode 100644 index 0000000..5f30f0c --- /dev/null +++ b/templates/index.tmpl @@ -0,0 +1,59 @@ +{{- define "index" -}} + + + + {{ template "head_common" . }} + Index – {{ .global.forge_title }} + + + {{ template "header" . }} +
+ + + + + + + + {{- range .groups }} + + + + + {{- end }} + +
+ Groups +
+ {{ .Name }} + + {{ .Description }} +
+
+
+ + + + + + + + + + + + + + + + +
+ Info +
SSH public key{{ .global.server_public_key_string }}
SSH fingerprint{{ .global.server_public_key_fingerprint }}
+
+ + + +{{- end -}} diff --git a/templates/login.html.tmpl b/templates/login.html.tmpl deleted file mode 100644 index 3b0e74a..0000000 --- a/templates/login.html.tmpl +++ /dev/null @@ -1,55 +0,0 @@ -{{- define "login" -}} - - - - {{ template "head_common" . }} - Login – {{ .global.forge_title }} - - - {{ .login_error }} -
-
- - - - - - - - - - - - - - - - - - - - - -
- Password authentication -
Username - -
Password - -
-
-
-
-
- -
-
-
-
-
- - - -{{- end -}} diff --git a/templates/login.tmpl b/templates/login.tmpl new file mode 100644 index 0000000..3b0e74a --- /dev/null +++ b/templates/login.tmpl @@ -0,0 +1,55 @@ +{{- define "login" -}} + + + + {{ template "head_common" . }} + Login – {{ .global.forge_title }} + + + {{ .login_error }} +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Password authentication +
Username + +
Password + +
+
+
+
+
+ +
+
+
+
+
+ + + +{{- end -}} diff --git a/templates/repo_commit.html.tmpl b/templates/repo_commit.html.tmpl deleted file mode 100644 index 8797092..0000000 --- a/templates/repo_commit.html.tmpl +++ /dev/null @@ -1,91 +0,0 @@ -{{- 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 -}} 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 -}} diff --git a/templates/repo_index.html.tmpl b/templates/repo_index.html.tmpl deleted file mode 100644 index 29e597e..0000000 --- a/templates/repo_index.html.tmpl +++ /dev/null @@ -1,93 +0,0 @@ -{{- define "repo_index" -}} - - - - {{ template "head_common" . }} - {{ .group_name }}/repos/{{ .repo_name }} – {{ .global.forge_title }} - - - {{ template "header" . }} -
- - - - - - - - - - - - - - - - {{ if .repo_description }} - - - - - {{ end }} - -
Repo info
Name{{ .repo_name }}
Clonegit clone {{ .clone_url }}
Description{{ .repo_description }}
-
-
- - - - - - - - - {{- range .commits }} - - - - - - {{- end }} - -
{{ .Message | first_line }} - - - {{ .Author.When.Format "2006-01-02 15:04:05 -0700" }} -
-
-
- - - - - - - - - {{- $ref_type := .ref_type }} - {{- $ref := .ref_name }} - {{- range .files }} - - - - - - {{- end }} - -
{{ .Mode }}{{ .Name }}{{ if not .Is_file }}/{{ end }}{{ .Size }}
-
-
-
- - -
- {{ .readme }} -
-
-
- - - -{{- end -}} diff --git a/templates/repo_index.tmpl b/templates/repo_index.tmpl new file mode 100644 index 0000000..29e597e --- /dev/null +++ b/templates/repo_index.tmpl @@ -0,0 +1,93 @@ +{{- define "repo_index" -}} + + + + {{ template "head_common" . }} + {{ .group_name }}/repos/{{ .repo_name }} – {{ .global.forge_title }} + + + {{ template "header" . }} +
+ + + + + + + + + + + + + + + + {{ if .repo_description }} + + + + + {{ end }} + +
Repo info
Name{{ .repo_name }}
Clonegit clone {{ .clone_url }}
Description{{ .repo_description }}
+
+
+ + + + + + + + + {{- range .commits }} + + + + + + {{- end }} + +
{{ .Message | first_line }} + + + {{ .Author.When.Format "2006-01-02 15:04:05 -0700" }} +
+
+
+ + + + + + + + + {{- $ref_type := .ref_type }} + {{- $ref := .ref_name }} + {{- range .files }} + + + + + + {{- end }} + +
{{ .Mode }}{{ .Name }}{{ if not .Is_file }}/{{ end }}{{ .Size }}
+
+
+
+ + +
+ {{ .readme }} +
+
+
+ + + +{{- end -}} diff --git a/templates/repo_log.html.tmpl b/templates/repo_log.html.tmpl deleted file mode 100644 index 6b89cdd..0000000 --- a/templates/repo_log.html.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -{{- define "repo_log" -}} - - - - {{ template "head_common" . }} - Log of {{ .group_name }}/repos/{{ .repo_name }} – {{ .global.forge_title }} - - - {{ template "header" . }} -
- - - - - - - - - - - - - - {{- range .commits }} - - - - - - - {{- end }} - -
Commits {{ if .ref_name }} on {{ .ref_name }}{{ end }}
IDTitleAuthorTime
{{ .ID }}{{ .Message | first_line }} - - - {{ .Author.When.Format "2006-01-02 15:04:05 -0700" }} -
-
- - - -{{- end -}} diff --git a/templates/repo_log.tmpl b/templates/repo_log.tmpl new file mode 100644 index 0000000..6b89cdd --- /dev/null +++ b/templates/repo_log.tmpl @@ -0,0 +1,44 @@ +{{- define "repo_log" -}} + + + + {{ template "head_common" . }} + Log of {{ .group_name }}/repos/{{ .repo_name }} – {{ .global.forge_title }} + + + {{ template "header" . }} +
+ + + + + + + + + + + + + + {{- range .commits }} + + + + + + + {{- end }} + +
Commits {{ if .ref_name }} on {{ .ref_name }}{{ end }}
IDTitleAuthorTime
{{ .ID }}{{ .Message | first_line }} + + + {{ .Author.When.Format "2006-01-02 15:04:05 -0700" }} +
+
+ + + +{{- end -}} diff --git a/templates/repo_raw_dir.html.tmpl b/templates/repo_raw_dir.html.tmpl deleted file mode 100644 index d38731b..0000000 --- a/templates/repo_raw_dir.html.tmpl +++ /dev/null @@ -1,42 +0,0 @@ -{{- define "repo_raw_dir" -}} - - - - {{ template "head_common" . }} - {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – {{ .global.forge_title }} - - - {{ template "header" . }} -
- - - - - - - - {{- $path_spec := .path_spec }} - {{- $ref := .ref_name }} - {{- $ref_type := .ref_type }} - {{- range .files }} - - - - - - {{- end }} - -
- (Raw) /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }}{{ if .ref_name }} on {{ .ref_name }}{{ end }} -
{{ .Mode }}{{ .Name }}{{ if not .Is_file }}/{{ end }}{{ .Size }}
-
-
-
-
-
- - - -{{- end -}} diff --git a/templates/repo_raw_dir.tmpl b/templates/repo_raw_dir.tmpl new file mode 100644 index 0000000..d38731b --- /dev/null +++ b/templates/repo_raw_dir.tmpl @@ -0,0 +1,42 @@ +{{- define "repo_raw_dir" -}} + + + + {{ template "head_common" . }} + {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – {{ .global.forge_title }} + + + {{ template "header" . }} +
+ + + + + + + + {{- $path_spec := .path_spec }} + {{- $ref := .ref_name }} + {{- $ref_type := .ref_type }} + {{- range .files }} + + + + + + {{- end }} + +
+ (Raw) /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }}{{ if .ref_name }} on {{ .ref_name }}{{ end }} +
{{ .Mode }}{{ .Name }}{{ if not .Is_file }}/{{ end }}{{ .Size }}
+
+
+
+
+
+ + + +{{- end -}} diff --git a/templates/repo_tree_dir.html.tmpl b/templates/repo_tree_dir.html.tmpl deleted file mode 100644 index 5e0fdcc..0000000 --- a/templates/repo_tree_dir.html.tmpl +++ /dev/null @@ -1,60 +0,0 @@ -{{- define "repo_tree_dir" -}} - - - - {{ template "head_common" . }} - {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – {{ .global.forge_title }} - - - {{ template "header" . }} -
- - - - - - - - {{- $path_spec := .path_spec }} - {{- $ref := .ref_name }} - {{- $ref_type := .ref_type }} - {{- range .files }} - - - - - - {{- end }} - -
- /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }}{{ if .ref_name }} on {{ .ref_name }}{{ end }} -
{{ .Mode }}{{ .Name }}{{ if not .Is_file }}/{{ end }}{{ .Size }}
-
-
-
-
-
-
- {{ if .readme }} - - - - - - - - - - - -
{{ .readme_filename }}
- {{ .readme -}} -
- {{ end }} -
- - - -{{- end -}} diff --git a/templates/repo_tree_dir.tmpl b/templates/repo_tree_dir.tmpl new file mode 100644 index 0000000..5e0fdcc --- /dev/null +++ b/templates/repo_tree_dir.tmpl @@ -0,0 +1,60 @@ +{{- define "repo_tree_dir" -}} + + + + {{ template "head_common" . }} + {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – {{ .global.forge_title }} + + + {{ template "header" . }} +
+ + + + + + + + {{- $path_spec := .path_spec }} + {{- $ref := .ref_name }} + {{- $ref_type := .ref_type }} + {{- range .files }} + + + + + + {{- end }} + +
+ /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }}{{ if .ref_name }} on {{ .ref_name }}{{ end }} +
{{ .Mode }}{{ .Name }}{{ if not .Is_file }}/{{ end }}{{ .Size }}
+
+
+
+
+
+
+ {{ if .readme }} + + + + + + + + + + + +
{{ .readme_filename }}
+ {{ .readme -}} +
+ {{ end }} +
+ + + +{{- end -}} diff --git a/templates/repo_tree_file.html.tmpl b/templates/repo_tree_file.html.tmpl deleted file mode 100644 index 7d5069c..0000000 --- a/templates/repo_tree_file.html.tmpl +++ /dev/null @@ -1,22 +0,0 @@ -{{- define "repo_tree_file" -}} - - - - {{ template "head_common" . }} - - {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }} – {{ .global.forge_title }} - - - {{ template "header" . }} -
-

- /{{ .path_spec }} (raw) -

- {{ .file_contents }} -
- - - -{{- end -}} diff --git a/templates/repo_tree_file.tmpl b/templates/repo_tree_file.tmpl new file mode 100644 index 0000000..7d5069c --- /dev/null +++ b/templates/repo_tree_file.tmpl @@ -0,0 +1,22 @@ +{{- define "repo_tree_file" -}} + + + + {{ template "head_common" . }} + + {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }} – {{ .global.forge_title }} + + + {{ template "header" . }} +
+

+ /{{ .path_spec }} (raw) +

+ {{ .file_contents }} +
+ + + +{{- end -}} -- cgit v1.2.3