From 7085c71feb129780e9a2792d2e24698329edda88 Mon Sep 17 00:00:00 2001 From: Niels Serup Date: Thu, 7 Jul 2011 00:13:47 +0200 Subject: [PATCH] Too much new stuff to remember. --- prestatic/basics.js | 45 ++++++++++++- prestatic/handheld.css | 0 prestatic/print.css | 0 prestatic/screen.css | 22 ++++--- prestatic/template.html | 26 +++++--- prestatic/tty.css | 0 rules.mege | 9 +++ site/index.org | 4 +- static/metanohi-minilogo.png | Bin 0 -> 1789 bytes static/metanohi-minilogo.svg | 124 +++++++++++++++++++++++++++++++++++ 10 files changed, 207 insertions(+), 23 deletions(-) create mode 100644 prestatic/handheld.css create mode 100644 prestatic/print.css create mode 100644 prestatic/tty.css create mode 100644 static/metanohi-minilogo.png create mode 100644 static/metanohi-minilogo.svg 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 0000000000000000000000000000000000000000..51a41d6aab025f58d41f39a9fe49e92041069dab GIT binary patch literal 1789 zcmVkxbpQYW8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H126{q9GB3fQkqh6A)!{ z0TLJVL2!X6hDGb#SztuSpdylBL=B24iVO(^5kUwdni|0%zK7`uDvRugfq;g`tms*aVFbcJg#H1x zxw=zcrhp|$xy>Ggla$arDZtqXrx98t1=tV4!SF;ffaz17h42SLr`-84MR$ZNeXWSA z5SAkx#xRx?Hw4ZVR=aGoGZycK@L}SBbr1>@ux00r9O{tb8idXW^&$*^X`hmlW5=@V`QY6LzG$li4?i8Zn)EtqoYA7hmNOC5vsq33_qTt!rWc9<=wc zXXe6iS7b0luk1r9qk*!rgK&sqT1Qw}8-znu@-l{dt-+lb`sA>(L7rlDUv}sTb3Ea+ z4B>GMeGo1~XosP%x|z4S{SM(1FJOIyk7Ka(_gb_D&{sNr{*nXGDTGq1;teKPg!8qQ znTha)62}=`%?HXZSI4do5ek?_-Mmu(LLrlBgwQw#Tkgl$-4R~XQ#%tYje6?A(|PA* zeYB|o6DpPVbFoU799n5Mb3ry^7)BWl;x>;XEU<<7cca2b8NgyLP6F^f1>B!Z1O6|; zo{E~Ff&eekxO6ZKN~Bmqn4+uvky0+qA23}{&sNY42o3Wt=MW0CpL4W#yFKn6-ed_8 z>phWj7-36P5u<<7HFm;)CA19bFr%1%H_9X~Kp2YQX@nw#$vN6j*{7Tany)2E-h9{u zVS6Hb=#%94A(SHwMYtQ`QypJ~a2$*82xSYQ>;m+6!CqgY!bVV3SitAl5I5EkT zS=7cbfalrZ&)8F_r+rD&9JgVJKKk*Xw&I>JpA6WBHGz_8Ou$Ey2D~+Cz^QgD8-y7c z#vQNZ#XGukPH-!()JBK+lFIiy9Mo!UsBiJ3kR`i34t z0fzfCX){F^l@R*r-ad$76o#=F#_QjGRf7y{Z~I3*lyJE(alo_^T!An;QH7Hf9aN|o zj^R;+&XEDN@0;LZV%H>q9L8vSSEXq0q|_ed8WOVK$1?<>kJlC9&ny;Bi)`hVHX{MW z>0V84N9`nKSO2AUpMtP5^pVs0<5@fOdRt)AeI6?mQ0MHl0n0Ms<9S&a0dTJ0yU|4f zldA_bjJE-o=*5e%0fkp=z)3Fuz8#k z>pY@bY>A+whYRxteAybHQ;Doepe;v+{~y3VYRS3l5v|Nu1H$@Dz*kTY0Wo8qvw_gw%!F? zpkUwFZ)5ZM20fo{ZMi{q00000NkvXXu0mjfE>tpu literal 0 HcmV?d00001 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 + + + + + + + + + + + + + + +