Fixed The Very Old CSS Problem of the black bar in the bottom not fully

reaching the right side of the screen on pages where id='content' =>
class='full'.

Added useful text. Changed other text.
This commit is contained in:
Niels Serup
2012-06-27 19:46:13 +02:00
parent bd017a99e5
commit cd9c2221ad
11 changed files with 198 additions and 110 deletions

View File

@@ -1,59 +1,66 @@
/*
To the extent possible under law, Niels Serup has waived all copyright and
related or neighboring rights to this file. This file is available under the
Creative Commons Zero 1.0 license, see
http://creativecommons.org/publicdomain/zero/1.0/
To the extent possible under law, Niels Serup has waived all copyright and
related or neighboring rights to this file. This file is available under the
Creative Commons Zero 1.0 license, see
http://creativecommons.org/publicdomain/zero/1.0/
This JavaScript file contains trivial code. It is required for aesthetic
reasons only. Not loading it will not make a website depending on it less
functional.
*/
This JavaScript file contains trivial code. It is required for aesthetic
reasons only. Not loading it will not make a website depending on it less
functional.
*/
get_window_size = function() {
if (window.innerHeight)
return [window.innerHeight, window.innerWidth];
else if (self.innerHeight)
return [self.innerHeight, self.innerWidth];
if (window.innerHeight)
return [window.innerHeight, window.innerWidth];
else if (self.innerHeight)
return [self.innerHeight, self.innerWidth];
else if (document.documentElement && document.documentElement.clientHeight)
return [document.documentElement.clientHeight,
document.documentElement.clientWidth];
return [document.documentElement.clientHeight,
document.documentElement.clientWidth];
else if (document.body)
return [document.body.clientHeight, document.body.clientWidth];
return [document.body.clientHeight, document.body.clientWidth];
};
is_screen_media = function() {
return (document.getElementsByTagName('link')[1].getAttribute('media').indexOf(
'screen') != -1 || (document.styleSheets &&
(document.styleSheets[0].media.mediaText.indexOf(
'screen') != -1 || document.styleSheets[0].media.indexOf(
'screen') != -1)));
return (document.getElementsByTagName('link')[1].getAttribute('media').indexOf(
'screen') != -1 || (document.styleSheets &&
(document.styleSheets[0].media.mediaText.indexOf(
'screen') != -1 || document.styleSheets[0].media.indexOf(
'screen') != -1)));
};
set_min_height = function() {
var ws, wh, ww, h;
ws = get_window_size();
wh = ws[0];
ww = ws[1];
var ws, wh, ww, h;
ws = get_window_size();
wh = ws[0];
ww = ws[1];
if (metadiv.offsetTop > wh)
return;
h = metadiv.offsetHeight + 25;
metadiv.style.position = 'absolute';
metadiv.style.bottom = '5px';
metadiv.style.width = (contentdiv.offsetWidth - 42) + 'px';
contentdiv.style.paddingBottom = h + 'px';
h = metadiv.offsetHeight + 25;
metadiv.style.position = 'absolute';
metadiv.style.bottom = '5px';
metadiv.style.width = (contentdiv.offsetWidth - 42) + 'px';
contentdiv.style.paddingBottom = h + 'px';
h = wh - h - menudiv.offsetHeight - 165;
contentdiv.style.minHeight = h + 'px';
h = wh - h - menudiv.offsetHeight - 146;
contentdiv.style.minHeight = h + 'px';
};
adjust_sizes = function() {
if (!is_screen_media())
return;
set_min_height();
set_min_height();
};
window.addEventListener('load', function(event){
menudiv = document.getElementById('menu');
contentdiv = document.getElementById('content');
metadiv = document.getElementById('metadata');
adjust_sizes();
}, false);
if (!is_screen_media())
return;
menudiv = document.getElementById('menu');
contentdiv = document.getElementById('content');
metadiv = document.getElementById('metadata');
window.addEventListener('resize', function(event){
adjust_sizes();
}, false);
adjust_sizes();
}, false);

View File

@@ -6,7 +6,6 @@
body {
font-family: 'Dejavu Sans', 'Nimbus Sans', Helvetica, Arial, Verdana, sans-serif;
font-size: 14px;
color: #000;
}
@@ -85,7 +84,7 @@ h1, h2, h3, h4, h5, h6 {
h1 {
margin: 16px 0 5px 0;
font-size: 30px;
font-size: 2em;
}
h1:first-child {
@@ -94,30 +93,30 @@ h1:first-child {
h2 {
margin: 14px 0 5px 0 ;
font-size: 25px;
font-size: 1.8em;
background-color: #ddd;
}
h3 {
margin: 9px 0 3px 0;
font-size: 21px;
font-size: 1.6em;
}
h4 {
margin: 7px 0 2px 0;
font-size: 18px;
font-size: 1.4em;
font-weight: bold;
}
h5 {
margin: 5px 0 1px 0;
font-size: 16px;
font-size: 1.2em;
font-weight: bold;
}
h6 {
margin: 3px 0 1px 0;
font-size: 14px;
font-size: 1.1em;
font-weight: bold;
}
@@ -183,7 +182,7 @@ cite, quote {
blockquote {
margin: 5px 0 5px 20px;
font-size: 15px;
font-size: 1.08em;
}
acronym, abbreviation {
@@ -396,23 +395,23 @@ div.left-float, img.left-float, video.left-float, audio.left-float {
}
.huge, .huge * {
font-size: 25px !important;
font-size: 1.8em !important;
}
.large, .large * {
font-size: 18px !important;
font-size: 1.5em !important;
}
.medium, .medium * {
font-size: 14px !important;
font-size: 1em !important;
}
.small, .small * {
font-size: 11px !important;
font-size: 0.8em !important;
}
.tiny, .tiny * {
font-size: 9px !important;
font-size: 0.65em !important;
}

View File

@@ -32,7 +32,7 @@ body {
/*@preval 'background-color: ' + page_bg + ';\n'@*/
display: inline-block;
padding: 2px 0 2px 16px;
font-size: 18px;
font-size: 1.3em;
}
ul#menulinks {
@@ -100,7 +100,10 @@ ul#menulinks {
}
#body.full #logo {
position: relative;
left: 10px;
margin-left: -10px;
margin-right: -10px;
}
.highlighttable .code {