From 3f0342fcbf5aafc13b3fce58c077d86275e3781d Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 11 Feb 2025 20:24:30 +0800 Subject: [PATCH] repo_index.html, style.css: CSS state machines --- static/style.css | 21 +++++++++++++++++++++ templates/repo_index.html.tmpl | 21 ++++++--------------- templates/repo_raw_dir.html.tmpl | 5 ----- templates/repo_tree_dir.html.tmpl | 5 ----- diff --git a/static/style.css b/static/style.css index 9d90dca3d444da6c741a633a8c955022cfa1a530..af5a9b366e48a34fde41ffbd8e1bbf869fb38398 100644 --- a/static/style.css +++ b/static/style.css @@ -91,3 +91,24 @@ } pre, .scroll { overflow-x: auto; } +.toggle-table-off, .toggle-table-on { + display: none; +} +.toggle-table-off + table > thead > tr > th, .toggle-table-on + table > thead > tr > th { + padding: 0; +} +.toggle-table-off + table > thead > tr > th > label, .toggle-table-on + table > thead > tr > th > label { + width: 100%; + display: inline-block; + padding: 3px 1px; + cursor: pointer; +} +.toggle-table-off:checked + table > tbody { + display: none; +} +.toggle-table-on + table > tbody { + display: none; +} +.toggle-table-on:checked + table > tbody { + display: table-row-group; +} diff --git a/templates/repo_index.html.tmpl b/templates/repo_index.html.tmpl index 84ce662b1e6d379ddb3e79af405a25b45791d907..c3b47595077a7e5a33ad4c36c0f2bdcf29b8b5ab 100644 --- a/templates/repo_index.html.tmpl +++ b/templates/repo_index.html.tmpl @@ -7,15 +7,11 @@ {{ .group_name }}/repos/{{ .repo_name }} – Lindenii Forge
+ - - - - - - + @@ -34,15 +30,11 @@
Recent Commits (see all)
TitleAuthorTime
+ - - - - - - + @@ -63,12 +55,11 @@
{{ if .readme }} +
/ on {{ .ref }}
ModeNameSize
- + diff --git a/templates/repo_raw_dir.html.tmpl b/templates/repo_raw_dir.html.tmpl index 3dcb8a6b3be31c7986d2ac5dc87d9a7e9a2f3c75..f55d8c86e65369be5b1ec79803c4c5ae76dd1e10 100644 --- a/templates/repo_raw_dir.html.tmpl +++ b/templates/repo_raw_dir.html.tmpl @@ -14,11 +14,6 @@ - - - - - {{- $path_spec := .path_spec }} diff --git a/templates/repo_tree_dir.html.tmpl b/templates/repo_tree_dir.html.tmpl index 7db2035f939cbc199cf3a7441725c3023f59f5fd..aa457c4312a6f5bfb2fd12eff9f5c4dd46098f22 100644 --- a/templates/repo_tree_dir.html.tmpl +++ b/templates/repo_tree_dir.html.tmpl @@ -14,11 +14,6 @@ - - - - - {{- $path_spec := .path_spec }} -- 2.48.1
- README.md -
(Raw) /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} on {{ .ref }}
ModeNameSize
/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} on {{ .ref }}
ModeNameSize