author | Lars Hjemli <hjemli@gmail.com> | 2007-05-22 21:08:46 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-22 21:12:41 (UTC) |
commit | 5db39170b6c979655a0238dcd627e206febed88b (patch) (unidiff) | |
tree | 2c79691bde31f9db2861dc76010691e9dbdde1cb /cgit.css | |
parent | 3b86b44fc761cfa8b97c44bbbdd63c9fbf1127ed (diff) | |
download | cgit-5db39170b6c979655a0238dcd627e206febed88b.zip cgit-5db39170b6c979655a0238dcd627e206febed88b.tar.gz cgit-5db39170b6c979655a0238dcd627e206febed88b.tar.bz2 |
Add cgit_print_age() function
This function can be used to print relative dates, just as in gitweb. Next
step will be to actually use the new function.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.css | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -199,192 +199,217 @@ td.filemode { | |||
199 | } | 199 | } |
200 | 200 | ||
201 | td.blob { | 201 | td.blob { |
202 | white-space: pre; | 202 | white-space: pre; |
203 | font-family: monospace; | 203 | font-family: monospace; |
204 | background-color: white; | 204 | background-color: white; |
205 | } | 205 | } |
206 | 206 | ||
207 | table.nowrap td { | 207 | table.nowrap td { |
208 | white-space: nowrap; | 208 | white-space: nowrap; |
209 | } | 209 | } |
210 | 210 | ||
211 | table.commit-info { | 211 | table.commit-info { |
212 | border-collapse: collapse; | 212 | border-collapse: collapse; |
213 | margin-top: 1.5em; | 213 | margin-top: 1.5em; |
214 | } | 214 | } |
215 | 215 | ||
216 | table.commit-info th { | 216 | table.commit-info th { |
217 | text-align: left; | 217 | text-align: left; |
218 | font-weight: normal; | 218 | font-weight: normal; |
219 | padding: 0.1em 1em 0.1em 0.1em; | 219 | padding: 0.1em 1em 0.1em 0.1em; |
220 | } | 220 | } |
221 | 221 | ||
222 | table.commit-info td { | 222 | table.commit-info td { |
223 | font-weight: normal; | 223 | font-weight: normal; |
224 | padding: 0.1em 1em 0.1em 0.1em; | 224 | padding: 0.1em 1em 0.1em 0.1em; |
225 | } | 225 | } |
226 | 226 | ||
227 | div.commit-subject { | 227 | div.commit-subject { |
228 | font-weight: bold; | 228 | font-weight: bold; |
229 | font-size: 125%; | 229 | font-size: 125%; |
230 | margin: 1.5em 0em 0.5em 0em; | 230 | margin: 1.5em 0em 0.5em 0em; |
231 | padding: 0em; | 231 | padding: 0em; |
232 | } | 232 | } |
233 | 233 | ||
234 | div.commit-msg { | 234 | div.commit-msg { |
235 | white-space: pre; | 235 | white-space: pre; |
236 | font-family: monospace; | 236 | font-family: monospace; |
237 | } | 237 | } |
238 | 238 | ||
239 | div.diffstat-header { | 239 | div.diffstat-header { |
240 | font-weight: bold; | 240 | font-weight: bold; |
241 | padding-top: 1.5em; | 241 | padding-top: 1.5em; |
242 | } | 242 | } |
243 | 243 | ||
244 | table.diffstat { | 244 | table.diffstat { |
245 | border-collapse: collapse; | 245 | border-collapse: collapse; |
246 | width: 100%; | 246 | width: 100%; |
247 | border: solid 1px #aaa; | 247 | border: solid 1px #aaa; |
248 | background-color: #eee; | 248 | background-color: #eee; |
249 | } | 249 | } |
250 | 250 | ||
251 | table.diffstat tr:hover { | 251 | table.diffstat tr:hover { |
252 | background-color: #ccc; | 252 | background-color: #ccc; |
253 | } | 253 | } |
254 | 254 | ||
255 | table.diffstat th { | 255 | table.diffstat th { |
256 | font-weight: normal; | 256 | font-weight: normal; |
257 | text-align: left; | 257 | text-align: left; |
258 | text-decoration: underline; | 258 | text-decoration: underline; |
259 | padding: 0.1em 1em 0.1em 0.1em; | 259 | padding: 0.1em 1em 0.1em 0.1em; |
260 | font-size: 100%; | 260 | font-size: 100%; |
261 | } | 261 | } |
262 | 262 | ||
263 | table.diffstat td { | 263 | table.diffstat td { |
264 | padding: 0.2em 0.2em 0.1em 0.1em; | 264 | padding: 0.2em 0.2em 0.1em 0.1em; |
265 | font-size: 100%; | 265 | font-size: 100%; |
266 | border: none; | 266 | border: none; |
267 | } | 267 | } |
268 | 268 | ||
269 | table.diffstat td.mode { | 269 | table.diffstat td.mode { |
270 | white-space: nowrap; | 270 | white-space: nowrap; |
271 | } | 271 | } |
272 | 272 | ||
273 | table.diffstat td span.modechange { | 273 | table.diffstat td span.modechange { |
274 | padding-left: 1em; | 274 | padding-left: 1em; |
275 | color: red; | 275 | color: red; |
276 | } | 276 | } |
277 | 277 | ||
278 | table.diffstat td.add a { | 278 | table.diffstat td.add a { |
279 | color: green; | 279 | color: green; |
280 | } | 280 | } |
281 | 281 | ||
282 | table.diffstat td.del a { | 282 | table.diffstat td.del a { |
283 | color: red; | 283 | color: red; |
284 | } | 284 | } |
285 | 285 | ||
286 | table.diffstat td.upd a { | 286 | table.diffstat td.upd a { |
287 | color: blue; | 287 | color: blue; |
288 | } | 288 | } |
289 | 289 | ||
290 | table.diffstat td.graph { | 290 | table.diffstat td.graph { |
291 | width: 75%; | 291 | width: 75%; |
292 | vertical-align: center; | 292 | vertical-align: center; |
293 | } | 293 | } |
294 | 294 | ||
295 | table.diffstat td.graph table { | 295 | table.diffstat td.graph table { |
296 | border: none; | 296 | border: none; |
297 | } | 297 | } |
298 | 298 | ||
299 | table.diffstat td.graph td { | 299 | table.diffstat td.graph td { |
300 | padding: 0px; | 300 | padding: 0px; |
301 | border: 0px; | 301 | border: 0px; |
302 | height: 7pt; | 302 | height: 7pt; |
303 | } | 303 | } |
304 | 304 | ||
305 | table.diffstat td.graph td.add { | 305 | table.diffstat td.graph td.add { |
306 | background-color: #5c5; | 306 | background-color: #5c5; |
307 | } | 307 | } |
308 | 308 | ||
309 | table.diffstat td.graph td.rem { | 309 | table.diffstat td.graph td.rem { |
310 | background-color: #c55; | 310 | background-color: #c55; |
311 | } | 311 | } |
312 | 312 | ||
313 | table.diffstat td.graph td.none { | 313 | table.diffstat td.graph td.none { |
314 | background-color: none; | 314 | background-color: none; |
315 | } | 315 | } |
316 | 316 | ||
317 | div.diffstat-summary { | 317 | div.diffstat-summary { |
318 | color: #888; | 318 | color: #888; |
319 | padding-top: 0.5em; | 319 | padding-top: 0.5em; |
320 | } | 320 | } |
321 | 321 | ||
322 | table.diff td { | 322 | table.diff td { |
323 | font-family: monospace; | 323 | font-family: monospace; |
324 | white-space: pre; | 324 | white-space: pre; |
325 | } | 325 | } |
326 | 326 | ||
327 | table.diff td div.head { | 327 | table.diff td div.head { |
328 | font-weight: bold; | 328 | font-weight: bold; |
329 | padding-top: 1em; | 329 | padding-top: 1em; |
330 | } | 330 | } |
331 | 331 | ||
332 | table.diff td div.hunk { | 332 | table.diff td div.hunk { |
333 | color: #009; | 333 | color: #009; |
334 | } | 334 | } |
335 | 335 | ||
336 | table.diff td div.add { | 336 | table.diff td div.add { |
337 | color: green; | 337 | color: green; |
338 | } | 338 | } |
339 | 339 | ||
340 | table.diff td div.del { | 340 | table.diff td div.del { |
341 | color: red; | 341 | color: red; |
342 | } | 342 | } |
343 | 343 | ||
344 | .sha1 { | 344 | .sha1 { |
345 | font-family: courier; | 345 | font-family: courier; |
346 | font-size: 90%; | 346 | font-size: 90%; |
347 | } | 347 | } |
348 | 348 | ||
349 | .left { | 349 | .left { |
350 | text-align: left; | 350 | text-align: left; |
351 | } | 351 | } |
352 | 352 | ||
353 | .right { | 353 | .right { |
354 | text-align: right; | 354 | text-align: right; |
355 | } | 355 | } |
356 | 356 | ||
357 | table.list td.repogroup { | 357 | table.list td.repogroup { |
358 | font-style: italic; | 358 | font-style: italic; |
359 | color: #888; | 359 | color: #888; |
360 | } | 360 | } |
361 | 361 | ||
362 | a.button { | 362 | a.button { |
363 | font-size: 80%; | 363 | font-size: 80%; |
364 | color: #333; | 364 | color: #333; |
365 | background-color: #ccc; | 365 | background-color: #ccc; |
366 | border: solid 1px #999; | 366 | border: solid 1px #999; |
367 | padding: 0em 0.5em; | 367 | padding: 0em 0.5em; |
368 | margin: 0.1em 0.25em; | 368 | margin: 0.1em 0.25em; |
369 | } | 369 | } |
370 | 370 | ||
371 | a.button:hover { | 371 | a.button:hover { |
372 | text-decoration: none; | 372 | text-decoration: none; |
373 | background-color: #eee; | 373 | background-color: #eee; |
374 | } | 374 | } |
375 | 375 | ||
376 | a.primary { | 376 | a.primary { |
377 | font-size: 100%; | 377 | font-size: 100%; |
378 | } | 378 | } |
379 | 379 | ||
380 | a.secondary { | 380 | a.secondary { |
381 | font-size: 90%; | 381 | font-size: 90%; |
382 | } | 382 | } |
383 | 383 | ||
384 | td.toplevel-repo { | 384 | td.toplevel-repo { |
385 | 385 | ||
386 | } | 386 | } |
387 | 387 | ||
388 | table.list td.sublevel-repo { | 388 | table.list td.sublevel-repo { |
389 | padding-left: 1.5em; | 389 | padding-left: 1.5em; |
390 | } | 390 | } |
391 | |||
392 | span.age-mins { | ||
393 | font-weight: bold; | ||
394 | color: #080; | ||
395 | } | ||
396 | |||
397 | span.age-hours { | ||
398 | color: #080; | ||
399 | } | ||
400 | |||
401 | span.age-days { | ||
402 | color: #040; | ||
403 | } | ||
404 | |||
405 | span.age-weeks { | ||
406 | color: #444; | ||
407 | } | ||
408 | |||
409 | span.age-months { | ||
410 | color: #888; | ||
411 | } | ||
412 | |||
413 | span.age-years { | ||
414 | color: #bbb; | ||
415 | } | ||