From 37d06318440f4db057e3d3b4739c774fa0e7f110 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 10 Mar 2025 23:47:01 +0800 Subject: [PATCH] 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 +- diff --git a/static/style.css b/static/style.css index efe5e6d67896203a5b8d278fdb7b30c007284bec..85b0e5a86f73371e4b35b81a45beeb0482dc83ff 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%); @@ -73,6 +74,37 @@ display: none; } .toggle-table-on:checked + table > tbody { 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 */ @@ -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 dbfbe07139b37a6fd1e432606c8f0f66b10c1087..08ed96340ac449dc21bf4e5fa93a9e2540e9418b 100644 --- a/templates/_group_view.tmpl +++ b/templates/_group_view.tmpl @@ -4,7 +4,7 @@ SPDX-FileContributor: Runxi Yu */}} {{- define "group_view" -}} {{- if .subgroups -}} - +
@@ -29,7 +29,7 @@
Subgroups
{{- end -}} {{- if .repos -}} - +
diff --git a/templates/group.tmpl b/templates/group.tmpl index c0f43d49d69828f4ebe1672167a24eb5ba3e2d88..9c8c9eb161b5eeea9a72dd99be4a82cbb256b011 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 7c2e8fc65bebf03e0a53bc4a81ab830969d7d40e..a72fe44961f7a6bb2e8b2de1b72fffae079500db 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -12,7 +12,7 @@ {{- template "header" . -}}
- +
@@ -36,7 +36,7 @@ {{- end -}}
Groups
- +
diff --git a/templates/login.tmpl b/templates/login.tmpl index 47c4fc403b867eba3bad795c9486c79489f3600c..c5409af3376b6626546626924c9b86c9acf65c91 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 962b7360d244d829594849036af5b756a998b05a..8cf106b658be7bc0674a564a884ccfb312975368 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 81fdb1a50f9bc92f7240ce5425106b19e36abf72..f791e4db965b53012a2961bec49780240f876c42 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 cb5355881aba3b11925fdd54fac07ee8d5329f73..b657ee874516f1926e23c7933e843caa80d6901c 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 4eb0345e136858937d7e497dead148d182d4a356..d0c65c046b029e0f37547c186a7cba4624f3a382 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 324ceeb67d1e60e56828d6b6c7e14590a174afaf..64e6783989551be8a2dd9ba72b1245fc323726a7 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 f1461b3191f794751e2a31496b87ebf0cbe08768..95235dd8d152fd959973f916922c39a4cdff4996 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 12d1636cb72083d977e1e555b0c92c3f2c54f62c..e3b571921307b8dabf6dee793fcfda91447156bf 100644 --- a/templates/repo_tree_dir.tmpl +++ b/templates/repo_tree_dir.tmpl @@ -12,7 +12,7 @@ {{- template "header" . -}}
- +
-- 2.48.1