mygit

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

commit 5715afb7d67b3250cb9cae06f6c60e39d92ad623
parent 6cbfc53eda670a80594e1efe63b98d212c399c62
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat, 20 Mar 2021 21:21:30 -0700

More style cleanup

Diffstat:
Msrc/main.rs | 2++
Mtemplates/file.html | 3+--
Mtemplates/log.html | 2+-
Mtemplates/static/style.css | 2+-
Mtemplates/tree.html | 2+-
5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -350,6 +350,7 @@ struct RepoFileTemplate<'a> { repo: &'a Repository, tree_entry: &'a TreeEntry<'a>, file_text: &'a str, + spec: &'a str, } async fn repo_file(req: Request<()>) -> tide::Result { @@ -399,6 +400,7 @@ async fn repo_file(req: Request<()>) -> tide::Result { repo: &repo, tree_entry: &tree_entry, file_text: &output, + spec: &spec, }; Ok(tmpl.into()) } diff --git a/templates/file.html b/templates/file.html @@ -2,7 +2,6 @@ {% block content %} {% include "repo-navbar.html" %} - branch - <h2>{{tree_entry.name().unwrap()}}</h2> + <h3>{{tree_entry.name().unwrap()}}@<a href="/{{repo|repo_name|urlencode_strict}}/tree/{{spec}}">{{spec}}</a></h3> {{file_text|safe}} {% endblock %} diff --git a/templates/log.html b/templates/log.html @@ -2,7 +2,7 @@ {% block content %} {% include "repo-navbar.html" %} - <h2>{{branch}}</h2> + <h3>{{branch}}</h3> <table> {% for commit in commits %} <tr> diff --git a/templates/static/style.css b/templates/static/style.css @@ -66,7 +66,7 @@ hr.thin { border-bottom: 1px solid rgba(255, 255, 255, 0.3); } -h1, h2 { +h1, h2, h3 { margin: 0px; } diff --git a/templates/tree.html b/templates/tree.html @@ -3,7 +3,7 @@ {% block content %} {% include "repo-navbar.html" %} <div> - <h2> {{ spec }}</h2> + <h3>{{ spec }}</h3> <table> {% for entry in tree %} <tr>