From 70d45d411922870769b5e990b09b07728214f83c Mon Sep 17 00:00:00 2001 From: Niels Serup Date: Sun, 17 Jul 2011 00:34:50 +0200 Subject: [PATCH] As mege is getting better, so is metanohi. --- .gitignore | 2 +- macros/__init__.py | 1 + macros/__init__.pyc | Bin 0 -> 146 bytes macros/macros.py | 4 + macros/macros.pyc | Bin 0 -> 264 bytes msgsite/listdir.org | 5 + {sitespecial => msgsite}/notfound.org | 0 {sitespecial => msgsite}/servererror.org | 0 {sitespecial => msgsite}/showrevs.org | 0 nohi.wsgi | 3 +- prestatic/extra.js | 10 +- prestatic/screen.css | 163 ++++++++++++++++++++--- prestatic/template.html | 3 + site/about/index.org | 4 + site/films/index.org | 4 + site/index.org | 3 + site/projects/mege/test/basics.org | 25 ++-- site/projects/mege/test/index.org | 17 +++ site/projects/mege/test/test0.png | Bin 0 -> 78909 bytes sitespecial/listdir.org | 6 - 20 files changed, 211 insertions(+), 39 deletions(-) create mode 100755 macros/__init__.py create mode 100644 macros/__init__.pyc create mode 100755 macros/macros.py create mode 100644 macros/macros.pyc create mode 100644 msgsite/listdir.org rename {sitespecial => msgsite}/notfound.org (100%) rename {sitespecial => msgsite}/servererror.org (100%) rename {sitespecial => msgsite}/showrevs.org (100%) create mode 100644 site/projects/mege/test/index.org create mode 100644 site/projects/mege/test/test0.png delete mode 100644 sitespecial/listdir.org diff --git a/.gitignore b/.gitignore index 3304550..a83bc67 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,6 @@ /extra/atom.xml log.mege .finallog.mege -/mege/ apache-config .debug +/mege/ diff --git a/macros/__init__.py b/macros/__init__.py new file mode 100755 index 0000000..c4c64ff --- /dev/null +++ b/macros/__init__.py @@ -0,0 +1 @@ +from .macros import * diff --git a/macros/__init__.pyc b/macros/__init__.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8d818c865038c3a718362b3f284ef55ae8239e29 GIT binary patch literal 146 zcmeb0;pGahSM*C}KmtrawgV6s^8twzAYx?5VPFVJVPXi@U}hA1F|ks(-v2`G{bB0vB{gVZ_$aWM;! zfGhDU1@ag)zywHDDM+>`Kfk1u705`-OUzA$NP<+93IK`R#N?v + +* Directory listing: <@eval page.core_url@> + +<@deval page.dirlist@> diff --git a/sitespecial/notfound.org b/msgsite/notfound.org similarity index 100% rename from sitespecial/notfound.org rename to msgsite/notfound.org diff --git a/sitespecial/servererror.org b/msgsite/servererror.org similarity index 100% rename from sitespecial/servererror.org rename to msgsite/servererror.org diff --git a/sitespecial/showrevs.org b/msgsite/showrevs.org similarity index 100% rename from sitespecial/showrevs.org rename to msgsite/showrevs.org diff --git a/nohi.wsgi b/nohi.wsgi index 8a74380..4c08774 100644 --- a/nohi.wsgi +++ b/nohi.wsgi @@ -5,11 +5,12 @@ import os.path _absfile = os.path.abspath(__file__) _filedir = os.path.dirname(_absfile) +sys.path.insert(0, _filedir) + try: import mege.wsgi except ImportError: sys.path.insert(0, os.path.join(_filedir, 'mege')) import mege.wsgi os.chdir(_filedir) - application = mege.wsgi.create_application() diff --git a/prestatic/extra.js b/prestatic/extra.js index 238203c..0a4d9d1 100644 --- a/prestatic/extra.js +++ b/prestatic/extra.js @@ -10,28 +10,28 @@ */ add_external_document_writing_script = function(url, elem) { - var orig_write, content, done; + var orig_write, content, done, ns; orig_write = document.write; content = '' document.write = function(msg) { content += msg + '\n'; - } + }; done = function() { document.write = orig_write; elem.innerHTML = content; - } + }; ns = document.createElement('script'); ns.type = 'text/javascript'; ns.src = url; ns.onload = function() { done(); - } + }; ns.onreadystatechange = function() { if (this.readyState == 'complete') done(); - } + }; document.body.appendChild(ns); }; diff --git a/prestatic/screen.css b/prestatic/screen.css index 32bb61f..5896cee 100644 --- a/prestatic/screen.css +++ b/prestatic/screen.css @@ -1,6 +1,8 @@ /*@prexec page_bg = '#e8efef' @*/ + +/* BASICS */ * { margin: 0; padding: 0; @@ -36,6 +38,10 @@ body { font-size: 18px; } +ul#menulinks { + margin: 0; +} + #menulinks li { display: inline; list-style: none; @@ -74,14 +80,6 @@ body { width: auto; } -#body ul, #body ol { - margin-left: 15px; -} - -#body li { - list-style: square outside none; -} - #metadata { margin-top: 10px; border-style: dashed; @@ -121,10 +119,6 @@ body { margin: 2px 0 10px 4px; } -#toc ul { - -} - #toc li.level1 { margin-left: 0; } @@ -150,6 +144,8 @@ body { } +/* LINKS */ + a { text-decoration: none; } @@ -162,6 +158,8 @@ a:hover { color: #200cff; } +/* HEADINGS */ + h1, h2, h3, h4, h5, h6 { font-family: 'Dejavu Serif', FreeSerif, 'Nimbus Roman', Georgia, serif; font-weight: normal; @@ -204,15 +202,117 @@ h6 { font-weight: bold; } + +/* Misc. elements */ + p { text-align: justify; margin-bottom: 5px; } +div.caption { + clear: both; + margin: 5px; +} + +caption, div.caption > p { + background-color: #ddd; + padding: 3px; + border: 1px dotted #ccc; + font-style: italic; +} + +tt, code, samp, pre, var { + font-family: Inconsolata, 'Dejavu Sans Mono', monospace; +} + img { border: none; } +cite, quote { + border-bottom: 1px dashed yellow; +} + +blockquote { + margin-left: 20px; + font-size: 14px; +} + +acronym, abbreviation { + border-bottom: 1px dashed green; +} + +kbd { + background-color: #fff; + padding: 1px 2px; +} + +dfn { + font-style: italic; +} + +dfn { + font-style: italic; +} + +ins { + text-decoration: underline; +} + +del { + text-decoration: line-through; +} + +hr { + margin: 4px 0; +} + + +/* Lists */ + +ul, ol { + margin: 0 3px 4px 0; + list-style-position: inside; +} + +ul { + list-style-type: disc; +} + +ul > ul, ol > ul { + list-style-type: square; +} + +ul > * > ul, ol > * > ul { + list-style-type: circle; +} + +ol { + list-style-type: decimal; +} + +ol > ol, ul > ol { + list-style-type: upper-alpha; +} + +ol > * > ol, ul > * > ol { + list-style-type: lower-alpha; +} + +/* Definition lists */ + +dd { + margin-left: 20px; +} + +dl > dl { + margin-left: 25px; +} + + +/* Tables */ + table { margin: 0 auto; border-collapse: collapse; @@ -227,6 +327,9 @@ td, th { padding: 1px 3px; } + +/* Misc. classes */ + .strong { font-weight: bold; } @@ -235,16 +338,20 @@ td, th { font-style: italic; } -.center-align { - text-align: center; +.underline { + text-decoration: underline; } -.right-align { - text-align: right; +.center-align, .center-align > * { + text-align: center; ! important } -.left-align { - text-align: left; +.right-align, .right-align > * { + text-align: right; ! important +} + +.left-align, .left-align > * { + text-align: left; ! important } .center-float { @@ -267,3 +374,23 @@ td, th { display: inline; } +.huge, .huge * { + font-size: 25px; ! important +} + +.large, .large * { + font-size: 18px; ! important +} + +.medium, .medium * { + font-size: 12px; ! important +} + +.small, .small * { + font-size: 10px; ! important +} + +.tiny, .tiny * { + font-size: 8px; ! important +} + diff --git a/prestatic/template.html b/prestatic/template.html index 029bab3..6649c2f 100644 --- a/prestatic/template.html +++ b/prestatic/template.html @@ -86,6 +86,9 @@ for x in('projects', 'writings', 'films', 'about'):
+