background change in click of button

89 views
Skip to first unread message

Tzela Yaish

unread,
Feb 19, 2021, 1:10:43 PM2/19/21
to TiddlyWiki
Hello all, 
I do have a button to change from dark mode to light mode.
on the light mode I do have a background picture that has the logo of my company.
on dark mode though, I want my background to be dark and have different logo.

I'm new to this and I need some help.
How do I change the background picture when I click the dark mode button ?

Thank you !

jc-ose

unread,
Feb 26, 2021, 12:12:42 PM2/26/21
to TiddlyWiki
You could do this with something like the following:

<$button>
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" text="name_of_your_image_tiddler" />
<$action-setfield $tiddler="$:/palette" text="$:/palettes/Vanilla" />
Light Mode
</$button>

<$button>
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" text="" />
<$action-setfield $tiddler="$:/palette" text=" $:/palettes/SpartanNight" />
Dark Mode
</$button>

Modify as necessary. 

Tzela Yaish

unread,
Apr 1, 2021, 2:10:30 PM4/1/21
to TiddlyWiki
Thank you that is awesome ! how to I make that button show up on the top taskbar along with the homebutton, search, etc? thanx
Reply all
Reply to author
Forward
0 new messages