diff options
author | Lars Hjemli <hjemli@gmail.com> | 2007-06-17 20:17:00 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-06-17 20:17:00 (JST) |
commit | 426032f767763b46f462de51d1ebded34f671d79 (patch) | |
tree | c94684f2d5f6c4ea500ebc60a36a7d74ff76cadb | |
parent | 486c87ec2906c445ca505c877720d56e02aed784 (diff) | |
download | cgit-426032f767763b46f462de51d1ebded34f671d79.zip cgit-426032f767763b46f462de51d1ebded34f671d79.tar.gz |
ui-tree: html/css cleanup
Various fixes to make html and css more "clean". The only visible change
is the link to file/directory log: it is now printed as "L" (for Log)
instead of "H" (for History).
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.css | 17 | ||||
-rw-r--r-- | ui-tree.c | 18 |
2 files changed, 12 insertions, 23 deletions
@@ -174,28 +174,19 @@ div.error { | |||
174 | margin: 1em 2em; | 174 | margin: 1em 2em; |
175 | } | 175 | } |
176 | 176 | ||
177 | td.ls-blob, td.ls-dir, td.ls-mod { | 177 | a.ls-blob, a.ls-dir, a.ls-mod { |
178 | font-family: monospace; | 178 | font-family: monospace; |
179 | } | 179 | } |
180 | 180 | ||
181 | div.ls-dir a { | 181 | td.ls-size { |
182 | font-weight: bold; | ||
183 | } | ||
184 | |||
185 | th.filesize, td.filesize { | ||
186 | text-align: right; | 182 | text-align: right; |
187 | } | 183 | } |
188 | 184 | ||
189 | td.filesize { | 185 | td.ls-size { |
190 | font-family: monospace; | 186 | font-family: monospace; |
191 | } | 187 | } |
192 | 188 | ||
193 | td.links { | 189 | td.ls-mode { |
194 | font-size: 80%; | ||
195 | padding-left: 2em; | ||
196 | } | ||
197 | |||
198 | td.filemode { | ||
199 | font-family: monospace; | 190 | font-family: monospace; |
200 | } | 191 | } |
201 | 192 | ||
@@ -72,11 +72,11 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, | |||
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | 74 | ||
75 | html("<tr><td class='filemode'>"); | 75 | html("<tr><td class='ls-mode'>"); |
76 | html_filemode(mode); | 76 | html_filemode(mode); |
77 | html("</td><td "); | 77 | html("</td><td>"); |
78 | if (S_ISDIRLNK(mode)) { | 78 | if (S_ISDIRLNK(mode)) { |
79 | htmlf("class='ls-mod'><a href='"); | 79 | htmlf("<a class='ls-mod' href='"); |
80 | html_attr(fmt(cgit_repo->module_link, | 80 | html_attr(fmt(cgit_repo->module_link, |
81 | name, | 81 | name, |
82 | sha1_to_hex(sha1))); | 82 | sha1_to_hex(sha1))); |
@@ -84,23 +84,21 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, | |||
84 | html_txt(name); | 84 | html_txt(name); |
85 | html("</a>"); | 85 | html("</a>"); |
86 | } else if (S_ISDIR(mode)) { | 86 | } else if (S_ISDIR(mode)) { |
87 | html("class='ls-dir'>"); | 87 | cgit_tree_link(name, NULL, "ls-dir", cgit_query_head, |
88 | cgit_tree_link(name, NULL, NULL, cgit_query_head, | ||
89 | curr_rev, fullpath); | 88 | curr_rev, fullpath); |
90 | } else { | 89 | } else { |
91 | html("class='ls-blob'>"); | 90 | cgit_tree_link(name, NULL, "ls-blob", cgit_query_head, |
92 | cgit_tree_link(name, NULL, NULL, cgit_query_head, | ||
93 | curr_rev, fullpath); | 91 | curr_rev, fullpath); |
94 | } | 92 | } |
95 | htmlf("</td><td class='filesize'>%li</td>", size); | 93 | htmlf("</td><td class='ls-size'>%li</td>", size); |
96 | 94 | ||
97 | html("<td class='links'><a href='"); | 95 | html("<td><a href='"); |
98 | qry = fmt("h=%s&path=%s%s%s", curr_rev, | 96 | qry = fmt("h=%s&path=%s%s%s", curr_rev, |
99 | cgit_query_path ? cgit_query_path : "", | 97 | cgit_query_path ? cgit_query_path : "", |
100 | cgit_query_path ? "/" : "", pathname); | 98 | cgit_query_path ? "/" : "", pathname); |
101 | url = cgit_pageurl(cgit_query_repo, "log", qry); | 99 | url = cgit_pageurl(cgit_query_repo, "log", qry); |
102 | html_attr(url); | 100 | html_attr(url); |
103 | html("' class='button'>H</a></td>"); | 101 | html("' title='Log' class='button'>L</a></td>"); |
104 | html("</tr>\n"); | 102 | html("</tr>\n"); |
105 | free(name); | 103 | free(name); |
106 | return 0; | 104 | return 0; |