From f135569b2be3fb1816f802f9a162b3743b735d1c Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sat, 12 Apr 2008 15:53:31 +0200 Subject: [PATCH] Replace sidebar/logo This replaces the sidebar with a more 'common' header layout and also updates the logo. Not quite finished yet, though. Signed-off-by: Lars Hjemli --- cgit.css | 163 ++++++++++++++++++++-------------------------------- cgit.png | Bin 5406 -> 1840 bytes ui-shared.c | 125 ++++++++++++++-------------------------- 3 files changed, 105 insertions(+), 183 deletions(-) diff --git a/cgit.css b/cgit.css index 17c2712..67cf48e 100644 --- a/cgit.css +++ b/cgit.css @@ -11,41 +11,67 @@ body { padding: 4px; } -table { - border-collapse: collapse; -} - -h2 { - font-size: 120%; - font-weight: bold; - margin-top: 0em; - margin-bottom: 0.25em; -} - -h3 { - margin-top: 0em; - font-size: 100%; - font-weight: normal; -} - -h4 { - margin-top: 1.5em; - margin-bottom: 0.1em; - font-size: 100%; - font-weight: bold; -} - a { - color: #600; + color: blue; text-decoration: none; } a:hover { - background-color: #ddd; - text-decoration: none; + text-decoration: underline; } +table { + border-collapse: collapse; +} + +table#header { + width: 100%; + margin-bottom: 1em; +} + +table#header td.logo { + width: 96px; +} + +table#header td.main { + font-size: 200%; +} + +table#header td.sub { + color: #777; + border-top: solid 1px #ccc; +} + +table.tabs { + border-bottom: solid 2px #ccc; + border-collapse: collapse; + margin-top: 2em; + margin-bottom: 1em; + width: 100%; +} + +table.tabs td { + padding: 0px 0.5em; +} + +table.tabs td a { + padding: 2px 1em; + color: #007; +} + +table.tabs td a.active { + color: #000; + background-color: #ccc; +} + +div.content { + margin: 0px; + padding: 1em; +} + + table.list { + width: 100%; border: none; border-collapse: collapse; } @@ -55,7 +81,7 @@ table.list tr { } table.list tr:hover { - background: #f8f8f8; + background: #eee; } table.list tr.nohover:hover { @@ -63,8 +89,8 @@ table.list tr.nohover:hover { } table.list th { - font-weight: bold; - border-bottom: solid 1px #777; + font-weight: normal; + border-bottom: solid 1px #ccc; padding: 0.1em 0.5em 0.1em 0.5em; vertical-align: baseline; } @@ -74,81 +100,14 @@ table.list td { padding: 0.1em 0.5em 0.1em 0.5em; } +table.list td a { + color: black; +} + img { border: none; } -table#layout { - border-collapse: collapse; - border: none; - margin: 0px; -} - -td#sidebar { - vertical-align: top; - width: 162px; - padding: 0px 0px 0px 0px; - margin: 0px; -} - -td#sidebar table { - border-collapse: separate; - border-spacing: 0px; - margin: 0px; - padding: 0px; - background-color: #ccc; -} - -td#sidebar table.sidebar td.sidebar { - padding: 4px; - border-top: solid 1px #eee; - border-left: solid 1px #eee; - border-right: solid 1px #aaa; - border-bottom: solid 1px #aaa; -} - -div#logo { - margin: 0px; - padding: 4px 0px 4px 0px; - text-align: center; - background-color: #ccc; - border-top: solid 1px #eee; - border-left: solid 1px #eee; - border-right: solid 1px #aaa; - border-bottom: solid 1px #aaa; -} - -td#sidebar h1 { - font-size: 10pt; - font-weight: bold; - margin: 8px 0px 0px 0px; -} - -td#sidebar h1.first { - margin-top: 0px; -} - -td#sidebar a.menu { - display: block; - background-color: #ccc; - padding: 0.1em 0.5em; - text-decoration: none; -} - -td#sidebar a.menu:hover { - background-color: #bbb; - text-decoration: none; -} - -td#sidebar select { - width: 100%; - margin: 2px 0px 0px 0px; -} - -td#sidebar form { - text-align: right; -} - input#switch-btn { margin: 2px 0px 0px 0px; } @@ -357,7 +316,7 @@ table.diff td { table.diff td div.head { font-weight: bold; margin-top: 1em; - background-color: #eee; + color: black; } table.diff td div.hunk { diff --git a/cgit.png b/cgit.png index 22f7e954354eca7d22057aa53fef49cc568932b6..d7f70bc45593279bd88856b0fc318031660019a7 100644 GIT binary patch delta 1814 zcmV+x2kH2pDzFYNiBL{Q4GJ0x0000DNk~Le0001B0000$2nGNE0Od4t4gdfE0drDE zLIAGL9O;oEFn`zt2@?|rEZrm~0000PbVXQnLvL+uWo~o;Lvm$dbY)~9cWHEJAV*0} zP*;Ht7XSbTi%CR5RCwC$TU$&MSs4D>PU(fxmX@WE;4L7i$St5t3B(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Dg-$+N#fq zFDcX>Yd?3nDm)v9><^Bx<(;~!BjV(=@bT6JJy=3}ugN8o(oVTM#{;fojd)nqYZ@_;bFycaH9-~wTh_CmTqy#H!k zg=2ZIH+YyRqiRA6XY>G2tU_^lJm&f$7yI%GJ-*eCoc1zL@iRxc9p#l@iB2pksH{vT zClNg=a%67X51Cp{t)euv=JUY39cd-mx~Y5PwwlpsjjQr-}J=yfFNP) z?X}l`;!cDtqM9|tAlTo-b{92wHR@egU(np0Ap5)Z{^+Qie#rIIRSqobgccyQY@fuU zHfqI%T`A>Z|NnSB8loMZKV0r826YRs9*z}}1(=@;q!Tf2c@HncJKI41JbLu#gXIo= zS8MEgK=OO1?V^D&7Igi4ecYjeXjGL1Ko;BQMQ<;q&t z(&gpl>+P0Tmz?Xk3WB_jPEXCU|AII|&l@0^s$Ck>!O%@?ZN+W!4Ial#>V+Em$kB}K z5wmMy+xnSp#UF~;=tDQ@cyh1ZM$q)ItVx^OU<)meO(KL zFc8IdM(PObqWC7jVbU5V{Hm#1mWfWT_0SM;hkQ>eupTIjOV_T^07o%v4f~vu4omb< zkeX2x72(sTPZyM3X7baePj~~!?5uEdibeMVOFOr?__pO1XL;%MKaeECO`Y>(iqnrk zDKp?q1uiaL?20xXtZsa)NFGt(d8u#I^W{3?UL$2@k=dk@)jMP|xg|W5P)AbL39OAZ4|VbV?2>@fu31pshkh~ zL}2_uiZOB;KBDV;@KXU)@iqQQQW}VU3;N)|45+%ZvolCAKmP-)zf|R7m>d4oDCs<8 diff --git a/ui-shared.c b/ui-shared.c index aa65988..7287956 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -7,6 +7,7 @@ */ #include "cgit.h" +#include "cmd.h" #include "html.h" const char cgit_doctype[] = @@ -465,97 +466,59 @@ void add_hidden_formfields(int incl_head, int incl_search, char *page) } } +char *hc(struct cgit_cmd *cmd, const char *page) +{ + return (strcmp(cmd->name, page) ? NULL : "active"); +} + void cgit_print_pageheader(struct cgit_context *ctx) { - static const char *default_info = "This is cgit, a fast webinterface for git repositories"; - int header = 0; - char *url; + struct cgit_cmd *cmd = cgit_get_cmd(ctx); - html("\n"); - html("\n"); - - html("
\n"); + html("
\n"); + html("

"); } void cgit_print_filemode(unsigned short mode)