-rw-r--r-- | cgit.css | 6 | ||||
-rw-r--r-- | html.c | 2 | ||||
-rwxr-xr-x | tests/t0104-tree.sh | 10 | ||||
-rwxr-xr-x | tests/t0105-commit.sh | 2 | ||||
-rw-r--r-- | ui-commit.c | 6 | ||||
-rw-r--r-- | ui-diff.c | 2 | ||||
-rw-r--r-- | ui-log.c | 2 | ||||
-rw-r--r-- | ui-repolist.c | 2 | ||||
-rw-r--r-- | ui-shared.c | 24 | ||||
-rw-r--r-- | ui-summary.c | 2 | ||||
-rw-r--r-- | ui-tree.c | 6 |
11 files changed, 37 insertions, 27 deletions
@@ -113,3 +113,7 @@ div#sidebar div.infobox h1 { font-weight: bold; - margin: 0px; + margin: 8px 0px 0px 0px; +} + +div#sidebar div.infobox h1.first { + margin-top: 0px; } @@ -134,3 +134,3 @@ void html_option(char *value, char *text, char *selected_value) if (selected_value && !strcmp(selected_value, value)) - html(" selected"); + html(" selected='selected'"); html(">"); diff --git a/tests/t0104-tree.sh b/tests/t0104-tree.sh index 9c362ca..2516c72 100755 --- a/tests/t0104-tree.sh +++ b/tests/t0104-tree.sh @@ -11,4 +11,10 @@ run_test 'find file-50' 'grep -e "file-50" trash/tmp' run_test 'generate bar/tree/file-50' 'cgit_url "bar/tree/file-50" >trash/tmp' -run_test 'find line 1' 'grep -e "<a name=.1.>1</a>" trash/tmp' -run_test 'no line 2' 'grep -ve "<a name=.2.>2</a>" trash/tmp' + +run_test 'find line 1' ' + grep -e "<a id=.n1. name=.n1. href=.#n1.>1</a>" trash/tmp +' + +run_test 'no line 2' ' + grep -e "<a id=.n2. name=.n2. href=.#n2.>2</a>" trash/tmp +' diff --git a/tests/t0105-commit.sh b/tests/t0105-commit.sh index 7137751..aa2bf33 100755 --- a/tests/t0105-commit.sh +++ b/tests/t0105-commit.sh @@ -15,3 +15,3 @@ run_test 'find commit subject' ' run_test 'find commit msg' 'grep -e "<div class=.commit-msg.></div>" trash/tmp' -run_test 'find diffstat' 'grep -e "<table class=.diffstat.>" trash/tmp' +run_test 'find diffstat' 'grep -e "<table summary=.diffstat. class=.diffstat.>" trash/tmp' diff --git a/ui-commit.c b/ui-commit.c index 4ac8955..bd55a33 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -86,3 +86,3 @@ void print_fileinfo(struct fileinfo *info) html("</td><td class='graph'>"); - htmlf("<table width='%d%%'><tr>", (max_changes > 100 ? 100 : max_changes)); + htmlf("<table summary='file diffstat' width='%d%%'><tr>", (max_changes > 100 ? 100 : max_changes)); htmlf("<td class='add' style='width: %.1f%%;'/>", @@ -159,3 +159,3 @@ void cgit_print_commit(char *hex) - html("<table class='commit-info'>\n"); + html("<table summary='commit info' class='commit-info'>\n"); html("<tr><th>author</th><td>"); @@ -211,3 +211,3 @@ void cgit_print_commit(char *hex) html("<div class='diffstat-header'>Diffstat</div>"); - html("<table class='diffstat'>"); + html("<table summary='diffstat' class='diffstat'>"); max_changes = 0; @@ -143,3 +143,3 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, const char *prefi } - html("<table class='diff'>"); + html("<table summary='diff' class='diff'>"); html("<tr><td>"); @@ -92,3 +92,3 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern - html("<table class='list nowrap'>"); + html("<table summary='log' class='list nowrap'>"); html("<tr class='nohover'><th class='left'>Age</th>" diff --git a/ui-repolist.c b/ui-repolist.c index 9aa5c1e..3e97ca9 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -55,3 +55,3 @@ void cgit_print_repolist(struct cacheitem *item) - html("<table class='list nowrap'>"); + html("<table summary='repository list' class='list nowrap'>"); if (cgit_index_header) { diff --git a/ui-shared.c b/ui-shared.c index 7c69f60..9ec646b 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -360,3 +360,3 @@ void cgit_print_docstart(char *title, struct cacheitem *item) html(cgit_doctype); - html("<html>\n"); + html("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>\n"); html("<head>\n"); @@ -375,3 +375,3 @@ void cgit_print_docend() { - html("</td>\n</tr>\n<table>\n</body>\n</html>\n"); + html("</td>\n</tr>\n</table>\n</body>\n</html>\n"); } @@ -458,5 +458,5 @@ void cgit_print_pageheader(char *title, int show_search) html("<div id='sidebar'>\n"); - html("<a href='"); + html("<div id='logo'><a href='"); html_attr(cgit_rooturl()); - htmlf("'><div id='logo'><img src='%s' alt='cgit'/></div></a>\n", + htmlf("'><img src='%s' alt='cgit'/></a></div>\n", cgit_logo); @@ -464,3 +464,3 @@ void cgit_print_pageheader(char *title, int show_search) if (cgit_query_repo) { - html("<h1>"); + html("<h1 class='first'>"); html_txt(strrpart(cgit_repo->name, 20)); @@ -469,6 +469,6 @@ void cgit_print_pageheader(char *title, int show_search) if (cgit_repo->owner) { - html("<p>\n<h1>owner</h1>\n"); + html("<h1>owner</h1>\n"); html_txt(cgit_repo->owner); } - html("<p>\n<h1>navigate</h1>\n"); + html("<h1>navigate</h1>\n"); reporevlink(NULL, "summary", NULL, "menu", cgit_query_head, @@ -486,6 +486,6 @@ void cgit_print_pageheader(char *title, int show_search) - html("<p>\n<h1>branch</h1>\n"); + html("<h1>branch</h1>\n"); html("<form method='get' action=''>\n"); add_hidden_formfields(0, 1, cgit_query_page); - html("<table class='grid'><tr><td id='branch-dropdown-cell'>"); + html("<table summary='branch selector' class='grid'><tr><td id='branch-dropdown-cell'>"); html("<select name='h' onchange='this.form.submit();'>\n"); @@ -494,3 +494,3 @@ void cgit_print_pageheader(char *title, int show_search) html("</td><td>"); - html("<noscript><input type='submit' id='switch-btn' value='..'></noscript>\n"); + html("<noscript><input type='submit' id='switch-btn' value='..'/></noscript>\n"); html("</td></tr></table>"); @@ -498,3 +498,3 @@ void cgit_print_pageheader(char *title, int show_search) - html("<p>\n<h1>search</h1>\n"); + html("<h1>search</h1>\n"); html("<form method='get' action='"); @@ -521,3 +521,3 @@ void cgit_print_pageheader(char *title, int show_search) - html("</div>\n<table class='grid'><tr><td id='content'>\n"); + html("</div>\n<table summary='page content' class='grid'><tr><td id='content'>\n"); } diff --git a/ui-summary.c b/ui-summary.c index c856793..b96414e 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -192,3 +192,3 @@ void cgit_print_summary() NULL, NULL, 0); - html("<table class='list nowrap'>"); + html("<table summary='repository info' class='list nowrap'>"); if (cgit_summary_log > 0) @@ -19,3 +19,3 @@ static void print_object(const unsigned char *sha1, char *path) unsigned long size, lineno, start, idx; - const char *linefmt = "<tr><td class='no'><a name='%1$d'>%1$d</a></td><td class='txt'>"; + const char *linefmt = "<tr><td class='no'><a id='n%1$d' name='n%1$d' href='#n%1$d'>%1$d</a></td><td class='txt'>"; @@ -39,3 +39,3 @@ static void print_object(const unsigned char *sha1, char *path) - html("<table class='blob'>\n"); + html("<table summary='blob content' class='blob'>\n"); idx = 0; @@ -110,3 +110,3 @@ static void ls_head() { - html("<table class='list'>\n"); + html("<table summary='tree listing' class='list'>\n"); html("<tr class='nohover'>"); |