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
log.mege
.finallog.mege
/mege/
apache-config
.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__)
_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()

View File

@ -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);
};

View File

@ -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
}

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 ''@-->
<div id='metadata'>
<!--@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 id='logo'>

View File

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

View File

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

View File

@ -9,6 +9,7 @@
window.addEventListener('load', function(event){add_fsf_widget(8085);}, false);
#+END_SRC
* This is metanohi
*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 ---
and that means no more superfluous text[fn:extra].
Feel free to check out my [[/projects][Projects]] page.
* Passive activism
#++show

View File

@ -1,8 +1,8 @@
#+title: Test of basic mege features
#&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
*mege* has many features. A bit /too/ many, perhaps.
@ -21,6 +21,9 @@ Another list:
+ with another entry
1. and so on
2. etc.
1. ouoiaou
2. ouaoiu
1. oaiaou
+ continuing
** Definition lists
@ -36,7 +39,12 @@ Another list:
* 3u :: o (correct behaviour)
** 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
@ -45,16 +53,17 @@ want to _underline_ this link: _[[http://example.com/]]_.
** Block containers
Block quote:
Blockquote:
#&block
Hello.
#&
*** Combination
#&div;large
#&+large
#&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
def
(no new parapraph)
(no new paragraph)
#&
ghi.
@ -116,7 +125,7 @@ introduction by the Master of Falsefulness
** Subscript and superscript
x_{tallyho} = 33^{12}, x_\{tallyho} = 33^\{12}
x_{tallyho} = 33^{12}, escaped: x_\{tallyho} = 33^\{12}
** Eval'd Code
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