Start page acceptable.

This commit is contained in:
Niels Serup
2011-07-14 22:28:37 +02:00
parent 4549d035b8
commit 6f4c996774
7 changed files with 185 additions and 79 deletions

View File

@@ -10,14 +10,15 @@
*/
add_external_document_writing_script = function(url, elem) {
document.orig_write = document.write
var content = ''
var orig_write, content, done;
orig_write = document.write;
content = ''
document.write = function(msg) {
content += msg + '\n';
}
var done = function() {
document.write = document.orig_write;
done = function() {
document.write = orig_write;
elem.innerHTML = content;
}
@@ -27,7 +28,7 @@ add_external_document_writing_script = function(url, elem) {
ns.onload = function() {
done();
}
ns.onreadystatechange= function() {
ns.onreadystatechange = function() {
if (this.readyState == 'complete')
done();
}
@@ -37,6 +38,7 @@ add_external_document_writing_script = function(url, elem) {
add_fsf_widget = function(associate_id) {
fsf_widget_size = 'normal';
fsf_associate_id = associate_id + '';
add_external_script('http://www.fsf.org/graphics/widget/global/widget.js',
document.getElementById('fsfextern'));
add_external_document_writing_script(
'http://www.fsf.org/graphics/widget/global/widget.js',
document.getElementById('fsfextern'));
};

View File

@@ -74,6 +74,14 @@ body {
width: auto;
}
#body ul, #body ol {
margin-left: 15px;
}
#body li {
list-style: square outside none;
}
#metadata {
margin-top: 10px;
border-style: dashed;
@@ -84,9 +92,9 @@ body {
color: #fff;
}
#metadata li {
display: inline;
list-style: none;
#metadata table, #metadata td, #metadata th {
border: None;
margin: 0;
}
#logo {
@@ -105,6 +113,43 @@ body {
" url('/static/metanohi-logo.png') no-repeat center;\n"@*/
}
#toc {
background-color: #ddd;
border: 2px dotted #aaa;
display: inline-block;
padding: 4px 9px;
margin: 2px 0 10px 4px;
}
#toc ul {
}
#toc li.level1 {
margin-left: 0;
}
#toc li.level2 {
margin-left: 10px;
}
#toc li.level3 {
margin-left: 19px;
}
#toc li.level4 {
margin-left: 27px;
}
#toc li.level5 {
margin-left: 34px;
}
#toc li.level6 {
margin-left: 40px;
}
a {
text-decoration: none;
}
@@ -123,30 +168,73 @@ h1, h2, h3, h4, h5, h6 {
}
h1 {
margin-top: 10px;
font-size: 26px;
}
h1:first-child {
margin-top: 0;
}
h2 {
margin-top: 9px;
font-size: 22px;
}
h3 {
font-size: 18px;
margin-top: 6px;
font-size: 19px;
}
h4 {
margin-top: 5px;
font-size: 16px;
font-weight: bold;
}
h5 {
margin-top: 3px;
font-size: 14px;
font-weight: bold;
}
h6 {
margin-top: 2px;
font-size: 12px;
font-weight: bold;
}
p {
text-align: justify;
margin-bottom: 5px;
}
img {
border: none;
}
table {
margin: 0 auto;
border-collapse: collapse;
}
table, td, th {
border: 1px solid black;
}
td, th {
margin: 0 5px;
padding: 1px 3px;
}
.strong {
font-weight: bold;
}
.emph {
font-style: italic;
}
.center-align {
text-align: center;
}
@@ -170,3 +258,11 @@ h6 {
.left-float {
float: left;
}
.textbanner {
background-color: red;
font-size: 20px;
display: inline-block;
padding: 2px 5px;
margin: 3px;
}

View File

@@ -1,4 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<!--@exec
page.title = html_escape_transform(run_macros(page.title))
page.summary = html_escape_transform(run_macros(page.summary))
@--><?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN'
'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>
<html version='-//W3C//DTD XHTML 1.1//EN'
@@ -15,7 +18,7 @@
projects of varying importance.' />
<meta name='keywords'
content='programming, hacking, nqpz, portfolio' />
<meta name='generator' content='{generator}' />
<meta name='generator' content='http://metanohi.org/projects/mege/' />
<link rel='stylesheet' type='text/css' media='screen, tv'
href='/static/screen.css' />
<link rel='stylesheet' type='text/css' media='print'
@@ -24,16 +27,15 @@
href='/static/tty.css' />
<link rel='stylesheet' type='text/css' media='handheld'
href='/static/handheld.css' />
<link rel='stylesheet' type='text/css' media='handheld, screen and
(max-width: 500px)' href='/static/handheld.css' />
<link href='/atom.xml' type='application/atom+xml' rel='alternate' title='metanohi atom feed' />
<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}' />
<meta name='DCTERMS.title' content='<!--@eval page.title@-->' />
<meta name='DCTERMS.description' content='<!--@eval page.summary@-->' />
<meta name='DCTERMS.creator' content='Niels Serup' />
<meta name='DCTERMS.format' content='application/xhtml+xml' />
<meta name='DCTERMS.created' content='{created}' />
<meta name='DCTERMS.modified' content='{modified}' />
<meta name='DCTERMS.created' content='<!--@eval page.created@-->' />
<meta name='DCTERMS.modified' content='<!--@eval page.modified@-->' />
<meta name='DCTERMS.language' content='en' />
<meta name='DCTERMS.isPartOf' content='http://metanohi.org/' />
<meta name='DCTERMS.isVersionOf' content='<!--@eval page.core_url@-->' />
@@ -59,7 +61,7 @@ if page.licenses:
working.
-->
<script type='text/javascript' src='/static/extra.js'></script>
<!--@eval page.head@-->
<!--@eval run_macros(page.head)@-->
</head>
<body>
<a id='minilogo' href='/'></a>
@@ -71,10 +73,10 @@ for x in('projects', 'writings', 'films', 'about'):
</ul>
</div>
<div id='body'<!--@exec if page.is_fullpage: print(" class='full'", end='')@-->>
<!--@eval page.toc_html if page.has_toc else ''@-->
<!--@eval "<div id='toc'><h3>Contents</h3>" + page.toc_html + '</div><br />' if page.has_toc else ''@-->
<!--@eval run_macros(page.body)@-->
<div id='metadata'>
<!--@eval page.metadata_html@-->
<!--@eval run_macros(page.metadata_html)@-->
</div>
</div>
<div id='logo'>