From bf650c2d353cf9f24a8e1970d62d3cb88e08d0b9 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Fri, 8 Apr 2011 15:10:26 +0200 Subject: [PATCH] Added donate button While I generally hate begging for money, I am kind of interested whether there exist people who actually feel like donating. It's a mistery to me how I managed to get the button nicely positioned like that, but it seems to work in FF, Opera and Midori, so I guess it's not a problem... --- index.cgi | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/index.cgi b/index.cgi index 01b2cb0..727c360 100755 --- a/index.cgi +++ b/index.cgi @@ -576,27 +576,34 @@ sub htmlHeader { a href => '/demo', $o{page} eq 'demo' ? (class => 'sel') : (), 'demos'; txt ' '; a href => '/dump', $o{page} eq 'dump' ? (class => 'sel') : (), 'code dump'; end; - if($o{page} eq 'ncdu') { - div id => 'mtabs'; + div id => 'donate'; + lit q{ +
+ + + + +
+ }; + end; + div id => 'mtabs'; + if($o{page} eq 'ncdu') { a href => '/ncdu', !$o{tab} ? (class => 'sel') : (), 'main'; txt ' '; a href => '/ncdu/changes', $o{tab} eq 'changes' ? (class => 'sel') : (), 'changelog'; txt ' '; a href => '/ncdu/man', $o{tab} eq 'man' ? (class => 'sel') : (), 'manual'; txt ' '; a href => 'http://sourceforge.net/tracker/?group_id=200175', 'bug tracker (sf)'; - end; - } - if($o{page} eq 'tuwf') { - div id => 'mtabs'; + } + if($o{page} eq 'tuwf') { a href => '/tuwf', !$o{tab} ? (class => 'sel') : (), 'main'; txt ' '; a href => '/tuwf/man', $o{tab} eq 'man' ? (class => 'sel') : (), 'manual'; txt ' '; - end; - } - if($o{page} eq 'dump') { - div id => 'mtabs'; + } + if($o{page} eq 'dump') { a href => '/dump', !$o{tab} ? (class => 'sel') : (), 'misc'; txt ' '; a href => '/dump/awshrink', $o{tab} eq 'awshrink' ? (class => 'sel') : (), 'awshrink'; txt ' '; a href => '/dump/grenamr', $o{tab} eq 'grenamr' ? (class => 'sel') : (), 'grenamr'; - end; - } + } + end; div id => 'main'; h1 $o{title}; } @@ -682,7 +689,8 @@ sub css { #menu a { line-height: 25px; padding: 5px 8px; margin: 0 2px; color: #ccc; } #menu a:hover, #menu a.sel { background-color: #222; text-decoration: none } #main { margin: 30px auto 5px auto; background-color: #000; width: 700px; border: 2px solid #666; text-align: left; padding: 5px 10px 10px 10px } - #mtabs { margin: 30px 0 -28px 0; } + #donate { margin: 10px 640px -53px 0; } + #mtabs { margin: 30px 0 -28px 0; height: 18px } #mtabs a { background-color: #222; color: #ccc; font-size: 13px; margin: 0 2px; padding: 0 10px 3px 10px; border: 1px solid #666; border-bottom: 2px solid #666 } #mtabs a:hover { background-color: #000; text-decoration: none } #mtabs a.sel { border-bottom: 2px solid #000; background-color: #000; }