author | Lars Hjemli <hjemli@gmail.com> | 2006-12-22 00:44:32 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2006-12-22 00:44:32 (UTC) |
commit | c43f1246cb759eb811ab0ebef0613b86dda99581 (patch) (unidiff) | |
tree | 1c237eb024ff7c2b669aa0ee1a00247d78dd9591 | |
parent | 2efee09abe28ecd2719201da6cd9915f14d93a56 (diff) | |
download | cgit-c43f1246cb759eb811ab0ebef0613b86dda99581.zip cgit-c43f1246cb759eb811ab0ebef0613b86dda99581.tar.gz cgit-c43f1246cb759eb811ab0ebef0613b86dda99581.tar.bz2 |
Minor style fixes
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.css | 14 | ||||
-rw-r--r-- | ui-repolist.c | 7 |
2 files changed, 12 insertions, 9 deletions
@@ -1,163 +1,163 @@ | |||
1 | body { | 1 | body { |
2 | font-family: arial; | 2 | font-family: arial; |
3 | font-size: normal; | 3 | font-size: normal; |
4 | background: white; | 4 | background: white; |
5 | padding: 0em; | 5 | padding: 0em; |
6 | margin: 0.5em 1em; | 6 | margin: 0.5em 1em; |
7 | } | 7 | } |
8 | 8 | ||
9 | 9 | ||
10 | h2 { | 10 | h2 { |
11 | font-size: normal; | 11 | font-size: 100%; |
12 | font-weight: bold; | 12 | font-weight: bold; |
13 | margin-bottom: 0.1em; | 13 | margin-bottom: 0.1em; |
14 | } | 14 | } |
15 | 15 | ||
16 | a { | 16 | a { |
17 | color: blue; | 17 | color: blue; |
18 | text-decoration: none; | 18 | text-decoration: none; |
19 | } | 19 | } |
20 | 20 | ||
21 | a:hover { | 21 | a:hover { |
22 | text-decoration: underline; | 22 | text-decoration: underline; |
23 | } | 23 | } |
24 | 24 | ||
25 | table.list { | 25 | table.list { |
26 | border: solid 1px black; | 26 | border: solid 1px black; |
27 | border-collapse: collapse; | 27 | border-collapse: collapse; |
28 | border: solid 1px #aaa; | 28 | border: solid 1px #aaa; |
29 | } | 29 | } |
30 | table.list tr { | 30 | table.list tr { |
31 | background: white; | 31 | background: white; |
32 | } | 32 | } |
33 | table.list tr:hover { | 33 | table.list tr:hover { |
34 | background: #eee; | 34 | background: #eeb; |
35 | } | 35 | } |
36 | table.list th { | 36 | table.list th { |
37 | font-weight: bold; | 37 | font-weight: normal; |
38 | background: #ddd; | 38 | background: #ddd; |
39 | border-bottom: solid 1px #aaa; | 39 | border-bottom: solid 1px #aaa; |
40 | padding: 0.1em 0.5em 0.1em 0.5em; | 40 | padding: 0.1em 0.5em 0.1em 0.5em; |
41 | vertical-align: baseline; | 41 | vertical-align: baseline; |
42 | } | 42 | } |
43 | table.list td { | 43 | table.list td { |
44 | border: none; | 44 | border: none; |
45 | padding: 0.1em 0.5em 0.1em 0.5em; | 45 | padding: 0.1em 0.5em 0.1em 0.5em; |
46 | } | 46 | } |
47 | img { | 47 | img { |
48 | border: none; | 48 | border: none; |
49 | } | 49 | } |
50 | 50 | ||
51 | 51 | ||
52 | div#header { | 52 | div#header { |
53 | background-color: #eee; | 53 | background-color: #ddd; |
54 | padding: 0.25em 0.25em 0.25em 0.5em; | 54 | padding: 0.25em 0.25em 0.25em 0.5em; |
55 | font-size: 150%; | 55 | font-size: 150%; |
56 | font-weight: bold; | 56 | font-weight: bold; |
57 | border: solid 1px #ccc; | 57 | border: solid 1px #aaa; |
58 | vertical-align: middle; | 58 | vertical-align: middle; |
59 | margin-bottom: 2em; | ||
59 | } | 60 | } |
60 | div#header img#logo { | 61 | div#header img#logo { |
61 | float: right; | 62 | float: right; |
62 | } | 63 | } |
63 | div#header a { | 64 | div#header a { |
64 | color: black; | 65 | color: black; |
65 | } | 66 | } |
66 | 67 | ||
67 | div#content { | 68 | div#content { |
68 | margin: 0.5em 0.5em; | 69 | margin: 0.5em 0.5em; |
69 | } | 70 | } |
70 | 71 | ||
71 | div#blob { | 72 | div#blob { |
72 | border: solid 1px black; | 73 | border: solid 1px black; |
73 | } | 74 | } |
74 | 75 | ||
75 | div.error { | 76 | div.error { |
76 | color: red; | 77 | color: red; |
77 | font-weight: bold; | 78 | font-weight: bold; |
78 | margin: 1em 2em; | 79 | margin: 1em 2em; |
79 | } | 80 | } |
80 | div.ls-blob, div.ls-dir { | 81 | div.ls-blob, div.ls-dir { |
81 | font-family: monospace; | 82 | font-family: monospace; |
82 | } | 83 | } |
83 | div.ls-dir a { | 84 | div.ls-dir a { |
84 | font-weight: bold; | 85 | font-weight: bold; |
85 | } | 86 | } |
86 | th.filesize, td.filesize { | 87 | th.filesize, td.filesize { |
87 | text-align: right; | 88 | text-align: right; |
88 | } | 89 | } |
89 | td.filesize { | 90 | td.filesize { |
90 | font-family: monospace; | 91 | font-family: monospace; |
91 | } | 92 | } |
92 | td.filemode { | 93 | td.filemode { |
93 | font-family: monospace; | 94 | font-family: monospace; |
94 | } | 95 | } |
95 | 96 | ||
96 | td.blob { | 97 | td.blob { |
97 | white-space: pre; | 98 | white-space: pre; |
98 | font-family: courier; | 99 | font-family: monospace; |
99 | font-size: 100%; | ||
100 | background-color: white; | 100 | background-color: white; |
101 | } | 101 | } |
102 | 102 | ||
103 | table.nowrap td { | 103 | table.nowrap td { |
104 | white-space: nowrap; | 104 | white-space: nowrap; |
105 | } | 105 | } |
106 | 106 | ||
107 | table.commit-info { | 107 | table.commit-info { |
108 | border-collapse: collapse; | 108 | border-collapse: collapse; |
109 | margin-top: 1.5em; | 109 | margin-top: 1.5em; |
110 | } | 110 | } |
111 | table.commit-info th { | 111 | table.commit-info th { |
112 | text-align: left; | 112 | text-align: left; |
113 | font-weight: normal; | 113 | font-weight: normal; |
114 | padding: 0.1em 1em 0.1em 0.1em; | 114 | padding: 0.1em 1em 0.1em 0.1em; |
115 | } | 115 | } |
116 | table.commit-info td { | 116 | table.commit-info td { |
117 | font-weight: normal; | 117 | font-weight: normal; |
118 | padding: 0.1em 1em 0.1em 0.1em; | 118 | padding: 0.1em 1em 0.1em 0.1em; |
119 | } | 119 | } |
120 | div.commit-subject { | 120 | div.commit-subject { |
121 | font-weight: bold; | 121 | font-weight: bold; |
122 | font-size: 125%; | 122 | font-size: 125%; |
123 | margin: 1.5em 0em 0.5em 0em; | 123 | margin: 1.5em 0em 0.5em 0em; |
124 | padding: 0em; | 124 | padding: 0em; |
125 | } | 125 | } |
126 | div.commit-msg { | 126 | div.commit-msg { |
127 | white-space: pre; | 127 | white-space: pre; |
128 | font-family: monospace; | 128 | font-family: monospace; |
129 | } | 129 | } |
130 | table.diffstat { | 130 | table.diffstat { |
131 | border-collapse: collapse; | 131 | border-collapse: collapse; |
132 | margin-top: 1.5em; | 132 | margin-top: 1.5em; |
133 | } | 133 | } |
134 | table.diffstat th { | 134 | table.diffstat th { |
135 | font-weight: normal; | 135 | font-weight: normal; |
136 | text-align: left; | 136 | text-align: left; |
137 | text-decoration: underline; | 137 | text-decoration: underline; |
138 | padding: 0.1em 1em 0.1em 0.1em; | 138 | padding: 0.1em 1em 0.1em 0.1em; |
139 | font-size: 100%; | 139 | font-size: 100%; |
140 | } | 140 | } |
141 | table.diffstat td { | 141 | table.diffstat td { |
142 | padding: 0.1em 1em 0.1em 0.1em; | 142 | padding: 0.1em 1em 0.1em 0.1em; |
143 | font-size: 100%; | 143 | font-size: 100%; |
144 | } | 144 | } |
145 | table.diffstat td span.modechange { | 145 | table.diffstat td span.modechange { |
146 | padding-left: 1em; | 146 | padding-left: 1em; |
147 | color: red; | 147 | color: red; |
148 | } | 148 | } |
149 | table.diffstat td.add a { | 149 | table.diffstat td.add a { |
150 | color: green; | 150 | color: green; |
151 | } | 151 | } |
152 | table.diffstat td.del a { | 152 | table.diffstat td.del a { |
153 | color: red; | 153 | color: red; |
154 | } | 154 | } |
155 | table.diffstat td.upd a { | 155 | table.diffstat td.upd a { |
156 | color: blue; | 156 | color: blue; |
157 | } | 157 | } |
158 | table.diffstat td.summary { | 158 | table.diffstat td.summary { |
159 | /* border-top: solid 1px black; */ | 159 | /* border-top: solid 1px black; */ |
160 | color: #888; | 160 | color: #888; |
161 | padding-top: 0.5em; | 161 | padding-top: 0.5em; |
162 | } | 162 | } |
163 | 163 | ||
diff --git a/ui-repolist.c b/ui-repolist.c index 1fe7059..7090c12 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -1,60 +1,63 @@ | |||
1 | /* ui-repolist.c: functions for generating the repolist page | 1 | /* ui-repolist.c: functions for generating the repolist page |
2 | * | 2 | * |
3 | * Copyright (C) 2006 Lars Hjemli | 3 | * Copyright (C) 2006 Lars Hjemli |
4 | * | 4 | * |
5 | * Licensed under GNU General Public License v2 | 5 | * Licensed under GNU General Public License v2 |
6 | * (see COPYING for full license text) | 6 | * (see COPYING for full license text) |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "cgit.h" | 9 | #include "cgit.h" |
10 | 10 | ||
11 | void cgit_print_repolist(struct cacheitem *item) | 11 | void cgit_print_repolist(struct cacheitem *item) |
12 | { | 12 | { |
13 | DIR *d; | 13 | DIR *d; |
14 | struct dirent *de; | 14 | struct dirent *de; |
15 | struct stat st; | 15 | struct stat st; |
16 | char *name; | 16 | char *name; |
17 | 17 | ||
18 | chdir(cgit_root); | 18 | chdir(cgit_root); |
19 | cgit_print_docstart(cgit_root_title, item); | 19 | cgit_print_docstart(cgit_root_title, item); |
20 | cgit_print_pageheader(cgit_root_title); | 20 | cgit_print_pageheader(cgit_root_title); |
21 | 21 | ||
22 | if (!(d = opendir("."))) { | 22 | if (!(d = opendir("."))) { |
23 | cgit_print_error(fmt("Unable to scan repository directory: %s", | 23 | cgit_print_error(fmt("Unable to scan repository directory: %s", |
24 | strerror(errno))); | 24 | strerror(errno))); |
25 | cgit_print_docend(); | 25 | cgit_print_docend(); |
26 | return; | 26 | return; |
27 | } | 27 | } |
28 | 28 | ||
29 | html("<h2>Repositories</h2>\n"); | 29 | html("<h2>Repositories</h2>\n"); |
30 | html("<table class='list'>"); | 30 | html("<table class='list nowrap'>"); |
31 | html("<tr><th>Name</th><th>Description</th><th>Owner</th></tr>\n"); | 31 | html("<tr>" |
32 | "<th class='left'>Name</th>" | ||
33 | "<th class='left'>Description</th>" | ||
34 | "<th class='left'>Owner</th></tr>\n"); | ||
32 | while ((de = readdir(d)) != NULL) { | 35 | while ((de = readdir(d)) != NULL) { |
33 | if (de->d_name[0] == '.') | 36 | if (de->d_name[0] == '.') |
34 | continue; | 37 | continue; |
35 | if (stat(de->d_name, &st) < 0) | 38 | if (stat(de->d_name, &st) < 0) |
36 | continue; | 39 | continue; |
37 | if (!S_ISDIR(st.st_mode)) | 40 | if (!S_ISDIR(st.st_mode)) |
38 | continue; | 41 | continue; |
39 | 42 | ||
40 | cgit_repo_name = cgit_repo_desc = cgit_repo_owner = NULL; | 43 | cgit_repo_name = cgit_repo_desc = cgit_repo_owner = NULL; |
41 | name = fmt("%s/info/cgit", de->d_name); | 44 | name = fmt("%s/info/cgit", de->d_name); |
42 | if (cgit_read_config(name, cgit_repo_config_cb)) | 45 | if (cgit_read_config(name, cgit_repo_config_cb)) |
43 | continue; | 46 | continue; |
44 | 47 | ||
45 | html("<tr><td>"); | 48 | html("<tr><td>"); |
46 | html_link_open(cgit_repourl(de->d_name), NULL, NULL); | 49 | html_link_open(cgit_repourl(de->d_name), NULL, NULL); |
47 | html_txt(cgit_repo_name); | 50 | html_txt(cgit_repo_name); |
48 | html_link_close(); | 51 | html_link_close(); |
49 | html("</td><td>"); | 52 | html("</td><td>"); |
50 | html_txt(cgit_repo_desc); | 53 | html_txt(cgit_repo_desc); |
51 | html("</td><td>"); | 54 | html("</td><td>"); |
52 | html_txt(cgit_repo_owner); | 55 | html_txt(cgit_repo_owner); |
53 | html("</td></tr>\n"); | 56 | html("</td></tr>\n"); |
54 | } | 57 | } |
55 | closedir(d); | 58 | closedir(d); |
56 | html("</table>"); | 59 | html("</table>"); |
57 | cgit_print_docend(); | 60 | cgit_print_docend(); |
58 | } | 61 | } |
59 | 62 | ||
60 | 63 | ||