From a5c268774e166e88bf98fd2506e14c0a5ffd2da6 Mon Sep 17 00:00:00 2001 From: Luka Hietala Date: Thu, 20 Nov 2025 12:46:44 +0200 Subject: [PATCH] change app name and add latest commits to repo overview --- app.py | 3 ++- static/styles.css | 6 ++++-- templates/base.html | 11 ++++++----- templates/index.html | 10 ++++++++-- templates/repo.html | 28 +++++++++++++++++++++++++++- 5 files changed, 47 insertions(+), 11 deletions(-) diff --git a/app.py b/app.py index 9e2696a..6aad97f 100644 --- a/app.py +++ b/app.py @@ -46,8 +46,9 @@ def index(): @app.route("/") def repo_detail(repo_name): + commits = get_commits(f"{repo_path}/{repo_name}", ref="HEAD", max_count=10) refs = get_refs(f"{repo_path}/{repo_name}") - return render_template("repo.html", repo_name=repo_name, refs=refs) + return render_template("repo.html", repo_name=repo_name, refs=refs, commits=commits) @app.route("//commits") def repo_commits(repo_name): diff --git a/static/styles.css b/static/styles.css index c5ef3a2..64d48cc 100644 --- a/static/styles.css +++ b/static/styles.css @@ -8,7 +8,7 @@ table { th, td { border: 1px solid black; - padding: 8px; + padding: 2px; text-align: left; } @@ -18,6 +18,8 @@ a { .base-nav { display:flex; align-items:center; - gap: 1em; margin-bottom:1em; + gap: 0.2em; + border-bottom: 1px solid black; + padding-bottom: 0.4em; } \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 7f0e21c..e2d2a9f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,17 +3,18 @@ - Py GitWeb + Lipasto