Various styling improvements

This commit is contained in:
Yorhel 2012-07-18 11:01:17 +02:00
parent 086615eb71
commit 4fd6da6e4e
3 changed files with 19 additions and 16 deletions

View file

@ -40,7 +40,7 @@ TUWF::set(
my $title = 'No manual entry for '.$self->reqPath;
$self->htmlHeader(title => $title);
h1 $title;
txt 'That is, the page you were looking for doesn\'t exist.';
p 'That is, the page you were looking for doesn\'t exist.';
$self->htmlFooter;
},
);
@ -67,7 +67,7 @@ sub home {
my $fn = sub { local $_=shift; 1 while(s/(\d)(\d{3})($|,)/$1,$2/); $_ };
$self->htmlHeader(title => 'Man Pages Archive');
h1 'Man Pages Archive';
p style => 'float: none'; lit sprintf <<' _', map $fn->($stats->{$_}), qw|hashes mans files packages|;
p; lit sprintf <<' _', map $fn->($stats->{$_}), qw|hashes mans files packages|;
Indexing <b>%s</b> versions of <b>%s</b> manual pages found in <b>%s</b>
files of <b>%s</b> packages.
<br /><br />
@ -230,7 +230,7 @@ sub browsesearch {
$self->htmlHeader(title => 'Search results for '.$q);
h1 'Search results for '.$q;
txt 'Note: This is just a simple case-insensitive prefix match on the man names. In the future we\'ll have more powerful search functionality. Hopefully.';
p 'Note: This is just a simple case-insensitive prefix match on the man names. In the future we\'ll have more powerful search functionality. Hopefully.';
if(@$man) {
ul id => 'searchres';
for(@$man) {

View file

@ -9,8 +9,7 @@ body { margin: 10px auto 50px auto; max-width: 1250px; border-collapse: separate
-webkit-border-radius: 10px; -moz-border-radius: 10px;
-webkit-box-shadow: 0 10px 10px #def; -moz-box-shadow: 0 10px 10px #def; box-shadow: 0 10px 10px #def; }
h1 { font-size: 24px; font-weight: normal; color: #abc; }
h1 + p { float: right; }
h1 a { font-size: 10px; vertical-align: top }
h1 a { font-size: 12px; padding-left: 5px; vertical-align: top }
h2 { font-size: 21px; margin-top: 40px; color: #468; font-weight: normal; clear: left }
h2 + i { font-size: 12px; }
dd { margin-left: 15px; }
@ -43,11 +42,13 @@ td { padding: 1px 5px; font-size: 12px; border-left: 1px solid #ccc; }
#nav { background: #f0f8ff; color: #036; float: right; padding: 8px; width: 250px; margin-bottom: 10px;
-webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px; }
#nav a.global, #nav i.global { float: right; font-family: "Verdana"; font-size: 13px; padding: 3px 5px; }
#nav a.global, #nav i.global { float: right; font-family: "Verdana"; font-size: 13px; padding: 0px 5px; }
#nav i.global { font-style: normal; color: #aaa }
#nav dl { clear: right }
#nav dl > dt { font-weight: bold; }
#nav a { font-size: 13px; }
#nav dd dt a { text-decoration: none; }
#nav .expand { text-decoration: none; padding-left: 5px; font-size: 16px }
#nav dd .expand { font-size: 14px }
#nav dl i { font-style: normal; font-size: 12px; padding-left: 7px; color: #aaa }
#nav b { font-size: 13px; background: #cde; padding: 3px 5px;
-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; }
@ -60,6 +61,7 @@ td { padding: 1px 5px; font-size: 12px; border-left: 1px solid #ccc; }
#systems b { font-size: 24px; display: block }
#systems .hidden { display: none; }
#charselect { float: right }
#charselect b { padding: 3px }
.pagination { display: block; margin: 10px; width: 100%; text-align: center }

View file

@ -355,15 +355,16 @@ function navCreate(nav) {
pkgnum++;
if(!isold || sys[4])
dl.appendChild(tag('dt',
dl.appendChild(tag('dt', sys[1],
isold || !VARS.mans[i+1] || VARS.mans[i+1][0] != sys[0] ? null : tag('a',
{href:'#', _sysn: sys[0], _sysi:i, onclick: function() {
{href:'#', _sysn: sys[0], _sysi:i, 'class':'expand',
title: "Show/hide historical releases.",
onclick: function() {
for(var j=this._sysi+1; j<VARS.mans.length && VARS.mans[j][0] == this._sysn; j++)
VARS.mans[j][4] = !VARS.mans[j][4];
navCreate(nav);
return false
}}, VARS.mans[i+1][4] ? expanded_icon : collapsed_icon),
sys[1]
}}, VARS.mans[i+1][4] ? expanded_icon : collapsed_icon)
));
if(sys[4] && pkgnum > 0)
@ -398,15 +399,17 @@ function navCreatePkg(nav, dd, sys, n) {
}
if(mannum > 0) {
dd.appendChild(tag('dt',
dd.appendChild(tag('dt', tag('a', {href:'/browse/'+sys[2]+'/'+pkg[0]+'/'+pkg[1]}, pkg[0]),
isold || !sys[3][n+1] || sys[3][n+1][0] != pkg[0] ? null : tag('a',
{href:'#', _pkgn: pkg[0], _pkgi:n, onclick: function() {
{href:'#', _pkgn: pkg[0], _pkgi:n, 'class':'expand',
title: 'Show/hide historical versions of this package',
onclick: function() {
for(var j=this._pkgi+1; j<sys[3].length && sys[3][j][0] == this._pkgn; j++)
sys[3][j][3] = !sys[3][j][3];
navCreate(nav);
return false
}}, sys[3][n+1][3] ? expanded_icon : collapsed_icon),
tag('a', {href:'/browse/'+sys[2]+'/'+pkg[0]+'/'+pkg[1]}, pkg[0]), tag('i', pkg[1])));
tag('i', pkg[1])));
dd.appendChild(pdd);
return true;
}
@ -415,8 +418,6 @@ function navCreatePkg(nav, dd, sys, n) {
function navCreateLinks(nav) {
nav.appendChild(tag('a', {'class':'global',href:'#',onclick: function() { alert("Not implemented yet."); return false }}, collapsed_icon + 'pkg'));
var t = (navShowLocales ? expanded_icon : collapsed_icon) + 'locales';
nav.appendChild(!navHasLocale ? tag('i', {'class':'global'}, t) : tag('a',
{ 'class': 'global',