From ae33211414522d4883ffe8505959c8b6578ddde1 Mon Sep 17 00:00:00 2001 From: Niels Serup Date: Fri, 5 Aug 2011 00:50:04 +0200 Subject: [PATCH] Projects page updated. --- nohi.wsgi | 7 +- prestatic/general.css | 502 +++++++++++++++++++ prestatic/print.css | 15 + prestatic/screen.css | 434 ---------------- prestatic/template.html | 13 +- prestatic/tty.css | 11 + rules.mege | 1 + site/about/index.org | 12 + site/projects/index.org | 181 ++++++- site/projects/nanonote/glorious-nanonote.jpg | Bin 0 -> 66633 bytes site/projects/nanonote/index.org | 16 + site/writings/na.org | 290 +++++++++++ 12 files changed, 1035 insertions(+), 447 deletions(-) create mode 100644 prestatic/general.css create mode 100644 site/projects/nanonote/glorious-nanonote.jpg create mode 100755 site/projects/nanonote/index.org create mode 100644 site/writings/na.org diff --git a/nohi.wsgi b/nohi.wsgi index a46beb3..5ae813f 100644 --- a/nohi.wsgi +++ b/nohi.wsgi @@ -7,10 +7,7 @@ _filedir = os.path.dirname(_absfile) sys.path.insert(0, _filedir) -try: - import mege.wsgi -except ImportError: - pass#sys.path.insert(0, os.path.join(_filedir, 'mege')) - #import mege.wsgi +import mege.wsgi + os.chdir(_filedir) application = mege.wsgi.create_application() diff --git a/prestatic/general.css b/prestatic/general.css new file mode 100644 index 0000000..3020834 --- /dev/null +++ b/prestatic/general.css @@ -0,0 +1,502 @@ +/* BASICS */ +* { + margin: 0; + padding: 0; +} + +body { + font-family: 'Dejavu Sans', 'Nimbus Sans', Helvetica, Arial, Verdana, sans-serif; + font-size: 14px; + color: #000; +} + +#bodyend { + clear: both; +} + +#metadata { + margin: 10px 0; + border-style: dashed; + border-color: #ccc; + border-width: 4px 0 0 0; + background: #aaa url('/static/metadata.png') no-repeat right bottom; + padding: 2px 5px; + color: #fff; +} + +#metadata table, #metadata td, #metadata th { + border: None; + margin: 0; +} + +#toc { + background-color: #ddd; + border: 2px dotted #aaa; + display: inline-block; + padding: 4px 9px; + margin: 2px 0 10px 4px; +} + +#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; +} + + +/* LINKS */ + +a { + text-decoration: none; +} + +a:link, a:visited { + color: #004a7f; +} + +a:hover { + color: #200cff; +} + +/* HEADINGS */ + +h1, h2, h3, h4, h5, h6 { + font-family: 'Dejavu Serif', FreeSerif, 'Nimbus Roman', Georgia, serif; + font-weight: normal; + clear: both; +} + +h1 { + margin: 16px 0 5px 0; + font-size: 30px; +} + +h1:first-child { + margin-top: 0; +} + +h2 { + margin: 14px 0 5px 0 ; + font-size: 25px; + background-color: #ddd; +} + +h3 { + margin: 9px 0 3px 0; + font-size: 21px; +} + +h4 { + margin: 7px 0 2px 0; + font-size: 18px; + font-weight: bold; +} + +h5 { + margin-top: 5px 0 1px 0; + font-size: 16px; + font-weight: bold; +} + +h6 { + margin: 3px 0 1px 0; + font-size: 14px; + font-weight: bold; +} + + +/* Misc. elements */ + +p { + text-align: justify; + margin-top: 10px; +} + +p:first-child { + margin-top: 0; +} + +div.caption { + clear: both; + margin-bottom: 10px; +} + +caption, div.caption > p { + background-color: #ddd; + padding: 3px; + text-align: center; + font-style: italic; +} + +div.caption.center-float img { + margin: 0 auto; +} + +div.caption.left-float img { + margin: 0; +} + +div.caption.center-float { + text-align: center; +} + +div.caption.center-float p { + display: inline-block; +} + +tt, code, samp, pre, var { + font-family: Inconsolata, 'Dejavu Sans Mono', monospace; +} + +pre { + margin-top: 10px; + white-space: pre-wrap; + word-wrap: break-word; +} + +img { + border: none; + clear: both; + margin-bottom: 10px; +} + +cite, quote { + border-bottom: 1px dashed yellow; +} + +blockquote { + margin: 5px 0 5px 20px; + font-size: 15px; +} + +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: 5px 0; +} + + +/* Lists */ + +ul, ol { + margin-top: 5px; + list-style-position: inside; +} + +ul > ul, ul > ol, ol > ul, ol > ol { + margin-left: 17px; + margin-bottom: 0; + padding-left: 5px; +} + +ul { + list-style-type: disc; +} + +ul > ul, ol > ul { + list-style-type: square; +} + +ul > * > ul, ol > * > ul { + list-style-type: circle; +} + +ul > * * > ul, ol > * * > ul { + list-style-type: disc; ! important +} + +ol { + list-style-type: decimal; +} + +ol > ol, ul > ol { + list-style-type: upper-alpha; +} + +ol > * > ol, ul > * > ol { + list-style-type: lower-alpha; +} + +ol > * * > ol, ul > * * > ol { + list-style-type: decimal; ! important +} + + +/* Definition lists */ + +dd { + margin-left: 20px; +} + +dl > dl { + margin-left: 21px; + padding-left: 5px; + border-left: 4px solid #000; +} + + +/* Tables */ + +table { + margin: 5px auto; + border-collapse: collapse; +} + +table, thead, tbody, tfoot, td, th { + border-style: inset; + border-color: black; +} + +td, th { + margin: 0 5px; + padding: 1px 3px; + border-width: 0 2px 0 0; +} + +td:last-child, th:last-child { + border-width: 0; +} + +table, tbody { + border-width: 0; +} + +thead { + border-width: 0 0 2px 0; +} + +tfoot { + border-width: 2px 0 0 0; +} + +thead, tfoot { + font-weight: bold; +} + + +/* Math */ + +.math { + position: relative; + top: 14px; +} + +.block.math { + position: static; + top: 0; + margin: 10px auto 0 auto; +} + + +/* Formatting-related classes */ + +.strong { + font-weight: bold; +} + +.emph { + font-style: italic; +} + +.underline { + text-decoration: underline; +} + +.center-align, .center-align > * { + text-align: center; ! important +} + +.right-align, .right-align > * { + text-align: right; ! important +} + +.left-align, .left-align > * { + text-align: left; ! important +} + +.center-float { + margin-right: auto; + margin-left: auto; +} + +.right-float { + float: right; +} + +.left-float { + float: left; +} + +div.right-float, img.right-float, video.right-float, audio.right-float { + margin-left: 10px; +} + +div.left-float, img.left-float, video.left-float, audio.left-float { + margin-right: 10px; +} + +.block { + display: block; +} + +.inline { + display: inline; +} + +.noclear, div.caption.noclear { + clear: none; ! important +} + +.huge, .huge * { + font-size: 25px; ! important +} + +.large, .large * { + font-size: 18px; ! important +} + +.medium, .medium * { + font-size: 14px; ! important +} + +.small, .small * { + font-size: 11px; ! important +} + +.tiny, .tiny * { + font-size: 9px; ! important +} + + +/* Code highlighting */ + +.highlight { + padding: 2px 4px; +} + +.highlighttable { + margin: 5px 0 5px 0; +} + +.highlighttable pre { + margin-top: 0; +} + +.highlighttable, .highlighttable .code { + border-width: 0; +} + +.linenos { + border-width: 0 1px 0 0; + border-style: solid; + border-size: black; + vertical-align: top; +} + +/* Projects boxes */ + +.projectboxes li { + display: block; + float: left; + margin: 0 10px 10px 0; + width: 230px; + overflow: hidden; + background-color: #000; +} + +.projectboxes li a { + display: block; + padding: 2px 3px; + height: 115px; + overflow: hidden; + background-position: 0 20px; + background-repeat: no-repeat; + white-space: nowrap; + text-align: right; +} + +.projectboxes li a:link, .projectboxes li a:visited { + color: #ffff00; + font-weight: bold; +} + +.projectboxes li a:hover { + background-color: #ffff00; + color: #000; +} + +.projectboxes li dfn { + display: block; + padding: 2px 3px; + height: 35px; + overflow: hidden; + font-style: normal; + color: #fff; + background-color: #444; +} + +/* Misc. classes */ + +.warning { + background-color: #ffa400; + font-weight: bold; + padding: 5px 5px 0 5px; + border: 1px outset black; +} + +.note { + background-color: #c3cfcf; + font-weight: bold; + padding: 5px 5px 0 5px; + border: 1px outset black; +} + +.notice { + background-color: yellow; +} + +.notice p, .note p, .warning p { + margin-bottom: 5px; +} + diff --git a/prestatic/print.css b/prestatic/print.css index e69de29..8501d60 100644 --- a/prestatic/print.css +++ b/prestatic/print.css @@ -0,0 +1,15 @@ +#minilogo { + display: none; +} + +#menu { + display: none; +} + +.highlighttable .code { + width: 100%; +} + +.viewsource { + display: none; +} diff --git a/prestatic/screen.css b/prestatic/screen.css index 266d8a5..16a7521 100644 --- a/prestatic/screen.css +++ b/prestatic/screen.css @@ -10,9 +10,6 @@ page_bg = '#e8efef' body { /*@preval 'background-color: ' + page_bg + ';\n'@*/ - font-family: 'Dejavu Sans', 'Nimbus Sans', Helvetica, Arial, Verdana, sans-serif; - font-size: 14px; - color: #000; } #minilogo { @@ -86,25 +83,6 @@ ul#menulinks { width: auto; } -#bodyend { - clear: both; -} - -#metadata { - margin: 10px 0; - border-style: dashed; - border-color: #ccc; - border-width: 4px 0 0 0; - background: #aaa url('/static/metadata.png') no-repeat right bottom; - padding: 2px 5px; - color: #fff; -} - -#metadata table, #metadata td, #metadata th { - border: None; - margin: 0; -} - #logo { margin-top: 10px; background: #111111; @@ -121,419 +99,7 @@ ul#menulinks { " 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 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; -} - - -/* LINKS */ - -a { - text-decoration: none; -} - -a:link, a:visited { - color: #004a7f; -} - -a:hover { - color: #200cff; -} - -/* HEADINGS */ - -h1, h2, h3, h4, h5, h6 { - font-family: 'Dejavu Serif', FreeSerif, 'Nimbus Roman', Georgia, serif; - font-weight: normal; -} - -h1 { - margin: 16px 0 5px 0; - font-size: 30px; -} - -h1:first-child { - margin-top: 0; -} - -h2 { - margin: 14px 0 5px 0 ; - font-size: 25px; - background-color: #ddd; -} - -h3 { - margin: 9px 0 3px 0; - font-size: 21px; -} - -h4 { - margin: 7px 0 2px 0; - font-size: 18px; - font-weight: bold; -} - -h5 { - margin-top: 5px 0 1px 0; - font-size: 16px; - font-weight: bold; -} - -h6 { - margin: 3px 0 1px 0; - font-size: 14px; - font-weight: bold; -} - - -/* Misc. elements */ - -p { - text-align: justify; - margin-top: 10px; -} - -p:first-child { - margin-top: 0; -} - -div.caption { - clear: both; - margin-bottom: 10px; -} - -caption, div.caption > p { - background-color: #ddd; - padding: 3px; - text-align: center; - font-style: italic; -} - -div.caption.center-float img { - margin: 0 auto; -} - -div.caption.left-float img { - margin: 0; -} - -div.caption.center-float { - text-align: center; -} - -div.caption.center-float p { - display: inline-block; -} - -tt, code, samp, pre, var { - font-family: Inconsolata, 'Dejavu Sans Mono', monospace; -} - -pre { - margin-top: 10px; - white-space: pre-wrap; - word-wrap: break-word; -} - -img { - border: none; - clear: both; - margin-bottom: 10px; -} - -cite, quote { - border-bottom: 1px dashed yellow; -} - -blockquote { - margin: 0 0 5px 20px; - font-size: 15px; -} - -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: 5px 0; -} - - -/* Lists */ - -ul, ol { - margin-top: 5px; - list-style-position: inside; -} - -ul > ul, ul > ol, ol > ul, ol > ol { - margin-left: 17px; - margin-bottom: 0; - padding-left: 5px; -} - -ul { - list-style-type: disc; -} - -ul > ul, ol > ul { - list-style-type: square; -} - -ul > * > ul, ol > * > ul { - list-style-type: circle; -} - -ul > * * > ul, ol > * * > ul { - list-style-type: disc; ! important -} - -ol { - list-style-type: decimal; -} - -ol > ol, ul > ol { - list-style-type: upper-alpha; -} - -ol > * > ol, ul > * > ol { - list-style-type: lower-alpha; -} - -ol > * * > ol, ul > * * > ol { - list-style-type: decimal; ! important -} - - -/* Definition lists */ - -dd { - margin-left: 20px; -} - -dl > dl { - margin-left: 21px; - padding-left: 5px; - border-left: 4px solid #000; -} - - -/* Tables */ - -table { - margin: 5px auto; - border-collapse: collapse; -} - -table, td, th { - border: 2px inset black; -} - -td, th { - margin: 0 5px; - padding: 1px 3px; -} - -thead, tfoot { - font-weight: bold; -} - - -/* Math */ - -.math { - position: relative; - top: 14px; -} - -.block.math { - position: static; - top: 0; - margin: 10px auto 0 auto; -} - - -/* Formatting-related classes */ - -.strong { - font-weight: bold; -} - -.emph { - font-style: italic; -} - -.underline { - text-decoration: underline; -} - -.center-align, .center-align > * { - text-align: center; ! important -} - -.right-align, .right-align > * { - text-align: right; ! important -} - -.left-align, .left-align > * { - text-align: left; ! important -} - -.center-float { - margin-right: auto; - margin-left: auto; -} - -.right-float { - float: right; -} - -.left-float { - float: left; -} - -div.right-float, img.right-float, video.right-float, audio.right-float { - margin-left: 10px; -} - -div.left-float, img.left-float, video.left-float, audio.left-float { - margin-right: 10px; -} - -.block { - display: block; -} - -.inline { - display: inline; -} - -.noclear, div.caption.noclear { - clear: none; ! important -} - -.huge, .huge * { - font-size: 25px; ! important -} - -.large, .large * { - font-size: 18px; ! important -} - -.medium, .medium * { - font-size: 14px; ! important -} - -.small, .small * { - font-size: 11px; ! important -} - -.tiny, .tiny * { - font-size: 9px; ! important -} - - -/* Code highlighting */ - -.highlight { - padding: 2px 4px; -} - -.highlighttable { - margin: 5px 0 5px 0; -} - -.highlighttable pre { - margin-top: 0; -} - -.highlighttable, .highlighttable .code { - border-width: 0; -} .highlighttable .code { width: 600px; } - -.linenos { - border-width: 0 1px 0 0; - border-style: solid; - border-size: black; - vertical-align: top; - -} - - -/* Misc. classes */ - -.warning { - background-color: #ffa400; - font-weight: bold; - padding: 5px 5px 0 5px; - border: 1px outset black; -} - -.note { - background-color: #c3cfcf; - font-weight: bold; - padding: 5px 5px 0 5px; - border: 1px outset black; -} - -.notice { - background-color: yellow; -} - -.notice p, .note p, .warning p { - margin-bottom: 5px; -} - diff --git a/prestatic/template.html b/prestatic/template.html index 4515502..6151838 100644 --- a/prestatic/template.html +++ b/prestatic/template.html @@ -20,14 +20,15 @@ if page.is_dynamic: - + - + + - + @@ -89,7 +90,7 @@ for x in('projects', 'writings', 'about', 'sitemap'): + print("

View source

".format(page.sourcepath), end='')@-->