Link Colors and Header Background

414 views
Skip to first unread message

tralpdy

unread,
Mar 10, 2012, 10:10:01 PM3/10/12
to TiddlyWiki
I am looking for a way to set one color for links to tiddlers that
exist and a different color for links to tiddlers that do not yet
exist; not to be confused with local and remote links. All I have been
able to find is this:

.locLink a { color: #c0c; }
.remLink a { color: #c90; }

But this is not what I want. remLink is not relevant to my purpose and
locLink sets a single color for links both to existing and non
existing tiddlers. I want blue for links to existing tiddlers and red
for links to tiddlers I haven't created yet. The reason for this is
that my links are in the MainMenu and so they all look identical
whether the tiddler tied to the link exists or not; unlike when the
links are in the viewer where the are regular text for existing
tiddlers and italic for non-existing tiddlers. Does anyone know of a
solution to this?

Also, I am trying to figure out why I can't get a background image to
work in the Header. It worked on every other version of TiddlyWiki but
since I have started using 2.6.5 I cannot get it to work. It just
gives a white background.
I removed the grad macro from the pagetemplate and added the <div
class='header' background=url("header.jpg")> to the stylesheet and
that didn't work and then I removed <div class='header'
background=url("header.jpg")> from the stylesheet and tried putting
the [<img[Header.jpg]] link in the sitetitle and then the sitesubtitle
and still no dice. The image is in the same directory as the html file
I am working with. I just can't figure it out. It works with every
other version of TiddlyWiki that I have 2.6.0 and 2.6.2. I just can't
get it to work in 2.6.5. The image file has not moved and has not been
renamed and the extension has not been changed and the format of the
image has not been altered and it is the same image that I used for
the other TiddlyWikis where it worked. I am completely confused. Does
anyone know if something has been changed in the core the would have
broken this functionality?

Thanks everyone

Alex Hough

unread,
Mar 11, 2012, 1:42:05 AM3/11/12
to tiddl...@googlegroups.com
try searching for ".tiddlyLinkExisting"
in StylesheetLayout and SyleSheetColors
then cut and paste the relevant code in StyleSheet

Alex

> --
> You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
> To post to this group, send email to tiddl...@googlegroups.com.
> To unsubscribe from this group, send email to tiddlywiki+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
>

tralpdy

unread,
Mar 11, 2012, 2:23:04 PM3/11/12
to TiddlyWiki
Awesome! Adding the following:

.tiddlyLinkExisting {color:[[ColorPalette::PrimaryDark]];}
.tiddlyLinkNonExisting {color:
[[ColorPalette::SecondaryDark]];}

to my stylesheet did exactly what I was looking for. Thank you Alex!

If could just figure out why I can't get a background image to work in
the header of this new version of TiddlyWiki... It strikes me as
strange that it works in core versions 2.6.0 and 2.6.2 but not 2.6.5

On Mar 10, 11:42 pm, Alex Hough <r.a.ho...@gmail.com> wrote:
> try searching for  ".tiddlyLinkExisting"
> in StylesheetLayout and SyleSheetColors
> then cut and paste the relevant code in StyleSheet
>
> Alex
>

Eric Shulman

unread,
Mar 11, 2012, 2:31:49 PM3/11/12
to TiddlyWiki
> I removed the grad macro from the pagetemplate and added the <div
> class='header' background=url("header.jpg")> to the stylesheet and
> that didn't work

PageTemplate uses HTML syntax (with TW enhancements)
StyleSheet uses CSS syntax

Thus, in PageTemplate you can write:
<div class='header'>
and in StyleSheet:
.header { background: url("header.jpg"); }

Alternatively, if you don't want to modify the StyleSheet, you can
write the CSS inline within the PageTemplate HTML, like this:
<div class='header' style='background: url("header.jpg")'>

enjoy,
-e
Eric Shulman
TWClassic CoreDev / TiddlyTools / ELS Design Studios

----
WAS THIS ANSWER HELPFUL? IF SO, PLEASE MAKE A DONATION
http://www.TiddlyTools.com/#Donations
note: donations are directly used to pay for food, rent,
gas, net connection, etc., so please give generously and often!

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact

Alex Hough

unread,
Mar 12, 2012, 3:16:52 AM3/12/12
to tiddl...@googlegroups.com
If this were happening to me, i'd try using an online image (copy and
paste location) with Eric's suggestion. I often find my local images
are not where I think they are, sometimes type there names wrongly.

Out of curiosity, I just tried using Eric's method on a fresh TW,
attached is a TW with the background url in header.

It works!

Alex

empty.html

tralpdy

unread,
Mar 13, 2012, 3:33:26 PM3/13/12
to TiddlyWiki
Ah, style= was what I was missing in my code along with the single
quotes. Thank you for your help Eric, it works beautifully!
Reply all
Reply to author
Forward
0 new messages