How to add CSS to Skeeve's newtiddler button

150 views
Skip to first unread message

David Gifford

unread,
Apr 24, 2014, 5:02:52 PM4/24/14
to tiddl...@googlegroups.com
Hi all

I am finally understanding the newtiddler widget Stephan (Skeeve) made, and have created a working set of buttons that act like the newhereplugin in TWC.

The only missing piece is the CSS. Below you will find the contents of my tiddler. How do I add a class to the three resulting buttons? I know what CSS I need to add to the StyleSheet. I just need to know where in this code below do I put the class, and what exactly to write. I tried 20 different possibilities to no avail.

-----

\define get_title(l)
$l$$(title)$]]
\end

<$set name="title" value={{!!title}}>
<$set name="tags" value=<<get_title "[[">>>
<$newtiddler title="your title here" skeleton="$:/aa/ScrollableNoteTemplate">{{ noteicon.png }}</$newtiddler>
</$set>
</$set>

<$set name="title" value={{!!title}}>
<$set name="tags" value=<<get_title "[[">>>
<$newtiddler title="your title here" skeleton="$:/aa/ScrollableIndexTemplate">{{ indexicon.png }}</$newtiddler>
</$set>
</$set>

<$set name="title" value={{!!title}}>
<$set name="tags" value=<<get_title "[[">>>
<$newtiddler title="your title here" skeleton="$:/aa/ScrollableGalleryTemplate">{{ notelisticon.png }}</$newtiddler>
</$set>
</$set>

David Gifford

unread,
Apr 24, 2014, 5:11:50 PM4/24/14
to tiddl...@googlegroups.com
One additional question:

If I wanted to add this tiddler to the ViewToolbar, how would that change the way I added the CSS?

Matabele

unread,
Apr 25, 2014, 1:40:06 AM4/25/14
to tiddl...@googlegroups.com
Hi

Not exactly what you were looking for, but have you considered using font awesome icons for your buttons? 

In place of the .png image are placed the desired fontawesome class: <i class="fa fa-suitable-icon  various css styles"></i> There are a selection of styles which may be applied to the basic icon.

regards

Birthe C

unread,
Apr 25, 2014, 4:39:56 AM4/25/14
to tiddl...@googlegroups.com
Hi Matabele
I agree, font awesome icons look good. I have often wondered though, why they are not showing at http://wills.tiddlyspot.com/. At first I just saw some very strange hieroglyphs, but now it is all numbers???
I know I should be able to see your icons in my browser, as I use font awesome myself.

Birthe

David Gifford

unread,
Apr 25, 2014, 6:28:22 AM4/25/14
to tiddl...@googlegroups.com
Yeah, I don't see them there either on your site.


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/7-_RBjoZh04/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
David Gifford
Christian Reformed World Missions, Mexico City

Birthe C

unread,
Apr 25, 2014, 7:06:53 AM4/25/14
to tiddl...@googlegroups.com
Hi David Gifford
I got the stylesheet I use from http://blog.jeffreykishner.com/2014/01/23/how-to-incorporate-font-awesome-icons-into-tiddlywiki-5.html . I used the link http://pastebin.com/BaKyuCuv copied and pasted the content.

Birthe


On Friday, April 25, 2014 12:28:22 PM UTC+2, David Gifford wrote:
Yeah, I don't see them there either on your site

David Gifford

unread,
Apr 25, 2014, 7:11:19 AM4/25/14
to tiddl...@googlegroups.com
Hi yes I just  consulted his site and tried it. Mine come out like the ones in the website link, a square with four odd characters in it. Something is wrong. Maybe Font Awesome updated and made an incompatible change? I need something more stable and less dependent on other software.


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/7-_RBjoZh04/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--

Birthe C

unread,
Apr 25, 2014, 7:42:17 AM4/25/14
to tiddl...@googlegroups.com
I am not sure I understood. I am not able to try it our as I do not have your templates og icons, but as an example try:

\define get_title(l)
$l$$
(title)$]]
\end


<$set name="title" value={{!!title}}>
<$set name="tags" value=<<get_title "[[">>>
<$newtiddler class="btn-invisible" title="your title here" skeleton="$:/aa/ScrollableNoteTemplate" edit="yes">{{ noteicon.png}}</$newtiddler>
</$set>
</
$set>

Birthe

Matabele

unread,
Apr 25, 2014, 8:31:04 AM4/25/14
to tiddl...@googlegroups.com
Hi

The standard way of including Font Awesome on a website is to link the stylesheet to a font server:

Alternatively, the fonts can be served up locally (for example on a node.js installation) -- the links at the top of the stylesheet must be edited accordingly.

I, however, wished the fonts to work standalone and offline -- I downloaded the fonts and installed them into my system as a font set. Thereafter the fonts work provided the relevant css styles (you need retain only those styles you have used) are included in a stylesheet:

Don't know if this suits your purpose. If you are looking for a solution that does not involve installing fontawesome, static copies of the icons can be extracted from the font set once prototyping is complete. 

regards

David Gifford

unread,
Apr 25, 2014, 8:33:08 AM4/25/14
to tiddl...@googlegroups.com
​Thanks Matabele. I actually just discovered the problem I was  having before. I was using pngs instead of svgs, and they behave quite differently. I just downloaded a few free svgs from Flaticon and have added them to tiddlers and am going to use those.


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/7-_RBjoZh04/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Matabele

unread,
Apr 25, 2014, 8:50:05 AM4/25/14
to tiddl...@googlegroups.com
Hi

The fontawesome icons are available from flaticon:

regards
Reply all
Reply to author
Forward
0 new messages