Coloring links
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:
<source lang=html4strict>
<a href="http://cyber.law.harvard.edu/" rel="me home" class="external">Berkman</a>
</source>
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:
<source lang=html4strict>
<a href="http://cyber.law.harvard.edu/" rel="me home" class="external class1 class2">Berkman</a>
</source>
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:
<source lang=html4strict>
<a href="http://cyber.law.harvard.edu/" rel="me home">Berkman</a>
</source>
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.
- This((.link_red)) is a link in red.
[http://www.google.com/ This((.link_green))] is a link in green.
- This((.link_green)) is a link in green.
[http://www.google.com/ This((.link_blue))] is a link in blue.
- This((.link_blue)) is a link in blue.
[http://www.google.com/ This((.link_yellow))] is a link in yellow.
- This((.link_yellow)) is a link in yellow.
[http://cyber.law.harvard.edu/cfl/Main_Page This((.link_green))] is a green link.
- This((.link_green)) is a green link.