Since there's no documentation for how to make a theme, using your own
stylesheets may be easier. What you can do is make a selection drop-down
like this:
<$select tiddler="SampleReveal1" default="set1" >
<option value="set1">Small Blue</option>
<option value="set2">Medium Red</option>
</$select>
Then you can make a stylesheet (regular tiddler tagged with
$:/tags/Stylesheet) like this:
\rules only filteredtranscludeinline transcludeinline macrodef
macrocallinline html
<$reveal type="match" state="SampleReveal1" text="set1">
.tc-tiddler-body h2 {
color: blue ;
font-size: 12px ;
}
</$reveal>
<$reveal type="match" state="SampleReveal1" text="set2">
.tc-tiddler-body h2 {
color: red ;
font-size: 24px ;
}
</$reveal>
I've used my own font/sizes/colors as an example, but you get the idea.
Getting back to your original question, if you were really set on changing
values inside the existing theme structure, you could do it in 2 steps. In
the first step, you select the group of styles you want from your
drop-down. A series of reveal widgets would then reveal a button. Inside
the button, you could use the action-setfield widget(s) to set as many
values as you wanted. You would then click on the button to invoke the
changes. So, 2 clicks/options from the users stand-point. The reason it
takes two steps is because you can't currently use the <$select> widget to
activate the action-setfield widget ... or at least I don't think you can.
Only the button widget can be used to send multiple messages at once.
Good luck!
Mark
On Thursday, November 10, 2016 at 12:02:46 AM UTC-8, The Bo wrote:
>
> Hello,
>
> I'm looking for a way to build a select field (selectwidget) where I can
> change the layout of the wiki.
>
> Until now I use this code:
> <$select tiddler="$:/themes/tiddlywiki/vanilla/metrics/fontsize"
> default="Textsize" tag="input">
>
> <option value='11px'>80%</option>
> <option value='13px'>90%</option>
> <option value='16px'>Textsize</option>
> <option value='18px'>110%</option>
> <option value='20px'>120%</option>
>
>
> Now I want to change more variables (e.G. storywidth, bodylineheight etc.)
> but I want to use only one select field.
>
> I haven't found a solution yet.
>
> Regards,
> The Bo
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/f6189e1e-6cd1-45d6-b86c-e17c96bbcc85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.