From ef30f5b898f3798e8a0690ed47a30320a6f8b14b Mon Sep 17 00:00:00 2001 From: Luka Hietala Date: Thu, 27 Nov 2025 18:46:23 +0200 Subject: [PATCH] start improving styling --- static/styles.css | 25 ++++++++++++++++--------- templates/commit.html | 39 +++++++++++++++++++-------------------- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/static/styles.css b/static/styles.css index 22aa68a..49e8dc3 100644 --- a/static/styles.css +++ b/static/styles.css @@ -1,5 +1,4 @@ body { - font-family: sans-serif; font-size: 12pt; color: #000; background: white; @@ -19,17 +18,17 @@ nav { top: 0; width: screen; position: sticky; - padding: 0.5em 1em; - border-bottom: 1px solid lightgray; + padding: 0.8em 2em; display: flex; justify-content: space-between; align-items: center; - background-color: #fbfbfb; + background-color: #f5f5f5; + border-bottom: 1px solid lightgray; } nav a { color: black; - margin-right: 0.5em; + margin-right: 1em; } nav a.active { @@ -42,7 +41,7 @@ pre { } .content { - padding: 1em; + padding: 1em 2em; } /* dont make headers too big */ @@ -66,15 +65,20 @@ table { max-width: 100%; } +th { + background-color: #f0f0f0; +} + th, td { - border: 1px solid lightgray; padding: 4px 8px; text-align: left; white-space: nowrap; + border: 1px solid lightgray; } + tbody tr:nth-child(even) { - background-color: #f9f9f9; + background-color: #f1f1f1; } /* commits table */ @@ -146,7 +150,7 @@ table.commits-table .message-col { } .blob-content { - margin: 0 -1em; + margin: 0 -2em; } .blob-content pre { @@ -164,6 +168,9 @@ table.commits-table .message-col { overflow-x: auto; } +.commit-message { + margin: 1em 0; +} /* index */ .main-layout { diff --git a/templates/commit.html b/templates/commit.html index 2dd5001..e5fe2f6 100644 --- a/templates/commit.html +++ b/templates/commit.html @@ -1,25 +1,21 @@ {% extends "base.html" %} {% block content %} -

Commit {{ commit.id }}

-

Message: {{ commit.message }}

-

Author: {{ commit.author.name }} <{{ commit.author.email }}>

-

Committer: {{ commit.committer.name }} <{{ commit.committer.email }}>

-

Date: {{ commit.date | datetime }}

- {% if commit.parent_id %} -

Parent: {{ commit.parent_id }}

- {% endif %} -

Tree: {{ commit.tree_id }}

-

View Tree

+

commit {{ commit.id }}

+ Author: {{ commit.author.name }} <{{ commit.author.email }}>
+ Committer: {{ commit.committer.name }} <{{ commit.committer.email }}>
+ Date: {{ commit.date | datetime }} + {% if commit.parent_id %}
+ Parent: {{ commit.parent_id }} + {% endif %}
+ Tree: {{ commit.tree_id }} +
+ {{ commit.message }} +
+ View Tree {% if commit.diff %} -

Diff Stats

-

Changed Files

- +
@@ -32,15 +28,18 @@ {% for file in commit.changed_files %} - - + + {% endfor %}
File
{{ file.file }}+{{ file.additions }}-{{ file.deletions }}+{{ file.additions }}-{{ file.deletions }} {{ file.status }}
{% if commit.parent_id %} -

View Full Diff | Patch

+
+ View Full Diff | + Patch +
{% endif %} {% else %}

No changes compared to parent

-- 2.47.3