diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-10 23:47:01 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-10 23:47:01 +0800 |
commit | 37d06318440f4db057e3d3b4739c774fa0e7f110 (patch) | |
tree | dc21a4d20c0d65f0061df0da0c1cc674ba997d09 | |
parent | css: Make --danger-color actually red (diff) | |
download | forge-37d06318440f4db057e3d3b4739c774fa0e7f110.tar.gz forge-37d06318440f4db057e3d3b4739c774fa0e7f110.tar.zst forge-37d06318440f4db057e3d3b4739c774fa0e7f110.zip |
css, html: Rounded corners
-rw-r--r-- | static/style.css | 34 | ||||
-rw-r--r-- | templates/_group_view.tmpl | 4 | ||||
-rw-r--r-- | templates/group.tmpl | 2 | ||||
-rw-r--r-- | templates/index.tmpl | 4 | ||||
-rw-r--r-- | templates/login.tmpl | 2 | ||||
-rw-r--r-- | templates/repo_commit.tmpl | 2 | ||||
-rw-r--r-- | templates/repo_contrib_index.tmpl | 2 | ||||
-rw-r--r-- | templates/repo_contrib_one.tmpl | 2 | ||||
-rw-r--r-- | templates/repo_index.tmpl | 6 | ||||
-rw-r--r-- | templates/repo_log.tmpl | 2 | ||||
-rw-r--r-- | templates/repo_raw_dir.tmpl | 2 | ||||
-rw-r--r-- | 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 -}} - <table class="wide"> + <table class="wide rounded"> <thead> <tr> <th colspan="2" class="title-row">Subgroups</th> @@ -29,7 +29,7 @@ </table> {{- end -}} {{- if .repos -}} -<table class="wide"> +<table class="wide rounded"> <thead> <tr> <th colspan="2" class="title-row">Repos</th> 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 -}} <div class="padding-wrapper"> <form method="POST" enctype="application/x-www-form-urlencoded"> - <table> + <table class="rounded"> <thead> <tr> <th class="title-row" colspan="2"> 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 @@ <body class="index"> {{- template "header" . -}} <div class="padding-wrapper"> - <table class="wide"> + <table class="wide rounded"> <thead> <tr> <th colspan="2" class="title-row">Groups</th> @@ -36,7 +36,7 @@ </tbody> </table> <div class="padding-wrapper"> - <table class="wide"> + <table class="wide rounded"> <thead> <tr> <th colspan="2" class="title-row"> 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 -}} <div class="padding-wrapper"> <form method="POST" enctype="application/x-www-form-urlencoded"> - <table> + <table class="rounded"> <thead> <tr> <th class="title-row" colspan="2"> 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 @@ <body class="repo-commit"> {{- template "header" . -}} <div class="padding-wrapper scroll"> - <table id="commit-info-table"> + <table id="commit-info-table" class="rounded"> <thead> <tr class="title-row"> <th colspan="2">Commit info</th> 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 @@ <body class="repo-contrib-index"> {{- template "header" . -}} <div class="padding-wrapper"> - <table id="recent-merge_requests" class="wide"> + <table id="recent-merge_requests" class="wide rounded"> <thead> <tr class="title-row"> <th colspan="3">Merge requests</th> 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 @@ <body class="repo-contrib-one"> {{- template "header" . -}} <div class="padding-wrapper"> - <table id="mr-info-table"> + <table id="mr-info-table" class="rounded"> <thead> <tr class="title-row"> <th colspan="2">Merge request info</th> 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 @@ <body class="repo-index"> {{- template "header" . -}} <div class="padding-wrapper"> - <table id="repo-info-table"> + <table id="repo-info-table" class="rounded"> <thead> <tr class="title-row"> <th colspan="2">Repo info</th> @@ -49,7 +49,7 @@ </div> {{- if .commits -}} <div class="padding-wrapper scroll"> - <table id="recent-commits" class="wide"> + <table id="recent-commits" class="wide rounded"> <thead> <tr class="title-row"> <th colspan="3">Recent commits (<a href="log/{{- if .ref_type -}}?{{- .ref_type -}}={{- .ref_name -}}{{- end -}}">see all</a>)</th> @@ -78,7 +78,7 @@ {{- end -}} {{- if .files -}} <div class="padding-wrapper scroll"> - <table id="file-tree" class="wide"> + <table id="file-tree" class="wide rounded"> <thead> <tr class="title-row"> <th colspan="3">/{{- if .ref_name -}} on {{- .ref_name -}}{{- end -}}</th> 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 @@ <body class="repo-log"> {{- template "header" . -}} <div class="scroll"> - <table id="commits" class="wide"> + <table id="commits" class="wide rounded"> <thead> <tr class="title-row"> <th colspan="4">Commits {{ if .ref_name }} on {{ .ref_name }}{{ end -}}</th> 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 @@ <body class="repo-raw-dir"> {{- template "header" . -}} <div class="padding-wrapper scroll"> - <table id="file-tree" class="wide"> + <table id="file-tree" class="wide rounded"> <thead> <tr class="title-row"> <th colspan="3"> 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 @@ <body class="repo-tree-dir"> {{- template "header" . -}} <div class="padding-wrapper scroll"> - <table id="file-tree" class="wide"> + <table id="file-tree" class="wide rounded"> <thead> <tr class="title-row"> <th colspan="3"> |