diff --git a/prestatic/basics.js b/prestatic/basics.js index 1e0ca6a..7670617 100644 --- a/prestatic/basics.js +++ b/prestatic/basics.js @@ -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); diff --git a/prestatic/handheld.css b/prestatic/handheld.css new file mode 100644 index 0000000..e69de29 diff --git a/prestatic/print.css b/prestatic/print.css new file mode 100644 index 0000000..e69de29 diff --git a/prestatic/screen.css b/prestatic/screen.css index d344a44..4585b05 100644 --- a/prestatic/screen.css +++ b/prestatic/screen.css @@ -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; diff --git a/prestatic/template.html b/prestatic/template.html index 6956b57..79ad179 100644 --- a/prestatic/template.html +++ b/prestatic/template.html @@ -17,6 +17,15 @@ print(page.title, end='')--> + + + + + @@ -37,18 +46,15 @@ if page.licenses: """).format(x=x)--> - - - - + - + -
> +
>
diff --git a/prestatic/tty.css b/prestatic/tty.css new file mode 100644 index 0000000..e69de29 diff --git a/rules.mege b/rules.mege index 9867c8c..e70afdb 100644 --- a/rules.mege +++ b/rules.mege @@ -1,4 +1,13 @@ wsgi nohi.wsgi + +title metanohi +url http://metanohi.org/ +description 'This feed contains the newest pages on metanohi +author Niels\ Serup +email ns@metanohi.org +aboutauthorurl http://metanohi.org/about/niels/ +feeditems 40 + template template.html # Convert the static parts of HTML, CSS, and JS files diff --git a/site/index.org b/site/index.org index 1487366..2f0f6fc 100644 --- a/site/index.org +++ b/site/index.org @@ -1,4 +1,4 @@ -#+TITLE: Start +#+title: Home -* Hej! +* This is metanohi diff --git a/static/metanohi-minilogo.png b/static/metanohi-minilogo.png new file mode 100644 index 0000000..51a41d6 Binary files /dev/null and b/static/metanohi-minilogo.png differ diff --git a/static/metanohi-minilogo.svg b/static/metanohi-minilogo.svg new file mode 100644 index 0000000..38c7adb --- /dev/null +++ b/static/metanohi-minilogo.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + +