From a823f8deb42790a4457b008864447960ea543c32 Mon Sep 17 00:00:00 2001 From: Luka Hietala Date: Wed, 19 Nov 2025 21:36:24 +0200 Subject: [PATCH] improve html and styling --- static/styles.css | 9 +++++++++ templates/commits.html | 1 - templates/refs.html | 25 ++++++++++++++++++------- templates/tree.html | 35 ++++++++++++++++++++++++----------- 4 files changed, 51 insertions(+), 19 deletions(-) diff --git a/static/styles.css b/static/styles.css index e484fc1..c5ef3a2 100644 --- a/static/styles.css +++ b/static/styles.css @@ -6,6 +6,15 @@ table { width: 100%; } +th, td { + border: 1px solid black; + padding: 8px; + text-align: left; +} + +a { + color: blue; +} .base-nav { display:flex; align-items:center; diff --git a/templates/commits.html b/templates/commits.html index 7c35fe8..8be5101 100644 --- a/templates/commits.html +++ b/templates/commits.html @@ -2,7 +2,6 @@ {% block content %}

Commits for {{ repo_name }}

-

View Tree

diff --git a/templates/refs.html b/templates/refs.html index 941a1a1..292d86e 100644 --- a/templates/refs.html +++ b/templates/refs.html @@ -2,11 +2,22 @@ {% block content %}

Refs for {{ repo_name }}

- +
+ + + + + + + + + {% for ref in refs %} + + + + + + {% endfor %} + +
NameTargetActions
{{ ref.name }}{{ ref.target }}View Tree
{% endblock %} \ No newline at end of file diff --git a/templates/tree.html b/templates/tree.html index a9e94db..7890891 100644 --- a/templates/tree.html +++ b/templates/tree.html @@ -2,15 +2,28 @@ {% block content %}

Tree for {{ repo_name }} at {{ ref }}{% if path %} / {{ path }}{% endif %}

- + + + + + + + + + + {% for item in tree_items %} + + + + + + {% endfor %} + +
NameTypeSize
+ {% if item.type == 'tree' %} + {{ item.name }}/ + {% else %} + {{ item.name }} + {% endif %} + {{ item.type }}{% if item.type == 'blob' %}{{ item.size }} bytes{% endif %}
{% endblock %} \ No newline at end of file -- 2.47.3