From 6f4c9967743da82ad34e202f5b93582273a6e40b Mon Sep 17 00:00:00 2001
From: Niels Serup
Date: Thu, 14 Jul 2011 22:28:37 +0200
Subject: [PATCH] Start page acceptable.
---
.gitignore | 1 +
nohi.wsgi | 22 ++++----
prestatic/extra.js | 16 +++---
prestatic/screen.css | 104 ++++++++++++++++++++++++++++++++++++--
prestatic/template.html | 26 +++++-----
site/index.org | 92 +++++++++++++++++----------------
site/writings/hacking.org | 3 ++
7 files changed, 185 insertions(+), 79 deletions(-)
create mode 100644 site/writings/hacking.org
diff --git a/.gitignore b/.gitignore
index 0e744d8..3304550 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@
/template.html
/extra/atom.xml
log.mege
+.finallog.mege
/mege/
apache-config
.debug
diff --git a/nohi.wsgi b/nohi.wsgi
index ce201a5..8a74380 100644
--- a/nohi.wsgi
+++ b/nohi.wsgi
@@ -1,19 +1,15 @@
"""WSGI interface"""
import sys
-import os
+import os.path
+
_absfile = os.path.abspath(__file__)
_filedir = os.path.dirname(_absfile)
-try:
- import mege.server as server
-except ImportError:
- sys.path.insert(0, os.path.join(_filedir, 'mege'))
- import mege.server as server
-os.chdir(_filedir)
try:
- application = server.MegeApplication()
-except Exception as e:
- import traceback
- with open('.nohifinallog', 'w') as f:
- print(e, file=f)
- print(traceback.format_exc(), file=f)
+ 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 966ba7b..238203c 100644
--- a/prestatic/extra.js
+++ b/prestatic/extra.js
@@ -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'));
};
diff --git a/prestatic/screen.css b/prestatic/screen.css
index b583222..8992e88 100644
--- a/prestatic/screen.css
+++ b/prestatic/screen.css
@@ -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;
+}
\ No newline at end of file
diff --git a/prestatic/template.html b/prestatic/template.html
index 078c0c1..ea52f62 100644
--- a/prestatic/template.html
+++ b/prestatic/template.html
@@ -1,4 +1,7 @@
-
+
-
+
-
-
+
-
-
+
+
-
-
+
+
@@ -59,7 +61,7 @@ if page.licenses:
working.
-->
-
+
@@ -71,10 +73,10 @@ for x in('projects', 'writings', 'films', 'about'):
diff --git a/site/index.org b/site/index.org
index e2c7ffc..f9b3229 100644
--- a/site/index.org
+++ b/site/index.org
@@ -1,54 +1,60 @@
#+title: Home
-#+summary: Home!
+#+summary: This is the start page.
+#+license: bysa, own works
+#+license: Varying, external works
#++show
#+BEGIN_SRC javascript
-window.addEventListener('load', function(event){add_fsf_widget(8085);});
+ // Add the FSF widget after the page has loaded.
+ window.addEventListener('load', function(event){add_fsf_widget(8085);}, false);
#+END_SRC
* This is metanohi
-aaue abc&strong&emph&large.
-#&-color=red
-ou
-#&
+*metanohi* is a website founded in 2009 with a well-defined purpose: to
+exist. It is the personal website of [[/about/niels][Niels Serup]], a [[/writings/hacking/][hacker]] in a world of
+non-hackers.
-#&+center
-This text is centered.
-#&
+Historically, this start page has featured text which had little purpose except
+to exist. That is over now. /metanohi/ has no real need for a start page ---
+and that means no more superfluous text.
-# #++show
-# #+BEGIN_SRC html
-#
-#
-#
-#
-#
-#
-#
-#
-#
-#
-# STOP SOFTWARE PATENTS
-#
-#
+* Passive activism
-#
-#
-#
-#
-
-#
-#
-
-#
-# #+END_SRC
+#++show
+#+BEGIN_SRC html
+
+
+#+END_SRC
diff --git a/site/writings/hacking.org b/site/writings/hacking.org
new file mode 100644
index 0000000..57d0e8e
--- /dev/null
+++ b/site/writings/hacking.org
@@ -0,0 +1,3 @@
+#+title: Hacking
+
+Hacking