diff options
| Commit | 63aa2ecd4e72800c11b08e4fb94234a117ece029 (patch) | |
|---|---|---|
| Author | 2026-09-27 22:04:58 +0300 | |
| Committer | 2026-09-27 22:17:41 +0300 | |
| Files | f399e7b86e2c450adc2a62b517af100db65c1b73 /ui-summary.c | |
| cgit-63aa2ecd4e72800c11b08e4fb94234a117ece029.tar cgit-63aa2ecd4e72800c11b08e4fb94234a117ece029.tar.gz cgit-63aa2ecd4e72800c11b08e4fb94234a117ece029.zip | ||
| Parent | 59125deae6522ca335a16c84a67e57e85edb88d6 (diff) | |
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
1 files changed, 14 insertions, 12 deletions
| -rw-r--r-- | ui-summary.c | 26 |
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("<tr class='nohover'><td colspan='%d'> </td></tr>", columns); htmlf("<tr class='nohover'><th class='left' colspan='%d'>Clone</th></tr>\n", columns); } - htmlf("<tr><td colspan='%d'><a rel='vcs-git' href='", columns); - html_url_path(url); - html("' title='"); - html_attr(ctx.repo->name); - html(" Git repository'>"); + htmlf("<tr><td colspan='%d' title='git clone %s'>", columns, url); html_txt(url); - html("</a></td></tr>\n"); + html("</td></tr>\n"); } void cgit_print_summary(void) @@ -50,18 +46,24 @@ void cgit_print_summary(void) columns++; cgit_print_layout_start(); + html("<table id='summary-info'><tr><td>"); html("<table summary='repository info' class='list nowrap'>"); - cgit_print_branches(ctx.cfg.summary_branches); - htmlf("<tr class='nohover'><td colspan='%d'> </td></tr>", columns); - cgit_print_tags(ctx.cfg.summary_tags); if (ctx.cfg.summary_log > 0) { - htmlf("<tr class='nohover'><td colspan='%d'> </td></tr>", columns); cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, NULL, NULL, 0, 0, 0); + htmlf("<tr class='nohover'><td colspan='%d'> </td></tr>", columns); } + cgit_print_tags(ctx.cfg.summary_tags); urls = 0; + html("</table>"); + html("</td><td> </td><td>"); + html("<table class='list nowrap'>"); cgit_add_clone_urls(print_url); + htmlf("<tr class='nohover'><td colspan='%d'> </td></tr>", columns); + cgit_print_branches_component(ctx.cfg.summary_branches); html("</table>"); + html("</td></tr></table>"); + cgit_print_tree_component(ctx.qry.oid, ctx.qry.path); cgit_print_layout_end(); } |
