Sylvain,
In https://silvyn.github.io/tw-minstyle/ create a new tiddler with the
below content
.myclass {
background-image: url(<$macrocall $name="datauri" title="$:/favicon.ico"
$output="text/plain"/>);
background-repeat: no-repeat;
height: 400px;
background-position:calc(100% - 20px) calc(100%
Hi Sylvain,
Really smart solution! Bravo!
One usecase is the day/night palette switch, to adjust the color of favicon
and logo as you switch from a day palette to night palette!
It can even be used for all toolbar/page control svgs to be affected on
palette change!
I tagged this thread to
FYI, I used a diversion and thought that maybe I could concatenate the SVG
code by cutting it in 3 :
- the beginning of SVG code
- the part with the hexadecimal code
- At the end of the SVG tag
So thank Mohammad (and Eric) for this :
Hi Tones,
It's not a problem for me, look at my attempt.
I just write the content when user want to change color via config tiddler,
so it's not an issue about loaded.
For the moment with the simple macro I can do it, but it's hard coded.
I would like to make the choice of colour settings.
The main issue maybe is a $:/favicon which is loaded perhaps before any
other logic is occurring.
Are you trying to get the favicon icon to convey information according to
its color? Nice Idea.
Tones
On Thursday, 17 December 2020 at 06:24:08 UTC+11 sil...@gmail.com wrote:
> Hi Jeremy,
>
>
Hi Jeremy,
Thanks but I don't worried about type field (because I use my existing
$:/favicon.ico tiddler, but you're right it's better to be add this).
My concern is about to set color (in the example black) as variable, and
not hard coded in the macro.
Do you have an idea ?
Thanks :)
Le
Hi Sylvain
Just set the type field to indicate that it is an SVG image:
<$button class="" tooltip="Color Favicon" aria-label='Color Favicon'>Add color
to $:/favicon.ico
<$action-setfield $tiddler="$:/favicon.ico" text=<>
type="image/svg+xml"/>
Best wishes
Jeremy
> On 16 Dec 2020,
7 matches
Mail list logo