mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-23 03:03:14 +00:00
Started using shadow tiddlers
Now the JavaScript modules and templates are put into the shadow store
This commit is contained in:
parent
1cf54ce08c
commit
91bba13608
15
js/App.js
15
js/App.js
@ -72,17 +72,14 @@ var App = function() {
|
||||
// If in the browser, load the tiddlers built into the TiddlyWiki document
|
||||
if(this.isBrowser) {
|
||||
// First, the JavaScript system tiddlers
|
||||
var moduleArea = document.getElementById("jsModules"),
|
||||
tiddlers = this.store.deserializeTiddlers("(DOM)",moduleArea);
|
||||
for(t=0; t<tiddlers.length; t++) {
|
||||
this.store.addTiddler(new Tiddler(tiddlers[t]));
|
||||
}
|
||||
var moduleArea = document.getElementById("jsModules");
|
||||
this.store.shadows.addTiddlers(this.store.deserializeTiddlers("(DOM)",moduleArea));
|
||||
// Then, the ordinary tiddlers baked into the storeArea
|
||||
var storeArea = document.getElementById("storeArea");
|
||||
tiddlers = this.store.deserializeTiddlers("(DOM)",storeArea);
|
||||
for(t=0; t<tiddlers.length; t++) {
|
||||
this.store.addTiddler(new Tiddler(tiddlers[t]));
|
||||
}
|
||||
this.store.addTiddlers(this.store.deserializeTiddlers("(DOM)",storeArea));
|
||||
// Finally, the shadow tiddlers
|
||||
var shadowArea = document.getElementById("shadowArea");
|
||||
this.store.shadows.addTiddlers(this.store.deserializeTiddlers("(DOM)",shadowArea));
|
||||
}
|
||||
// Bit of a hack to set up the macros
|
||||
this.store.installMacro(require("./macros/chooser.js").macro);
|
||||
|
3
tiddlywiki5/tiddlers/ShadowTiddlers.tid
Normal file
3
tiddlywiki5/tiddlers/ShadowTiddlers.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: ShadowTiddlers
|
||||
|
||||
<<list shadowed>>
|
@ -6,7 +6,7 @@ tiddler: tiddlers/*.tid
|
||||
tiddler: tiddlers/*.jpg
|
||||
tiddler: tiddlers/*.png
|
||||
tiddler: tiddlers/*.svg
|
||||
tiddler: shadows/templates/*.tid
|
||||
shadow: shadows/templates/*.tid
|
||||
#tiddler: http://wikitext.tiddlyspace.com/fractalveg.jpg
|
||||
# type: image/jpeg
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user