Coloring links: Difference between revisions

From Copyright for Librarians
Jump to navigation Jump to search
(updated formatting)
 
(No difference)

Latest revision as of 16:15, 23 February 2010

This wiki supports the rel, rev and class attributes on links.

The syntax is a little unorthodox but is set using the following:

rel attribute

To set the rel attribute, place one or more tokens in double-parentheses at the end of the link title. e.g.:

[http://cyber.law.harvard.edu/ Berkman((me home))]

The above would be converted to the following link:

<a href="http://cyber.law.harvard.edu/" rel="me home" class="external">Berkman</a>

class attribute

To set the class attribute, the same syntax is used, but tokens which represent classes are prefixed with a dot:

[http://cyber.law.harvard.edu/ Berkman((me .class1 home .class2))]

Becomes:

<a href="http://cyber.law.harvard.edu/" rel="me home" class="external class1 class2">Berkman</a>

rev attrribute

Similar to the class attribute, prefixing with a tilde (~) sets the rev attribute.

removing attributes

Tokens may be prefixed by a minus sign (-) to indicate that you don't want to add the token, but remove it. For example:

[http://cyber.law.harvard.edu/ Berkman((me -.external home))]

Becomes:

<a href="http://cyber.law.harvard.edu/" rel="me home">Berkman</a>

caveats

Colorization of links only works on external links for the moment so internal wiki links in the form of:

[[Internal_Page|Link]]

will not work - these will need to be converted to external links in the form of:

[http://hostname.domainname.tld/Internal_Page Link((.class))]

examples

[http://www.google.com/ This((.link_red))] is a link in red.
[http://www.google.com/ This((.link_green))] is a link in green.
[http://www.google.com/ This((.link_blue))] is a link in blue.
[http://www.google.com/ This((.link_yellow))] is a link in yellow.


[http://cyber.law.harvard.edu/cfl/Main_Page This((.link_green))] is a green link.