Forgive me in advance if I seem to be rambling, I have several questions 
today, but I think they are all tied together.


I stumbled upon tw5gray <http://tw5gray.tiddlyspot.com/>, a 2-3 -year-old 
TW (5.0.5 beta) the other day and was intrigued by the author's method of 
setting colors, etc through the use of (transcluding? (I've still not 
wrapped my head around that whole area of TW, yet)) values into other, 
individual tiddlers. I've since discovered that this is apparently the 
common practice that Jeremy uses to change some of the settings through the 
stock Control Panel (but it still looks like Black Magic to me :) ). *(As 
an aside, the thought occurred to me that this might be the ideal way to 
construct a Theme Constructor (for lack of a better name), whereby all the 
little nit-picking aspects of the interface could be displayed and 
changed?)*


The author has several *$:/themes/grayeul/etch/???* tiddlers, each with 
values for different parts of the interface, *base*, *colourmappings*, 
*colours*, *settings* and *tooltips.* I took just the *colours* tiddler and 
recreated it in my TW for testing:


{
  "primary": "#000000",
  "background": "#fff",
  "foreground": "#333",
  "pagebackground": "#ececec",
  "medium": "#bbb",
  "hoverbut": "blue"
}



The changes are made through a *$:/ControlPanel/ThemeTweaks* tiddler which 
contains what looked to be very simple *<edit-text>* entries:


! Base Colours

* Primary colour: <$edit-text
    tiddler="$:/themes/grayeul/etch/colours"
    index="primary"
    type="color"
    default=""
    tag="input"/>
* Background colour: <$edit-text
    tiddler="$:/themes/grayeul/etch/colours"
    index="background"
    type="color"
    default=""
    tag="input"/>
* Foreground colour: <$edit-text
    tiddler="$:/themes/grayeul/etch/colours"
    index="foreground"
    type="color"
    default=""
    tag="input"/>
* Page background colour: <$edit-text
    tiddler="$:/themes/grayeul/etch/colours"
    index="pagebackground"
    type="color"
    default=""
    tag="input"/>
* Medium contrast color: <$edit-text
    tiddler="$:/themes/grayeul/etch/colours"
    index="medium"
    type="color"
    default=""
    tag="input"/>


I tried substituting the original settings with some simple CSS settings of 
my own, from my Stylesheet tiddler and pointing the 
*$:/ControlPanel/ThemeTweaks* output to be my Stylesheet tiddler, thinking 
it would/could overwrite parts of the original. Well, it worked, after a 
fashion: the new data was indeed written into the Stylesheet tiddler, but 
at the cost of overwriting *everything else* that it originally contained! 
Every time I made a single change, the new data entry just wiped out 
whatever was in the tiddler to begin with and the new Stylesheet file had 
only one line, the last one I had edited...


I went back and looked at the structure of the 
*$:/themes/grayeul/etch/colours* file and saw that items were enclosed in 
quotation marks, denoting some sort of a structured index, but try as I 
might, I cannot decipher it enough to add my own values, especially the one 
I'm most interested in right now, the *background* property.


If I leave it intact as the author created it, it seems to work fine, 
allowing me to change any/all of the six entries that are in it. I just 
cannot add any of my own.


This is for a movie database of sorts that I'm working on. Each tiddler is 
a different movie, with synopsis, screenshots, posters/dvd covers, etc. 
Today I would like to accomplish two things:

   - Have a pre-selected screenshot come up as the background image for the 
   page whenever the tiddler is opened;
   - Also have a drop-down list available (perhaps in the SideBar) with 
   links to external graphics (the pre-selected screenshots from all/most of 
   the movies, listed as the movie's title) that the user can choose from and 
   it will immediately become the background image of the page.

Please tell me that there is a way to 'inject' the background image 
declaration into either the Stylesheet tiddler, or if worst comes to worst, 
I can create stylesheet-tagged tiddlers –one for each screenshot that I 
want to use as a page background– with a link to the external screenshot, 
as long as they will override whatever background might have been on the 
page before.

-- 
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/44e455b8-e868-42d1-845e-7037391f733c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to