diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Give every summary section the same columns
The ref rows always spanned five columns and the log three to five, so with the default config the log and clone rows stopped 160px short of the table's edge, and with any config the log rows did on a phone, where they alone lost their counts. A column no cell began in also made the summary and refs pages invalid HTML.
Diffstat (limited to 'source/ui-refs.h')
-rw-r--r--source/ui-refs.h10
1 file changed, 7 insertions, 3 deletions
diff --git a/source/ui-refs.h b/source/ui-refs.h
index c66050b..b5d4aba 100644
--- a/source/ui-refs.h
+++ b/source/ui-refs.h
@@ -7,13 +7,17 @@
#ifndef CGIT_UI_REFS_H
#define CGIT_UI_REFS_H
+// The name, the commit message or downloads, the author and the age.
+#define REF_COLUMNS 4
+
/*
* Rows for the newest branches or tags, at most maxcount of them, where a
* maxcount of zero means every one. A section that leaves refs out ends in a
- * link to the matching form of the refs page.
+ * link to the matching form of the refs page. columns is the width of the
+ * table the rows go into, which is at least REF_COLUMNS.
*/
-extern void cgit_print_branches(int maxcount);
-extern void cgit_print_tags(int maxcount);
+extern void cgit_print_branches(int maxcount, int columns);
+extern void cgit_print_tags(int maxcount, int columns);
/*
* The whole refs page. Without a path it holds a capped section of each kind,