Too much new stuff to remember.

This commit is contained in:
Niels Serup
2011-07-07 00:13:47 +02:00
parent b88e85264f
commit 7085c71feb
10 changed files with 207 additions and 23 deletions

View File

@@ -1 +1,44 @@
#
function get_window_size() {
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];
else if (document.body)
return [document.body.clientHeight, document.body.clientWidth];
}
function is_screen_media() {
return (document.getElementsByTagName('link')[0].getAttribute('media').indexOf(
'screen') != -1 || (document.styleSheets &&
(document.styleSheets[0].media.mediaText.indexOf(
'screen') != -1 || document.styleSheets[0].media.indexOf(
'screen') != -1)));
}
function set_min_height() {
if (!is_screen_media())
return;
var ws, wh, ww, h
ws = get_window_size()
wh = ws[0]
ww = ws[1]
h = metadiv.offsetHeight + 15
metadiv.style.position = 'absolute'
metadiv.style.bottom = '5px'
metadiv.style.width = (bodydiv.offsetWidth - 22) + 'px'
bodydiv.style.paddingBottom = h + 'px'
h = wh - h - menudiv.offsetHeight - 145
bodydiv.style.minHeight = h + 'px'
}
window.addEventListener('load', function(event){
menudiv = document.getElementById('menu');
bodydiv = document.getElementById('body');
metadiv = document.getElementById('metadata');
set_min_height();
}, false);

0
prestatic/handheld.css Normal file
View File

0
prestatic/print.css Normal file
View File

View File

@@ -19,13 +19,11 @@ print(' background-color: ' + page_bg + ';')
#minilogo {
color: #008000;
position: absolute;
top: 3px;
right: 4px;
font-family: Inconsolata, 'Dejavu Sans Mono', Consolas, 'Lucida Console',
Monaco, mono;
font-size: 20px;
background-color: #39ffff;
padding: 3px;
top: 0;
right: 0;
width: 20px;
height: 126px;
background: url('/static/metanohi-minilogo.png') no-repeat center;
}
#menu {
@@ -66,10 +64,14 @@ print(' background-color: ' + page_bg + ';')
}
#body {
width: 750px;
width: 720px;
margin: 0 auto;
padding: 5px;
background-color: #e3e3e3;
background-color: #e9e9e9;
border-color: #ddd;
border-style: solid;
border-width: 3px 1px;
position: relative;
}
#body.full {
@@ -78,7 +80,7 @@ print(' background-color: ' + page_bg + ';')
}
#metadata {
margin-top: 8px;
margin-top: 10px;
border-style: dashed;
border-color: #ccc;
border-width: 4px 0 0 0;

View File

@@ -17,6 +17,15 @@ print(page.title, end='')--></title>
<meta name='keywords'
content='programming, hacking, nqpz, portfolio' />
<meta name='generator' content='{generator}' />
<link rel='stylesheet' type='text/css' media='screen, tv'
href='/static/screen.css' />
<link rel='stylesheet' type='text/css' media='print'
href='/static/print.css' />
<link rel='stylesheet' type='text/css' media='tty'
href='/static/tty.css' />
<link rel='stylesheet' type='text/css' media='handheld'
href='/static/handheld.css' />
<link href='/atom.xml' type='application/atom+xml' rel='alternate' title='metanohi atom feed' />
<link rel='schema.DCTERMS' href='http://purl.org/dc/terms/' />
<meta name='DCTERMS.title' content='{title}' />
<meta name='DCTERMS.description' content='{description}' />
@@ -37,18 +46,15 @@ if page.licenses:
<meta name='DCTERMS.license' content='{x.url}' />""").format(x=x)-->
<meta name='robots' content='ALL' />
<link rel='icon' type='image/png' href='/favicon.png' />
<link rel='stylesheet' type='text/css' media='screen, tv'
href='/static/screen.css' />
<link rel='stylesheet' type='text/css' media='print'
href='/static/print.css' />
<link rel='stylesheet' type='text/css' media='tty'
href='/static/tty.css' />
<link rel='stylesheet' type='text/css' media='handheld'
href='/static/handheld.css' />
<!--
The following JavaScript file contains trivial code. This website requires
it for aesthetic reasons only. Not loading it will not make this website
less functional.
-->
<script type='text/javascript' src='/static/basics.js'></script>
</head>
<body>
<a id='minilogo' href='/'>metanohi</a>
<a id='minilogo' href='/'></a>
<div id='menu'>
<ul id='menulinks'>
<!--@preval
@@ -56,7 +62,7 @@ for x in('projects', 'writings', 'films', 'about'):
print(' ' * 14 + "<li><a href='/{x}/'>{x}</a></li>".format(x=x))-->
</ul>
</div>
<div id='body'<!--@eval if page.full: print(" class='full'", end='')-->>
<div id='body'<!--@eval if page.fullpage: print(" class='full'", end='')-->>
<!--@eval print(page.body)-->
<div id='metadata'>
<!--@eval print(page.metadata_info)-->

0
prestatic/tty.css Normal file
View File