diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Adapt the layout to small screens
On a phone the description, owner and shortcut columns crowded the
index and pushed the age off screen, and tapping the name already
opens the repository, so the index collapses to name and age.
Diffstat (limited to '')
| -rw-r--r-- | source/ui-repolist.c | 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 10 insertions, 8 deletions
diff --git a/source/ui-repolist.c b/source/ui-repolist.c index 1b224cf..5174c5a 100644 --- a/source/ui-repolist.c +++ b/source/ui-repolist.c @@ -129,7 +129,7 @@ static int any_repos_visible(void) static void print_sort_header(const char *title, const char *sort) { char *currenturl = cgit_currenturl(); - html("<th class='left'><a href='"); + htmlf("<th class='left col-%s'><a href='", sort); html_attr(currenturl); htmlf("?s=%s", sort); if (ctx.qry.search) { @@ -149,7 +149,7 @@ static void print_header(void) print_sort_header("Owner", "owner"); print_sort_header("Idle", "idle"); if (ctx.cfg.enable_index_links) - html("<th class='left'>Links</th>"); + html("<th class='left col-links'>Links</th>"); html("</tr>\n"); } @@ -293,7 +293,7 @@ void cgit_print_repolist(void) else if (ctx.cfg.section_sort) sort_repolist("section"); - html("<table summary='repository list' class='list nowrap'>"); + html("<table class='list nowrap repolist'>"); for (i = 0; i < cgit_repolist.count; i++) { ctx.repo = &cgit_repolist.repos[i]; if (!is_visible(ctx.repo)) @@ -319,18 +319,19 @@ void cgit_print_repolist(void) html("</td></tr>"); last_section = section; } - htmlf("<tr><td class='%s'>", + htmlf("<tr><td class='col-name %s'>", !sorted && section ? "sublevel-repo" : "toplevel-repo"); cgit_summary_link(ctx.repo->name, NULL, NULL, NULL); - html("</td><td>"); + html("</td><td class='col-desc'>"); repourl = cgit_repourl(ctx.repo->url); html_link_open(repourl, NULL, NULL); free(repourl); if (html_ntxt(ctx.repo->desc, ctx.cfg.max_repodesc_len) < 0) html("..."); html_link_close(); - html("</td><td>"); + html("</td>"); if (ctx.cfg.enable_index_owner) { + html("<td class='col-owner'>"); if (ctx.repo->owner_filter) { cgit_open_filter(ctx.repo->owner_filter); html_txt(ctx.repo->owner); @@ -346,12 +347,13 @@ void cgit_print_repolist(void) html("</a>"); free(currenturl); } - html("</td><td>"); + html("</td>"); } + html("<td class='col-idle'>"); print_modtime(ctx.repo); html("</td>"); if (ctx.cfg.enable_index_links) { - html("<td>"); + html("<td class='col-links'>"); cgit_summary_link("summary", NULL, "button", NULL); cgit_log_link("log", NULL, "button", NULL, NULL, NULL, 0, NULL, NULL, ctx.qry.showmsg, 0); |
