diff --git a/index.html b/index.html
index f87705b..189200a 100755
--- a/index.html
+++ b/index.html
@@ -4,6 +4,13 @@
')
- .append($('
')
+ .append(elem//$('
')
.attr('src', page.path)
//.append(page
// .parse({ slots: state.slots }, true))
@@ -394,9 +457,34 @@ var macro = {
.html()
}))
- // post macro...
+ // post processing...
if(!skip_post){
- _parse(context, parsed, this.post_macro)
+ // fill slots...
+ // XXX need to prevent this from processing slots in editable
+ // elements...
+ slots = {}
+ // get slots...
+ parsed.find('slot')
+ .each(function(i, e){
+ e = $(e)
+ var n = e.attr('name')
+
+ n in slots && e.detach()
+
+ slots[n] = e
+ })
+ // place slots...
+ parsed.find('slot')
+ .each(function(i, e){
+ e = $(e)
+ var n = e.attr('name')
+
+ e.replaceWith(slots[n])
+ })
+
+ // post-macro...
+ this.post_macro
+ && _parse(context, parsed, this.post_macro)
}
// XXX shuld we get rid of the rot span???
@@ -517,21 +605,32 @@ var data = {
'Templates/_raw': {
text: '@source(..)',
},
+
'Templates/_view': {
text: '\n'
- +'\n'
+'\n'
+'
\n'
+'
☰ \n'
- +'@include(../path) (
edit)\n'
+ +'@include(../path)\n'
+ +'\n'
+ +'
\n'
+ +'(edit)\n'
+ +'\n'
+ +'\n'
+'
\n'
+'
\n'
+'
'
- //+'@include(../title)'
- +'@include(../title)'
+ +''
+ +'@source(../title)'
+ +''
+ +'\n'
+'
\n'
+'
\n'
- +'
@include(..)
\n'
+ +'\n'
+ +'
\n'
+ +'\n'
+ +'\n'
+ +'\n'
+'
\n'
+'
home\n'
+'\n',
@@ -540,16 +639,17 @@ var data = {
text: '\n'
+'\n'
+'\n'
- +'
'
- +'
☰ \n'
- +'@include(../path) (
view)\n'
- +'
\n'
- +'
\n'
- +'
@include(../title)
\n'
- +'
\n'
- +'
@source(../raw)
\n'
- +'
\n'
- +'
home\n'
+ +'
\n'
+ +'\n'
+ +'
'
+ +'(view)'
+ +'\n'
+ +'\n'
+ +'
\n'
+ +''
+ +'
'
+ +'
\n'
+ +''
+'',
},
}