Presenting: LinkStyle - give your links styyyyyle!

141 views
Skip to first unread message

Mat

unread,
Jul 12, 2019, 6:09:00 PM7/12/19
to tiddl...@googlegroups.com
...so just after I, the TWaddler, shot this spontaneous selfie I realized my links must reflect more of my essence....



so I made 


It is a small stylesheet to make a link have a certain style wherever it appears.

<:-)

TonyM

unread,
Jul 12, 2019, 9:11:22 PM7/12/19
to TiddlyWiki
Mat,

This looks fantastic, the link however opens on the non existing tiddler "[[Not at all titled About!]]"

These css only solutions are great.

My mind now asks How could I use this to indicate new tiddlers, tiddlers in local storage etc.. ?
  • Perhaps you could extend its use to be practical in a view template tiddler, where we can programmatically apply this to titles.
  • It would also be dreamy if I could get it to apply based on other field values eg: object-type=project use your example with the word project (even if done in view template)
Regards
Tony

On Saturday, July 13, 2019 at 8:09:00 AM UTC+10, Mat wrote:
...so just after I, the TWaddler, shot this spontaneous selfie I realized my links must reflect more of my essence....



so I made 


It is a small template to make a link have a certain style wherever it appears.

<:-)

TonyM

unread,
Jul 12, 2019, 9:31:08 PM7/12/19
to TiddlyWiki
Mat,

  • Is there a way to apply this to only the title?
I managed to get it into the view template with little effort

Significant other praise
  • I like your method of using the view template to turn the content of fields into variables.
    • I wonder if we could use fields[] to do this for them all (or at least selected) fields
    • Perhaps even reformat a date field
  • It would be nice if something this could wrap the tiddler text content, so we can use them in the tiddler.
    • I will experiment. 
Regards
Tony

Mohammad

unread,
Jul 12, 2019, 10:36:31 PM7/12/19
to TiddlyWiki
Nice addition!
Added to TW-Scripts


On Saturday, July 13, 2019 at 2:39:00 AM UTC+4:30, Mat wrote:
...so just after I, the TWaddler, shot this spontaneous selfie I realized my links must reflect more of my essence....



so I made 


It is a small template to make a link have a certain style wherever it appears.

<:-)

Mat

unread,
Jul 13, 2019, 5:22:42 AM7/13/19
to TiddlyWiki
Thanks guys!

Tony, I corrected the faulty link
  • Perhaps you could extend its use to be practical in a view template tiddler, where we can programmatically apply this to titles.
It is already a viewtemplate tiddler but yeah, one could imagine it shows the 10 newest tiddlers. Maybe it could look at the "imported" list and have those titles higlighted. (currently, imported tiddlers "disappear in the crowd" and there is no way to tell which ones were just imported).
 
  • It would also be dreamy if I could get it to apply based on other field values eg: object-type=project use your example with the word project (even if done in view template)

As you can see, it is a conditional viewtemplate so you'd just have to add that condition to the filter. Or do I misunderstand you point?

<:-)

Mat

unread,
Jul 13, 2019, 6:08:38 AM7/13/19
to TiddlyWiki
TonyM wrote:
  • Is there a way to apply this to only the title?
You mean the title only as seen in the tiddler head? You'd just restrict it by targetting .tc-titlebar or whatever the class is.

I am actually working on another variant but I don't get it to work properly; LinkAlias This hides the title link where it appears and only shows the :before attribute with content fetched from the alias field. I.e it "exchanges" the title for an alias. It is simple to have it work for only the tiddler title but to have it work for every place where the title appears is problematic as you can see in the link. The technique to hide the original name can, as far as I know, ony be achieved with visibility:hidden or font-size:0 ....but this of course also affects the :before style (i.e the alias) so this has unintended consequences.

<:-)

passingby

unread,
Jul 13, 2019, 8:19:19 AM7/13/19
to TiddlyWiki
Looks good.
When I try to display a link to [[About]] in a separate tiddler, it display it as colored *only* when [[About]] tiddler is open in story river. On closing it the link to it goes back to normal.

Mat

unread,
Jul 13, 2019, 8:54:08 AM7/13/19
to TiddlyWiki
passingby wrote:
When I try to display a link to [[About]] in a separate tiddler, it display it as colored *only* when [[About]] tiddler is open in story river. On closing it the link to it goes back to normal.

Darn! What a beginners mistake. It is a template for the tiddler, not a stylesheet so you are absolutely right. I need to think a bit.

<:-)

Mat

unread,
Jul 13, 2019, 9:03:32 AM7/13/19
to TiddlyWiki
Updated

I just converted it into a Stylesheet

<:-)

David Gifford

unread,
Jul 13, 2019, 10:09:23 PM7/13/19
to TiddlyWiki
Added to the toolmap

passingby

unread,
Jul 14, 2019, 12:49:40 AM7/14/19
to TiddlyWiki
Great! 
The color is over ridden in the sidebar, can that be fixed too?

Mat

unread,
Jul 14, 2019, 5:11:01 AM7/14/19
to TiddlyWiki
passingby wrote:
The color is over ridden in the sidebar, can that be fixed too?



And thanks David for adding.

<:-)

passingby

unread,
Jul 14, 2019, 10:54:24 AM7/14/19
to TiddlyWiki
Cool! Thanks!

Its not happening fully correctly in my own tiddlywiki because of a stylesheet clash. I am using 2 tiddlers of styling from NoteSlam. They are overriding the link colors and the spacing of before and after content. The color and content of the before and after are being implemented alright. But I ll look more into it later.

BUT, its a great job. Thanks Mat!
Reply all
Reply to author
Forward
0 new messages