From 6cceade2da5425a2a1c46ac032263c961e81affb Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 12 Aug 2025 08:41:09 +0800 Subject: Sticky footer --- forged/static/style.css | 17 ++- forged/templates/400.tmpl | 10 +- forged/templates/400_colon.tmpl | 12 +- forged/templates/403.tmpl | 10 +- forged/templates/404.tmpl | 8 +- forged/templates/451.tmpl | 10 +- forged/templates/500.tmpl | 10 +- forged/templates/501.tmpl | 8 +- forged/templates/group.tmpl | 118 +++++++++--------- forged/templates/index.tmpl | 86 ++++++------- forged/templates/login.tmpl | 82 ++++++------- forged/templates/repo_branches.tmpl | 111 +++++++++-------- forged/templates/repo_commit.tmpl | 186 ++++++++++++++-------------- forged/templates/repo_contrib_index.tmpl | 120 ++++++++++--------- forged/templates/repo_contrib_one.tmpl | 200 ++++++++++++++++--------------- forged/templates/repo_index.tmpl | 144 +++++++++++----------- forged/templates/repo_log.tmpl | 136 ++++++++++----------- forged/templates/repo_raw_dir.tmpl | 130 ++++++++++---------- forged/templates/repo_tree_dir.tmpl | 142 +++++++++++----------- forged/templates/repo_tree_file.tmpl | 88 +++++++------- 20 files changed, 841 insertions(+), 787 deletions(-) (limited to 'forged') diff --git a/forged/static/style.css b/forged/static/style.css index 51846a2..13a2c8e 100644 --- a/forged/static/style.css +++ b/forged/static/style.css @@ -86,10 +86,8 @@ html, code, pre { /* Footer styles */ footer { - margin-top: 1rem; margin-left: auto; margin-right: auto; - margin-bottom: 1rem; display: block; padding: 0 5px; width: fit-content; @@ -104,6 +102,21 @@ footer a:link, footer a:visited { padding: 0 1rem; } +/* Sticky footer */ +body { + position: relative; + min-height: 100vh; +} +main { + padding-bottom: 2.5rem; +} +footer { + position: absolute; + bottom: 0; + width: 100%; + height: 2rem; +} + /* Link styles */ a:link, a:visited { text-decoration-color: var(--text-decoration-color); diff --git a/forged/templates/400.tmpl b/forged/templates/400.tmpl index 9c96ca5..5bb2185 100644 --- a/forged/templates/400.tmpl +++ b/forged/templates/400.tmpl @@ -11,10 +11,12 @@ {{- template "header" . -}} -
-

400 Bad Request

-

{{- .complete_error_msg -}}

-
+
+
+

400 Bad Request

+

{{- .complete_error_msg -}}

+
+
diff --git a/forged/templates/400_colon.tmpl b/forged/templates/400_colon.tmpl index c5f72a3..6509c0f 100644 --- a/forged/templates/400_colon.tmpl +++ b/forged/templates/400_colon.tmpl @@ -11,11 +11,13 @@ {{- template "header" . -}} -
-

400 Bad Request

-

We recently switched URL schemes. Previously “:” was used as our URL group separator, but because OpenSMTPD does not implement local-part address quoting properly, we’re unable to include “:” in URLs properly, hence we use “-” now.

-

As a precaution in case visitors get confused, this page was set up. You should probably replace the “:”s with “-”s in the URL bar. If there are colons in the URL that is not the group separator—that’s an edge case that we’ll fix later.

-
+
+
+

400 Bad Request

+

We recently switched URL schemes. Previously “:” was used as our URL group separator, but because OpenSMTPD does not implement local-part address quoting properly, we’re unable to include “:” in URLs properly, hence we use “-” now.

+

As a precaution in case visitors get confused, this page was set up. You should probably replace the “:”s with “-”s in the URL bar. If there are colons in the URL that is not the group separator—that’s an edge case that we’ll fix later.

+
+
diff --git a/forged/templates/403.tmpl b/forged/templates/403.tmpl index 4908c38..5090c60 100644 --- a/forged/templates/403.tmpl +++ b/forged/templates/403.tmpl @@ -11,10 +11,12 @@ {{- template "header" . -}} -
-

403 Forbidden

-

{{- .complete_error_msg -}}

-
+
+
+

403 Forbidden

+

{{- .complete_error_msg -}}

+
+
diff --git a/forged/templates/404.tmpl b/forged/templates/404.tmpl index d9485ef..10ee1b3 100644 --- a/forged/templates/404.tmpl +++ b/forged/templates/404.tmpl @@ -11,9 +11,11 @@ {{- template "header" . -}} -
-

404 Not Found

-
+
+
+

404 Not Found

+
+
diff --git a/forged/templates/451.tmpl b/forged/templates/451.tmpl index 510f96c..962fd90 100644 --- a/forged/templates/451.tmpl +++ b/forged/templates/451.tmpl @@ -11,10 +11,12 @@ {{- template "header" . -}} -
-

451 Unavailable For Legal Reasons

-

{{- .complete_error_msg -}}

-
+
+
+

451 Unavailable For Legal Reasons

+

{{- .complete_error_msg -}}

+
+
diff --git a/forged/templates/500.tmpl b/forged/templates/500.tmpl index b1dc15d..38603d5 100644 --- a/forged/templates/500.tmpl +++ b/forged/templates/500.tmpl @@ -11,10 +11,12 @@ {{- template "header" . -}} -
-

500 Internal Server Error

-

{{- .complete_error_msg -}}

-
+
+
+

500 Internal Server Error

+

{{- .complete_error_msg -}}

+
+
diff --git a/forged/templates/501.tmpl b/forged/templates/501.tmpl index d982bfc..f17b62e 100644 --- a/forged/templates/501.tmpl +++ b/forged/templates/501.tmpl @@ -11,9 +11,11 @@ {{- template "header" . -}} -
-

501 Not Implemented

-
+
+
+

501 Not Implemented

+
+
diff --git a/forged/templates/group.tmpl b/forged/templates/group.tmpl index b15c316..3338f9b 100644 --- a/forged/templates/group.tmpl +++ b/forged/templates/group.tmpl @@ -12,66 +12,68 @@ {{- template "header" . -}} -
- {{- if .description -}} -

{{- .description -}}

- {{- end -}} - {{- template "group_view" . -}} -
- {{- if .direct_access -}} +
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
- Create repo -
Name - -
Description - -
Contrib - -
-
-
-
-
- -
-
-
-
+ {{- if .description -}} +

{{- .description -}}

+ {{- end -}} + {{- template "group_view" . -}}
- {{- end -}} + {{- if .direct_access -}} +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Create repo +
Name + +
Description + +
Contrib + +
+
+
+
+
+ +
+
+
+
+
+ {{- end -}} +
diff --git a/forged/templates/index.tmpl b/forged/templates/index.tmpl index bd81f04..66bd177 100644 --- a/forged/templates/index.tmpl +++ b/forged/templates/index.tmpl @@ -11,50 +11,52 @@ {{- template "header" . -}} -
- - - - - - - - - - - - {{- range .groups -}} +
+
+
Groups
NameDescription
+ - - + - {{- end -}} - -
- {{- .Name -}} - - {{- .Description -}} - Groups
- - - - - - - - - - - - - - - - -
- Info -
SSH public key{{- .global.server_public_key_string -}}
SSH fingerprint{{- .global.server_public_key_fingerprint -}}
-
+ + Name + Description + + + + {{- range .groups -}} + + + {{- .Name -}} + + + {{- .Description -}} + + + {{- end -}} + + + + + + + + + + + + + + + + + + +
+ Info +
SSH public key{{- .global.server_public_key_string -}}
SSH fingerprint{{- .global.server_public_key_fingerprint -}}
+ + diff --git a/forged/templates/login.tmpl b/forged/templates/login.tmpl index 1e26c82..980b863 100644 --- a/forged/templates/login.tmpl +++ b/forged/templates/login.tmpl @@ -10,47 +10,49 @@ Login – {{ .global.forge_title -}} - {{- .login_error -}} -
-
- - - - - - - - - - - - - - - - - - - + + +
- Password authentication -
Username - -
Password - -
-
-
+
+ {{- .login_error -}} +
+ + + + + + + + + + + + + + + + + + + + - - -
+ Password authentication +
Username + +
Password + +
+
+
+
+
+ +
-
- -
- -
- -
+
+ +
+ diff --git a/forged/templates/repo_branches.tmpl b/forged/templates/repo_branches.tmpl index 55ea0a6..c32519d 100644 --- a/forged/templates/repo_branches.tmpl +++ b/forged/templates/repo_branches.tmpl @@ -12,60 +12,65 @@ {{- template "header" . -}} -
-

{{- .repo_name -}}

- -
-
-
- {{- .repo_description -}} +
+
+

{{- .repo_name -}}

+
-
-
-

- - Warning: Due to various recent migrations, viewing non-HEAD refs may be broken. - -

- - - - - - - - {{- range .branches -}} - - - - {{- end -}} - -
Branches
- {{ . }} -
-
+
+
+ {{- .repo_description -}} +
+
+
+

+ + Warning: Due to various recent migrations, viewing non-HEAD refs may be broken. + +

+ + + + + + + + {{- range .branches -}} + + + + {{- end -}} + +
Branches
+ {{ . }} +
+
+ +
+ {{- template "footer" . -}} +
{{- end -}} diff --git a/forged/templates/repo_commit.tmpl b/forged/templates/repo_commit.tmpl index 470bba9..42f2bcd 100644 --- a/forged/templates/repo_commit.tmpl +++ b/forged/templates/repo_commit.tmpl @@ -12,103 +12,105 @@ {{- template "header" . -}} -
-

{{- .repo_name -}}

- -
-
-
- {{- .repo_description -}} +
+
+

{{- .repo_name -}}

+
-
-
-
-
-
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" -}}
-
Actions
-
- Get patch -
-
+
+
+ {{- .repo_description -}} +
-
- -
-
{{- .commit_object.Message -}}
-
-
- {{- $parent_commit_hash := .parent_commit_hash -}} - {{- $commit_object := .commit_object -}} - {{- range .file_patches -}} -
- -
+
{{- template "footer" . -}}
diff --git a/forged/templates/repo_contrib_index.tmpl b/forged/templates/repo_contrib_index.tmpl index 172a079..7d2d474 100644 --- a/forged/templates/repo_contrib_index.tmpl +++ b/forged/templates/repo_contrib_index.tmpl @@ -12,68 +12,70 @@ {{- template "header" . -}} -
-

{{- .repo_name -}}

- -
-
-
- {{- .repo_description -}} +
+
+

{{- .repo_name -}}

+
-
-
-

How to submit a merge request

-
git clone {{ .ssh_clone_url }}
-cd {{ .repo_name }}
-git checkout -b contrib/name_of_your_contribution
-# edit and commit stuff
-git push -u origin HEAD
-

Pushes that update branches in other namespaces, or pushes to existing contribution branches belonging to other SSH keys, will be automatically -rejected, unless you are an authenticated maintainer. Otherwise, a merge request is automatically opened, and the maintainers are notified via IRC.

-

Alternatively, you may email patches to {{ .repo_patch_mailing_list }}.

-
-
- - - - - - - - - - {{- range .merge_requests -}} +
+
+ {{- .repo_description -}} +
+
+
+

How to submit a merge request

+
git clone {{ .ssh_clone_url }}
+	cd {{ .repo_name }}
+	git checkout -b contrib/name_of_your_contribution
+	# edit and commit stuff
+	git push -u origin HEAD
+

Pushes that update branches in other namespaces, or pushes to existing contribution branches belonging to other SSH keys, will be automatically + rejected, unless you are an authenticated maintainer. Otherwise, a merge request is automatically opened, and the maintainers are notified via IRC.

+

Alternatively, you may email patches to {{ .repo_patch_mailing_list }}.

+
+
+
IDTitleStatus
+ - - - + + + - {{- end -}} - -
{{- .ID -}}{{- .Title -}}{{- .Status -}}IDTitleStatus
-
+ + + {{- range .merge_requests -}} + + {{- .ID -}} + {{- .Title -}} + {{- .Status -}} + + {{- end -}} + + +
+
{{- template "footer" . -}}
diff --git a/forged/templates/repo_contrib_one.tmpl b/forged/templates/repo_contrib_one.tmpl index a5f35d3..6556ea9 100644 --- a/forged/templates/repo_contrib_one.tmpl +++ b/forged/templates/repo_contrib_one.tmpl @@ -12,109 +12,111 @@ {{- template "header" . -}} -
-

{{- .repo_name -}}

- -
-
-
- {{- .repo_description -}} +
+
+

{{- .repo_name -}}

+
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Merge request info
ID{{- .mr_id -}}
Status{{- .mr_status -}}
Title{{- .mr_title -}}
Source ref{{- .mr_source_ref -}}
Destination branch{{- .mr_destination_branch -}}
Merge base{{- .merge_base.Hash.String -}}
-
-
- {{- $merge_base := .merge_base -}} - {{- $source_commit := .source_commit -}} - {{- range .file_patches -}} -
- -