Website Summary Files Commits Branches @commit @diff @stats
path: root / ui-shared.c
diff options
context:
space:
mode:
Commit2384fa99a62615c88884d5e0ab7f921f14500646 (patch)
Author
 Syndamia <kamen@syndamia.com>
2026-09-27 22:04:58 +0300
Committer
 Syndamia <kamen@syndamia.com>
2026-09-27 22:16:27 +0300
Filesf5ff1fcd6df2aa0fa78e2a71fda63e82c88cb7e5 /ui-shared.c
cgit-2384fa99a62615c88884d5e0ab7f921f14500646.tar
cgit-2384fa99a62615c88884d5e0ab7f921f14500646.tar.gz
cgit-2384fa99a62615c88884d5e0ab7f921f14500646.zip
Parentb2c665a5ebe44c35befc88bb09b0fe1cbdfd904b (diff)
html: Improve navigation compatibility
Primarily adds spaces between different links to make navigation when CSS is not available easier
1 files changed, 13 insertions, 3 deletions
-rw-r--r--ui-shared.c16
diff --git a/ui-shared.c b/ui-shared.c
index 44794d8..5b1273c 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -821,6 +821,7 @@ void cgit_print_docstart(void)
htmlf("<meta name='generator' content='cgit %s'/>\n", cgit_version);
if (ctx.cfg.robots && *ctx.cfg.robots)
htmlf("<meta name='robots' content='%s'/>\n", ctx.cfg.robots);
+ html("<meta id='viewport' name='viewport' content='width=device-width initial-scale=1'/>\n");
if (ctx.cfg.css.items)
for_each_string_list(&ctx.cfg.css, emit_css_link, NULL);
@@ -1001,7 +1002,7 @@ static void cgit_print_path_crumbs(char *path)
if (!(q = strchr(p, '/')) || levels > 15)
q = end;
*q = '\0';
- html_txt("/");
+ html_txt(" / ");
cgit_self_link(p, NULL, NULL);
if (q < end)
*q = '/';
@@ -1086,30 +1087,39 @@ void cgit_print_pageheader(void)
html("<table class='tabs'><tr><td>\n");
if (ctx.env.authenticated && ctx.repo) {
- if (ctx.repo->readme.nr)
+ if (ctx.repo->readme.nr) {
reporevlink("about", "about", NULL,
hc("about"), ctx.qry.head, NULL,
NULL);
+ html(" ");
+ }
cgit_summary_link("summary", NULL, hc("summary"),
ctx.qry.head);
+ html(" ");
cgit_refs_link("refs", NULL, hc("refs"), ctx.qry.head,
ctx.qry.oid, NULL);
+ html(" ");
cgit_log_link("log", NULL, hc("log"), ctx.qry.head,
NULL, ctx.qry.vpath, 0, NULL, NULL,
ctx.qry.showmsg, ctx.qry.follow);
+ html(" ");
if (ctx.qry.page && !strcmp(ctx.qry.page, "blame"))
cgit_blame_link("blame", NULL, hc("blame"), ctx.qry.head,
ctx.qry.oid, ctx.qry.vpath);
else
cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head,
ctx.qry.oid, ctx.qry.vpath);
+ html(" ");
cgit_commit_link("commit", NULL, hc("commit"),
ctx.qry.head, ctx.qry.oid, ctx.qry.vpath);
+ html(" ");
cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head,
ctx.qry.oid, ctx.qry.oid2, ctx.qry.vpath);
- if (ctx.repo->max_stats)
+ if (ctx.repo->max_stats) {
+ html(" ");
cgit_stats_link("stats", NULL, hc("stats"),
ctx.qry.head, ctx.qry.vpath);
+ }
if (ctx.repo->homepage) {
html("<a href='");
html_attr(ctx.repo->homepage);