diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-14 17:08:00 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-14 17:08:00 +0800 |
commit | 77d4e60f2c8f0ba970be49b719d3b21c2a2860c8 (patch) | |
tree | ac0b884550c65d167fadaf84f233609d2bf69d5a /templates | |
parent | README.md: Clarify how MR emails work (diff) | |
download | forge-77d4e60f2c8f0ba970be49b719d3b21c2a2860c8.tar.gz forge-77d4e60f2c8f0ba970be49b719d3b21c2a2860c8.tar.zst forge-77d4e60f2c8f0ba970be49b719d3b21c2a2860c8.zip |
style.css, repo_index: Use div, not table, for expandables
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo_commit.html.tmpl | 4 | ||||
-rw-r--r-- | templates/repo_index.html.tmpl | 26 |
2 files changed, 8 insertions, 22 deletions
diff --git a/templates/repo_commit.html.tmpl b/templates/repo_commit.html.tmpl index d07845b..8797092 100644 --- a/templates/repo_commit.html.tmpl +++ b/templates/repo_commit.html.tmpl @@ -53,7 +53,7 @@ <div class="file-patch toggle-on-wrapper"> <input type="checkbox" id="toggle-{{ .From.Hash }}{{ .To.Hash }}" class="file-toggle toggle-on-toggle"> <label for="toggle-{{ .From.Hash }}{{ .To.Hash }}" class="file-header toggle-on-header"> - <span> + <div> {{ if eq .From.Path "" }} --- /dev/null {{ else }} @@ -65,7 +65,7 @@ {{ else }} +++ b/<a href="../tree/{{ .To.Path }}?commit={{ $commit_object.Hash }}">{{ .To.Path }}</a> {{ .To.Mode }} {{ end }} - </span> + </div> </label> <div class="file-content toggle-on-content scroll"> {{ range .Chunks }} diff --git a/templates/repo_index.html.tmpl b/templates/repo_index.html.tmpl index 806ceda..3f5436d 100644 --- a/templates/repo_index.html.tmpl +++ b/templates/repo_index.html.tmpl @@ -77,28 +77,14 @@ </table> </div> <div class="padding-wrapper"> - <div id="refs"> + <div class="toggle-off-wrapper"> + <input type="checkbox" id="toggle-readme" class="toggle-off-toggle" /> + <label for="toggle-readme" class="toggle-off-header centering"><div>{{ .readme_filename }}</div></label> + <div class="toggle-off-content pad" id="readme"> + {{ .readme }} + </div> </div> </div> - <div class="padding-wrapper"> - {{ if .readme }} - <input id="toggle-table-readme" type="checkbox" class="toggle-table-off" /> - <table class="wide"> - <thead> - <tr class="title-row"> - <th><label for="toggle-table-readme">{{ .readme_filename }}</label></th> - </tr> - </thead> - <tbody> - <tr> - <td id="readme"> - {{ .readme -}} - </td> - </tr> - </tbody> - </table> - {{ end }} - </div> <footer> {{ template "footer" . }} </footer> |