As mege is getting better, so is metanohi.

This commit is contained in:
Niels Serup 2011-07-17 00:34:50 +02:00
parent 095274c34b
commit 70d45d4119
20 changed files with 211 additions and 39 deletions

2
.gitignore vendored
View File

@ -10,6 +10,6 @@
/extra/atom.xml /extra/atom.xml
log.mege log.mege
.finallog.mege .finallog.mege
/mege/
apache-config apache-config
.debug .debug
/mege/

1
macros/__init__.py Executable file
View File

@ -0,0 +1 @@
from .macros import *

BIN
macros/__init__.pyc Normal file

Binary file not shown.

4
macros/macros.py Executable file
View File

@ -0,0 +1,4 @@
# macros
def download_prog(root, fname):
return ''

BIN
macros/macros.pyc Normal file

Binary file not shown.

5
msgsite/listdir.org Normal file
View File

@ -0,0 +1,5 @@
#+title: Directory listing: <@eval page.core_url@>
* Directory listing: <@eval page.core_url@>
<@deval page.dirlist@>

View File

@ -5,11 +5,12 @@ import os.path
_absfile = os.path.abspath(__file__) _absfile = os.path.abspath(__file__)
_filedir = os.path.dirname(_absfile) _filedir = os.path.dirname(_absfile)
sys.path.insert(0, _filedir)
try: try:
import mege.wsgi import mege.wsgi
except ImportError: except ImportError:
sys.path.insert(0, os.path.join(_filedir, 'mege')) sys.path.insert(0, os.path.join(_filedir, 'mege'))
import mege.wsgi import mege.wsgi
os.chdir(_filedir) os.chdir(_filedir)
application = mege.wsgi.create_application() application = mege.wsgi.create_application()

View File

@ -10,28 +10,28 @@
*/ */
add_external_document_writing_script = function(url, elem) { add_external_document_writing_script = function(url, elem) {
var orig_write, content, done; var orig_write, content, done, ns;
orig_write = document.write; orig_write = document.write;
content = '' content = ''
document.write = function(msg) { document.write = function(msg) {
content += msg + '\n'; content += msg + '\n';
} };
done = function() { done = function() {
document.write = orig_write; document.write = orig_write;
elem.innerHTML = content; elem.innerHTML = content;
} };
ns = document.createElement('script'); ns = document.createElement('script');
ns.type = 'text/javascript'; ns.type = 'text/javascript';
ns.src = url; ns.src = url;
ns.onload = function() { ns.onload = function() {
done(); done();
} };
ns.onreadystatechange = function() { ns.onreadystatechange = function() {
if (this.readyState == 'complete') if (this.readyState == 'complete')
done(); done();
} };
document.body.appendChild(ns); document.body.appendChild(ns);
}; };

View File

@ -1,6 +1,8 @@
/*@prexec /*@prexec
page_bg = '#e8efef' page_bg = '#e8efef'
@*/ @*/
/* BASICS */
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -36,6 +38,10 @@ body {
font-size: 18px; font-size: 18px;
} }
ul#menulinks {
margin: 0;
}
#menulinks li { #menulinks li {
display: inline; display: inline;
list-style: none; list-style: none;
@ -74,14 +80,6 @@ body {
width: auto; width: auto;
} }
#body ul, #body ol {
margin-left: 15px;
}
#body li {
list-style: square outside none;
}
#metadata { #metadata {
margin-top: 10px; margin-top: 10px;
border-style: dashed; border-style: dashed;
@ -121,10 +119,6 @@ body {
margin: 2px 0 10px 4px; margin: 2px 0 10px 4px;
} }
#toc ul {
}
#toc li.level1 { #toc li.level1 {
margin-left: 0; margin-left: 0;
} }
@ -150,6 +144,8 @@ body {
} }
/* LINKS */
a { a {
text-decoration: none; text-decoration: none;
} }
@ -162,6 +158,8 @@ a:hover {
color: #200cff; color: #200cff;
} }
/* HEADINGS */
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-family: 'Dejavu Serif', FreeSerif, 'Nimbus Roman', Georgia, serif; font-family: 'Dejavu Serif', FreeSerif, 'Nimbus Roman', Georgia, serif;
font-weight: normal; font-weight: normal;
@ -204,15 +202,117 @@ h6 {
font-weight: bold; font-weight: bold;
} }
/* Misc. elements */
p { p {
text-align: justify; text-align: justify;
margin-bottom: 5px; 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 { img {
border: none; 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 { table {
margin: 0 auto; margin: 0 auto;
border-collapse: collapse; border-collapse: collapse;
@ -227,6 +327,9 @@ td, th {
padding: 1px 3px; padding: 1px 3px;
} }
/* Misc. classes */
.strong { .strong {
font-weight: bold; font-weight: bold;
} }
@ -235,16 +338,20 @@ td, th {
font-style: italic; font-style: italic;
} }
.center-align { .underline {
text-align: center; text-decoration: underline;
} }
.right-align { .center-align, .center-align > * {
text-align: right; text-align: center; ! important
} }
.left-align { .right-align, .right-align > * {
text-align: left; text-align: right; ! important
}
.left-align, .left-align > * {
text-align: left; ! important
} }
.center-float { .center-float {
@ -267,3 +374,23 @@ td, th {
display: inline; 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
}

View File

@ -86,6 +86,9 @@ for x in('projects', 'writings', 'films', 'about'):
<!--@eval "<hr /><div id='footnotes'><h3>Footnotes</h3>" + page.footnotes_html + '</div>' if page.footnotes else ''@--> <!--@eval "<hr /><div id='footnotes'><h3>Footnotes</h3>" + page.footnotes_html + '</div>' if page.footnotes else ''@-->
<div id='metadata'> <div id='metadata'>
<!--@eval run_macros(page.metadata_html)@--> <!--@eval run_macros(page.metadata_html)@-->
<!--@exec
if page.is_dynamic:
print("<p><a href='{}'>View source</a></p>".format(page.sourcepath), end='')@-->
</div> </div>
</div> </div>
<div id='logo'> <div id='logo'>

View File

@ -1 +1,5 @@
#+title: About metanohi #+title: About metanohi
* About metanohi

View File

@ -1 +1,5 @@
#+title: Films #+title: Films
* Films

View File

@ -9,6 +9,7 @@
window.addEventListener('load', function(event){add_fsf_widget(8085);}, false); window.addEventListener('load', function(event){add_fsf_widget(8085);}, false);
#+END_SRC #+END_SRC
* This is metanohi * This is metanohi
*metanohi* is a website founded in 2009 with a well-defined purpose: to *metanohi* is a website founded in 2009 with a well-defined purpose: to
@ -19,6 +20,8 @@ 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 --- to exist. That is over now. /metanohi/ has no real need for a start page ---
and that means no more superfluous text[fn:extra]. and that means no more superfluous text[fn:extra].
Feel free to check out my [[/projects][Projects]] page.
* Passive activism * Passive activism
#++show #++show

View File

@ -1,8 +1,8 @@
#+title: Test of basic mege features #+title: Test of basic mege features
#&summary #&summary
Test of many features Test of mege's most important and most commonly used features
#& #&
#+license: bysa, images #+license: bysa
* Test of mege features * Test of mege features
*mege* has many features. A bit /too/ many, perhaps. *mege* has many features. A bit /too/ many, perhaps.
@ -21,6 +21,9 @@ Another list:
+ with another entry + with another entry
1. and so on 1. and so on
2. etc. 2. etc.
1. ouoiaou
2. ouaoiu
1. oaiaou
+ continuing + continuing
** Definition lists ** Definition lists
@ -36,7 +39,12 @@ Another list:
* 3u :: o (correct behaviour) * 3u :: o (correct behaviour)
** Images ** Images
#&img;url=test.png,alt='This is a test picture',width=340 #&img;url=test0.png, alt='This is a test picture', width=270, float=right, \
#&caption='A test picture'
#+caption: A test picture \
#+with a caption on two lines
#&img;url=test0.png, alt='This is a test picture', width=240, float=right
** Links ** Links
@ -52,9 +60,10 @@ Hello.
#& #&
*** Combination *** Combination
#&div;large #&+large
#&block #&block
This is a paragraph inside a blockquote inside a block container. This is a paragraph inside a blockquote inside a block container. This is
escaped:
\#& \#&
#& #&
#& #&
@ -64,7 +73,7 @@ abc
#&-strong,tiny,color=red #&-strong,tiny,color=red
def def
(no new parapraph) (no new paragraph)
#& #&
ghi. ghi.
@ -116,7 +125,7 @@ introduction by the Master of Falsefulness
** Subscript and superscript ** Subscript and superscript
x_{tallyho} = 33^{12}, x_\{tallyho} = 33^\{12} x_{tallyho} = 33^{12}, escaped: x_\{tallyho} = 33^\{12}
** Eval'd Code ** Eval'd Code
Inline code: <@eval 2 + 3@>. <@exec print('aha') Inline code: <@eval 2 + 3@>. <@exec print('aha')

View File

@ -0,0 +1,17 @@
#+title: mege tests
#+license: bysa
#+summary: Links to tests of mege
* mege tests
Yes, I know. I cannot hide it. *mege*, the otherwise brilliant engine that
channels its powers into metanohi, is not perfect. It was created by a human
--- and humans are known to be imperfect.
To make sure its html generation is working properly, the following test pages
have been created:
+ [[basics][Basics]]
+
Perhaps /mege/ will grow and come near to perfection one day.

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -1,6 +0,0 @@
#+title: Directory listing: <@eval page.core_url@>
#++deval
#+BEGIN_SRC
page.dirlist
#+END_SRC