Changes between Version 4 and Version 5 of TopMacro


Ignore:
Timestamp:
Dec 22, 2008, 2:05:25 AM (6 years ago)
Author:
dwclifton
Comment:

Version 1.1 code and documentation

Legend:

Unmodified
Added
Removed
Modified
  • TopMacro

    v4 v5  
    44
    55TopMacro is exceedingly simple, like all good software ;-). In a nutshell, it
    6 does exactly what you think it would, inserts a "top of page" link in your Wiki
    7 page. The only option is a string that is inserted into the content of the markup.
    8 This defaults to a single circumflex "!^" character (more commonly known as a caret),
     6does exactly what you'd expect, inserts a "top of page" link in your Wiki page.
     7The only option is a string that is inserted into the content of the markup. This
     8defaults to a single circumflex "!^" character (more commonly known as a caret),
    99surrounded by square brackets. The anchor element returned includes a "Top of Page"
    10 title attribute so the user knows its purpose, and a "topofpage" class so the Wiki
    11 author may style it in any way they please.
     10title attribute so the user knows its purpose, and a "topofpage" class so the
     11Wiki author may apply their preferred style rules.
    1212
    1313{{{
    14 [[Top]] becomes:
     14[[Top]] returns:
    1515
    16 [<span class="topofpage"><a href="#" title="Top of page">^</a></span>]
     16[<a class="topofpage" href="#" title="Top of page">^</a>]
    1717}}}
    1818
     
    4343
    4444If you like the caret, but prefer to omit the brackets and style the link yourself
    45 with CSS, try this:
     45with CSS, try something like this:
     46
     47{{{
     48a.topofpage {
     49  display: block;
     50  height: 11px;
     51  width: 11px;
     52  font-family: 'BitStream Vera Sans',Verdana,Arial,Helvetica,sans-serif;
     53  font-weight: bold;
     54  text-decoration: none;
     55  background-color: #eaeaea;
     56  color: #e9611c;
     57  padding: 1px 2px 2px;
     58  border: 1px solid #c6c7db;
     59  margin-left: -6px;
     60}
     61a.topofpage:hover {
     62  border-color: #000;
     63  background-color: #777;
     64  color: #fc3;
     65}
     66}}}
    4667
    4768{{{
    4869[[Top(^)]]
    49 }}}
    50 
    51 {{{
    52 .topofpage {
    53   background-color: #eaeaea;
    54   color: #eff5f16;
    55   padding: 2px 4px 0;
    56   border: 1px solid #c6c7db;
    57 }
    5870}}}
    5971
     
    115127== Author/Contributors ==
    116128
    117 '''Author:''' [wiki:dwclifton] [[BR]]
    118 '''Contributors:''' The Python/Trac development community.
     129 * '''Author:''' [wiki:dwclifton]
     130 * '''Contributors:''' The Python/Trac development community.