mygit

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

commit 5ffd65b058d66b5f80f56b3490326662bbf72046
parent 87b2adb50effc54ca02ea2b90e21bb880638fa3d
Author: Johann150 <johann@qwertqwefsday.eu>
Date:   Tue, 27 Jul 2021 09:14:51 +0200

clean up CSS

- not all hr's were selected because they were required to be direct
children of the body tag (">" selector)
- unified statements for same css selector
- removed class "thin" from hr because all hr's have it, instead
selecting every hr

Diffstat:
Mtemplates/base.html | 2+-
Mtemplates/commit.html | 4++--
Mtemplates/last-commit.html | 4++--
Mtemplates/repo-navbar.html | 2+-
Mtemplates/repo.html | 2+-
Mtemplates/static/style.css | 30+++++++++++++++++-------------
Mtemplates/tag.html | 2+-
7 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/templates/base.html b/templates/base.html @@ -14,7 +14,7 @@ <div id="content"> {% block content %}{% endblock %} </div> - <hr class="thin"> + <hr/> <div class="footer"> Server running <a href="https://git.alexwennerberg.com/mygit">mygit</a> </div> diff --git a/templates/commit.html b/templates/commit.html @@ -21,8 +21,8 @@ <br> {% let stats = diff.stats().unwrap() %} {{stats.files_changed()}} files changed; {{stats.insertions()}} insertions {{stats.deletions()}} deletions - <hr class="thin"/> + <hr/> <pre class="commit-message">{{commit.message().unwrap()}}</pre> - <hr class="thin"/> + <hr/> <pre id="diff">{{self.diff()|safe}}</pre> {% endblock %} diff --git a/templates/last-commit.html b/templates/last-commit.html @@ -1,4 +1,4 @@ -<hr class="thin"/> +<hr/> <table> {% let commit = last_commit.clone() %} {% include "commit-tr.html" %} @@ -6,4 +6,4 @@ <td colspan="4"><a href="/{{repo|repo_name|urlencode_strict}}/log/{{spec}}/{{path.display()}}">...</a></td> </tr> </table> -<hr class="thin"/> +<hr/> diff --git a/templates/repo-navbar.html b/templates/repo-navbar.html @@ -2,4 +2,4 @@ <div>{{repo|description}}</div> <div class="clone-url">git clone {{crate::CONFIG.clone_base}}/{{repo|repo_name}}</div> <div class="navbar"><a href="/{{repo|repo_name|urlencode_strict}}">README</a> | <a href="/{{repo|repo_name|urlencode_strict}}/tree">tree</a> | <a href="/{{repo|repo_name|urlencode_strict}}/log">log</a> | <a href="/{{repo|repo_name|urlencode_strict}}/refs">refs</a></div> -<hr class='thin'> +<hr/> diff --git a/templates/repo.html b/templates/repo.html @@ -12,7 +12,7 @@ <td colspan="4"><a href="/{{repo|repo_name|urlencode_strict}}/log/">...</a></td> </tr> </table> - <hr class="thin"/> + <hr/> <div class="readme"> {% if !readme_text.is_empty() -%} {{ readme_text|safe }} diff --git a/templates/static/style.css b/templates/static/style.css @@ -8,13 +8,22 @@ body { line-height: 1.5; } -body > hr { margin-left: -1ch; } - -table { border-spacing: 0.5em 0.1em; } +hr { + margin-left: -1ch; + margin-right: -1ch; + border: 0; + height: 0; + border-top: 1px solid; +} -.clone-url { font-size: 0.9em; } +table { + border-spacing: 0.5em 0.1em; +} -.clone-url { float: right; } +.clone-url { + font-size: 0.9em; + float: right; +} .readme { max-width: 80ch; @@ -60,12 +69,6 @@ a.line { user-select: all; /* Standard syntax */ } -hr.thin { - border: 0; - height: 0; - border-top: 1px solid; -} - h1, h2, h3 { margin: 0; } @@ -147,11 +150,12 @@ Light is the default color scheme, not using a media query for browser support. body { color: black; } + .code, .keyword.operator.comparison, .keyword.operator.assignment, .keyword.operator.arithmetic, .meta.brace.round, .meta.brace.curly, .punctuation.section, .punctuation.section.block, .punctuation.definition.parameters, .punctuation.section.group, .meta.selector.css, .text.html.basic, .meta.tag.other.html, .text.html.basic, .meta.tag.any.html, .text.html.basic, .meta.tag.block.any, .text.html.basic, .meta.tag.inline.any, .text.html.basic, .meta.tag.structure.any.html, .text.html.basic, .source.js.embedded.html, .punctuation.separator.key-value.html, .variable.other.readwrite.js, .variable.other.object.js, .variable.other.constant.js, .punctuation.definition.string { color: #4f5f5f; /* SolAArized main-light */ } -hr.thin { +hr { border-top-color: #4f5f5f; /* SolAArized main-light */ } @@ -219,7 +223,7 @@ a, .variable, .entity.other.inherited-class, .entity.name.tag, .storage.type, .m color: #919ea1; /* SolAArized main-dark */ } - hr.thin { + hr { border-top-color: #919ea1; /* SolAArized main-dark */ } diff --git a/templates/tag.html b/templates/tag.html @@ -12,6 +12,6 @@ <b>Date:</b> {{tag.tagger().unwrap().when()|format_datetime("%c %z")}} <br> {% endif %} - <hr class="thin"/> + <hr/> <pre class="commit-message">{{tag.message().unwrap()}}</pre> {% endblock %}