> > Fun little task. > You might want some additional style tweaking but here's how you can do it: > > \define rating() Rating <span style="background-color:$(color)$">{{!! > rating}}</span> > > <$list filter="[{!!rating}compare:integer:gt[70]then[green]] > ~[{!!rating}compare:integer:gt[50]then[grey]] ~[[red]]" variable=color> > <<rating>> > </$list> > > Hmmm.... soooo... do I get it right, that in order not to type all that "list" thing each time I need to make 2 macros? 1st would be kinda "technical" macro <<rating-style>> \define rating-style() <span style="font-size: 1.2em; font-weight: 500; color:$(color)$">{{!!rating}}</span>
and the second marco, smth like <<rating>>: \define rating() <$list filter="[{!!rating}compare:integer:gt[70]then[green]] ~[{!!rating}compare:integer:gt[50]then[grey]] ~[[red]]" variable=color> <<rating-style>> </$list> \end and the usage like: Rating (or whatever text): <<rating>>? -- 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 tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/95a1f688-60f5-4ba4-8e23-14517864bd67o%40googlegroups.com.