mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-11 16:24:31 +00:00
Take advantage of compiled palettes
More robust because previously we couldn't cope with indirect palette entries in these situations
This commit is contained in:
parent
bfea62b43b
commit
1f4f164d5e
@ -34,7 +34,7 @@ function FramedEngine(options) {
|
|||||||
this.parentNode.insertBefore(this.iframeNode,this.nextSibling);
|
this.parentNode.insertBefore(this.iframeNode,this.nextSibling);
|
||||||
this.iframeDoc = this.iframeNode.contentWindow.document;
|
this.iframeDoc = this.iframeNode.contentWindow.document;
|
||||||
// (Firefox requires us to put some empty content in the iframe)
|
// (Firefox requires us to put some empty content in the iframe)
|
||||||
var paletteTitle = this.widget.wiki.getTiddlerText("$:/palette");
|
var paletteTitle = this.widget.wiki.getTiddlerText("$:/palette/palette-colours");
|
||||||
var colorScheme = (this.widget.wiki.getTiddler(paletteTitle) || {fields: {}}).fields["color-scheme"] || "light";
|
var colorScheme = (this.widget.wiki.getTiddler(paletteTitle) || {fields: {}}).fields["color-scheme"] || "light";
|
||||||
this.iframeDoc.open();
|
this.iframeDoc.open();
|
||||||
this.iframeDoc.write("<meta name='color-scheme' content='" + colorScheme + "'>");
|
this.iframeDoc.write("<meta name='color-scheme' content='" + colorScheme + "'>");
|
||||||
|
@ -17,7 +17,7 @@ title: $:/PaletteManager
|
|||||||
{{$:/snippets/palettetests}}
|
{{$:/snippets/palettetests}}
|
||||||
|
|
||||||
<$let
|
<$let
|
||||||
paletteSettings={{{ [{$:/palette}get[settings]] :else[{$:/palette}get[palette-import]!match[]get[settings]] }}}
|
paletteSettings={{{ [[$:/temp/palette-consolidated]get[settings]] }}}
|
||||||
>
|
>
|
||||||
<%if [<paletteSettings>!match[]] %>
|
<%if [<paletteSettings>!match[]] %>
|
||||||
<div>
|
<div>
|
||||||
|
@ -166,7 +166,7 @@ The second ESC tries to close the "draft tiddler"
|
|||||||
<!-- keep those variables because they may "bleed" into macros using old syntax -->
|
<!-- keep those variables because they may "bleed" into macros using old syntax -->
|
||||||
<!-- "nonSystemTagsFilter", "systemTagsFilter" __need to be the same__ as fields: "first-search-filter", "second-search-filter" -->
|
<!-- "nonSystemTagsFilter", "systemTagsFilter" __need to be the same__ as fields: "first-search-filter", "second-search-filter" -->
|
||||||
<$let
|
<$let
|
||||||
palette={{$:/palette}}
|
palette="$:/temp/palette-colours"
|
||||||
colourA={{{ [<palette>getindex[foreground]] }}}
|
colourA={{{ [<palette>getindex[foreground]] }}}
|
||||||
colourB={{{ [<palette>getindex[background]] }}}
|
colourB={{{ [<palette>getindex[background]] }}}
|
||||||
fallbackTarget={{{ [<palette>getindex[tag-background]] }}}
|
fallbackTarget={{{ [<palette>getindex[tag-background]] }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user