From 63aa2ecd4e72800c11b08e4fb94234a117ece029 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 27 Sep 2026 22:04:58 +0300 Subject: ui-summary: (THEME) Rework what is shown in summary page Now clone and branches are shown next to commits and tags, branches only show name and age, clone does not create links, and file listing (alongside readme) is shown below --- ui-summary.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'ui-summary.c') diff --git a/ui-summary.c b/ui-summary.c index 77f4c48..199364d 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -14,12 +14,13 @@ #include "ui-plain.h" #include "ui-refs.h" #include "ui-shared.h" +#include "ui-tree.h" static int urls; static void print_url(const char *url) { - int columns = 3; + int columns = 2; if (ctx.repo->enable_log_filecount) columns++; @@ -27,17 +28,12 @@ static void print_url(const char *url) columns++; if (urls++ == 0) { - htmlf(" ", columns); htmlf("Clone\n", columns); } - htmlf(""); + htmlf("", columns, url); html_txt(url); - html("\n"); + html("\n"); } void cgit_print_summary(void) @@ -50,18 +46,24 @@ void cgit_print_summary(void) columns++; cgit_print_layout_start(); + html("
"); html(""); - cgit_print_branches(ctx.cfg.summary_branches); - htmlf("", columns); - cgit_print_tags(ctx.cfg.summary_tags); if (ctx.cfg.summary_log > 0) { - htmlf("", columns); cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, NULL, NULL, 0, 0, 0); + htmlf("", columns); } + cgit_print_tags(ctx.cfg.summary_tags); urls = 0; + html("
 
 
 
"); + html("
 "); + html(""); cgit_add_clone_urls(print_url); + htmlf("", columns); + cgit_print_branches_component(ctx.cfg.summary_branches); html("
 
"); + html("
"); + cgit_print_tree_component(ctx.qry.oid, ctx.qry.path); cgit_print_layout_end(); } -- cgit v1.3.1-23-gd82d