mygit

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

commit 85984344b025b563e7c044e90760952c2a7bd141
parent 7bf69cae74567bf2ab79270bcd75c7023fc6d39b
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat, 13 Mar 2021 14:46:49 -0800

More style cleanup, add mobile css

Diffstat:
Mtemplates/index.html | 14+++++++++-----
Mtemplates/repo-navbar.html | 2+-
Mtemplates/static/style.css | 41++++++++++++++++++++++++++++++++++-------
3 files changed, 44 insertions(+), 13 deletions(-)

diff --git a/templates/index.html b/templates/index.html @@ -3,12 +3,16 @@ {% block content %} <div class="page-title"><h1>Repositories</h1></div> <h2>Subheading</h2> + <div style=> + <table> {% for repo in repos %} {% let name = repo.workdir().unwrap().file_name().unwrap().to_str().unwrap() %} - <div class="repo-listing"> - <div class="repo-link"><a href="{{name}}">{{ name }}</a></div> - <div class="repo-description">a cool repository</div> - <div class="repo-last-updated">updated 2021-02-01</div> - </div> + <tr> + <td class="repo-link"><a href="{{name}}">{{ name }}</a></td> + <td class="repo-description">a cool repository</td> + <td class="repo-last-updated">updated 2021-02-01</td> + </tr> {% endfor %} + </table> + </div> {% endblock %} diff --git a/templates/repo-navbar.html b/templates/repo-navbar.html @@ -1,5 +1,5 @@ <h1><a href="/">index</a>/{{name}}</h1> -<div class="repo-description">My cool repo</div> +<div>My cool repo</div> <div class="clone-url">git clone git.alexwennerberg.com/repo </div> <div class="navbar"><a href="/{{name}}">README</a> | <a href="/{{name}}/tree">tree</a> | <a href="/{{name}}/log">log</a> | <a href="/{{name}}/refs">refs</a></div> <hr class='thin'> diff --git a/templates/static/style.css b/templates/static/style.css @@ -14,13 +14,6 @@ body { .repo-link { font-family: "Roboto Mono", monospace; - font-size: 1.2rem; -} - -.repo-listing { - background-color: #f0f0f0; - padding: .3rem; - margin-bottom: .5rem; } .footer { @@ -48,3 +41,37 @@ h1 { h2 { margin: 0px; } + +table { + width: 100%; + overflow-x: auto; +} + +pre { + line-height: 1.2; + font-size: 1rem; + overflow: auto; +} + +tr:hover { + background-color: #f0f0f0; +} + +td { + margin: 0px; + border-style:hidden; + padding: 0; +} +table { + border-collapse: collapse; +} + +@media only screen and (max-width: 600px) { + body { + font-size: 16px; + } + + .repo-description, .repo-last-updated { + display: none; + } +}