mygit

[UNMAINTAINED] A cgit/webgit alternative, written in Rust
Log | Files | Refs | README | LICENSE

commit 6caa3526d26381fca31d9286651a30c3429fe858
parent 4f85dbf0331f046fd945ba8f1c83a429057e1b78
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat, 20 Mar 2021 21:10:29 -0700

Slight changes to CSS

Diffstat:
Mtemplates/repo.html | 2++
Mtemplates/static/style.css | 17+++++++++++++++--
Mtemplates/tree.html | 8+++++---
3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/templates/repo.html b/templates/repo.html @@ -2,9 +2,11 @@ {% block content %} {% include "repo-navbar.html" %} + <div class="readme"> {% if !readme_text.is_empty() -%} {{ readme_text|safe }} {% else -%} <em>(no README)</em> + </div> {%- endif %} {% endblock %} diff --git a/templates/static/style.css b/templates/static/style.css @@ -1,6 +1,7 @@ body { - max-width: 95ch; padding: 2ch; + padding-left: 4ch; + padding-right: 4ch; margin: auto; font-family: "Roboto", Helvetica, Arial, Sans-serif; word-wrap: break-word; @@ -8,14 +9,26 @@ body { line-height: 1.5; } +.readme { + max-width: 80ch; +} + +a:visited { + color: blue; +} + .repo-last-updated { font-style: italic; } -.repo-link, .git-reference, .permissions, .commit-hash, .commit-message{ +.repo-link, .git-reference, .permissions, .commit-hash, .filename, .filesize, .commit-message{ font-family: "Roboto Mono", monospace; } +.filesize { + text-align: right; +} + .commit-hash { display: inline } diff --git a/templates/tree.html b/templates/tree.html @@ -2,18 +2,19 @@ {% block content %} {% include "repo-navbar.html" %} - <h2>{{ spec }}</h2> + <div> + <div> {{ spec }}</h2> <table> {% for entry in tree %} <tr> <td class="permissions"> {{ entry.filemode()|unix_perms }} </td> - <td> + <td class="filename"> <a href="/{{repo|repo_name|urlencode_strict}}/tree/{{ spec }}/item/{{entry.name().unwrap()}}"> {{ entry.name().unwrap() }}{% if entry.to_object(repo).unwrap().as_tree().is_some() %}/{% endif %}</a> </td> - <td> + <td class="filesize"> {% let obj = entry.to_object(repo).unwrap() %} {% if obj.as_blob().is_some() %} {{ entry.to_object(repo).unwrap().into_blob().unwrap().content().len()|filesizeformat }} @@ -22,4 +23,5 @@ </tr> {% endfor %} </table> + </div> {% endblock %}