From 37d06318440f4db057e3d3b4739c774fa0e7f110 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 10 Mar 2025 23:47:01 +0800 Subject: css, html: Rounded corners --- static/style.css | 34 +++++++++++++++++++++++++++++++++- templates/_group_view.tmpl | 4 ++-- templates/group.tmpl | 2 +- templates/index.tmpl | 4 ++-- templates/login.tmpl | 2 +- templates/repo_commit.tmpl | 2 +- templates/repo_contrib_index.tmpl | 2 +- templates/repo_contrib_one.tmpl | 2 +- templates/repo_index.tmpl | 6 +++--- templates/repo_log.tmpl | 2 +- templates/repo_raw_dir.tmpl | 2 +- templates/repo_tree_dir.tmpl | 2 +- 12 files changed, 48 insertions(+), 16 deletions(-) diff --git a/static/style.css b/static/style.css index efe5e6d..85b0e5a 100644 --- a/static/style.css +++ b/static/style.css @@ -9,6 +9,7 @@ html { font-family: sans-serif; background-color: var(--background-color); color: var(--text-color); + --radius-1: 0.32rem; --background-color: hsl(0, 0%, 100%); --text-color: hsl(0, 0%, 0%); --link-color: hsl(320, 50%, 36%); @@ -75,6 +76,37 @@ html, code, pre { display: table-row-group; } +table.rounded { + overflow: hidden; + border-spacing: 0; + border-collapse: separate; + border-radius: var(--radius-1); + border: var(--lighter-border-color) solid 1px; +} + +table.rounded th, table.rounded td { + border: none; +} + +table.rounded th:not(:last-child), +table.rounded td:not(:last-child) { + border-right: var(--lighter-border-color) solid 1px; +} + +table.rounded>thead>tr:not(:last-child)>th, +table.rounded>thead>tr:not(:last-child)>td, +table.rounded>tbody>tr:not(:last-child)>th, +table.rounded>tbody>tr:not(:last-child)>td, +table.rounded>tfoot>tr:not(:last-child)>th, +table.rounded>tfoot>tr:not(:last-child)>td, +table.rounded>tr:not(:last-child)>td, +table.rounded>tr:not(:last-child)>th, +table.rounded>thead:not(:last-child), +table.rounded>tbody:not(:last-child), +table.rounded>tfoot:not(:last-child) { + border-bottom: var(--lighter-border-color) solid 1px; +} + /* Footer styles */ footer { margin-top: 1rem; @@ -334,7 +366,7 @@ input[type=file]::file-selector-button { display: inline-block; width: auto; min-width: fit-content; - border-radius: 0; + border-radius: var(--radius-1); padding: .1rem .75rem; font-size: 0.9rem; transition: background .1s linear; diff --git a/templates/_group_view.tmpl b/templates/_group_view.tmpl index dbfbe07..08ed963 100644 --- a/templates/_group_view.tmpl +++ b/templates/_group_view.tmpl @@ -4,7 +4,7 @@ */}} {{- define "group_view" -}} {{- if .subgroups -}} - +
@@ -29,7 +29,7 @@
Subgroups
{{- end -}} {{- if .repos -}} - +
diff --git a/templates/group.tmpl b/templates/group.tmpl index c0f43d4..9c8c9eb 100644 --- a/templates/group.tmpl +++ b/templates/group.tmpl @@ -22,7 +22,7 @@ {{- if .direct_access -}}
-
Repos
+
diff --git a/templates/index.tmpl b/templates/index.tmpl index 7c2e8fc..a72fe44 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -12,7 +12,7 @@ {{- template "header" . -}}
- +
@@ -36,7 +36,7 @@
Groups
- +
diff --git a/templates/login.tmpl b/templates/login.tmpl index 47c4fc4..c5409af 100644 --- a/templates/login.tmpl +++ b/templates/login.tmpl @@ -13,7 +13,7 @@ {{- .login_error -}}
- +
diff --git a/templates/repo_commit.tmpl b/templates/repo_commit.tmpl index 962b736..8cf106b 100644 --- a/templates/repo_commit.tmpl +++ b/templates/repo_commit.tmpl @@ -12,7 +12,7 @@ {{- template "header" . -}}
- +
diff --git a/templates/repo_contrib_index.tmpl b/templates/repo_contrib_index.tmpl index 81fdb1a..f791e4d 100644 --- a/templates/repo_contrib_index.tmpl +++ b/templates/repo_contrib_index.tmpl @@ -12,7 +12,7 @@ {{- template "header" . -}}
-
Commit info
+
diff --git a/templates/repo_contrib_one.tmpl b/templates/repo_contrib_one.tmpl index cb53558..b657ee8 100644 --- a/templates/repo_contrib_one.tmpl +++ b/templates/repo_contrib_one.tmpl @@ -12,7 +12,7 @@ {{- template "header" . -}}
-
Merge requests
+
diff --git a/templates/repo_index.tmpl b/templates/repo_index.tmpl index 4eb0345..d0c65c0 100644 --- a/templates/repo_index.tmpl +++ b/templates/repo_index.tmpl @@ -12,7 +12,7 @@ {{- template "header" . -}}
-
Merge request info
+
@@ -49,7 +49,7 @@ {{- if .commits -}}
-
Repo info
+
@@ -78,7 +78,7 @@ {{- end -}} {{- if .files -}}
-
Recent commits (see all)
+
diff --git a/templates/repo_log.tmpl b/templates/repo_log.tmpl index 324ceeb..64e6783 100644 --- a/templates/repo_log.tmpl +++ b/templates/repo_log.tmpl @@ -12,7 +12,7 @@ {{- template "header" . -}}
-
/{{- if .ref_name -}} on {{- .ref_name -}}{{- end -}}
+
diff --git a/templates/repo_raw_dir.tmpl b/templates/repo_raw_dir.tmpl index f1461b3..95235dd 100644 --- a/templates/repo_raw_dir.tmpl +++ b/templates/repo_raw_dir.tmpl @@ -12,7 +12,7 @@ {{- template "header" . -}}
-
Commits {{ if .ref_name }} on {{ .ref_name }}{{ end -}}
+
diff --git a/templates/repo_tree_dir.tmpl b/templates/repo_tree_dir.tmpl index 12d1636..e3b5719 100644 --- a/templates/repo_tree_dir.tmpl +++ b/templates/repo_tree_dir.tmpl @@ -12,7 +12,7 @@ {{- template "header" . -}}
- +
-- cgit v1.2.3