Changes between Version 17 and Version 18 of TopMacro


Ignore:
Timestamp:
Jul 23, 2015, 8:53:07 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes, tagged as external

Legend:

Unmodified
Added
Removed
Modified
  • TopMacro

    v17 v18  
    11[[PageOutline(2-5,Contents,pullout)]]
    2 = Top of page Macro =
    32
    4 == Description ==
     3= Top of page Macro
    54
    6 TopMacro is exceedingly simple, like all good software ;-). In a nutshell, it
    7 does exactly what you'd expect, inserts a "top of page" link in your Wiki page.
    8 The only option is a string that is inserted into the content of the markup. This
    9 defaults to a single circumflex "!^" character (more commonly known as a caret),
    10 surrounded by square brackets. The anchor element returned includes a "Top of Page"
    11 title attribute so the user knows its purpose, and a "topofpage" class so the
    12 Wiki author may apply their preferred style rules.
     5== Description
     6
     7This macro inserts a "top of page" link in your Trac wiki page. The only option is a string that is inserted into the content of the markup. This defaults to a single circumflex "!^" character (more commonly known as a caret), surrounded by square brackets. The anchor element returned includes a "Top of Page" title attribute so the user knows its purpose, and a "topofpage" class so the Wiki author may apply their preferred style rules.
    138
    149{{{
     
    2924Resulting in this:
    3025
    31 {{{
    32 #!html
     26{{{#!html
    3327[<a href="#" title="Top of page">^</a>]
    3428}}}
    3529
    36 But who wants to do all that typing?
     30Note that the brackets do not form part of the anchor itself. This is a personal preference. If you pass a string to the [http://github.com/dwclifton/tractopmacro/tree/master/0.11/top/macro.py#path macro] they are omitted.
    3731
    38 That's what [http://en.wikipedia.org/wiki/Macro_(computer_science) macros] are for
    39 after all. Note that the brackets do not form part of the anchor itself. This is a
    40 personal preference. If you pass a string to the [http://github.com/dwclifton/tractopmacro/tree/master/0.11/top/macro.py#path macro]
    41 they are omitted.
    42 
    43 == Styling ==
     32=== Styling
    4433
    4534If you like the caret, but prefer to omit the brackets and style the link yourself
    4635with CSS, try something like this:
    4736
    48 {{{
     37{{{#!css
    4938a.topofpage {
    5039  display: block;
     
    6756}}}
    6857
    69 '''Note''': If you're going to style the anchor like this you should really pass an argument
    70 to the macro or you'll end up with the default brackets in addition to the styling.
     58'''Note''': If you're going to style the anchor like this you should also pass an argument to the macro or you'll end up with the default brackets in addition to the styling.
    7159
    72 == Behavior ==
     60=== Behavior
    7361
    74 If you want to get really fancy you can use jQuery to create a smooth scrolling effect when
    75 the link is clicked. In your site.html template add:
     62If you want to get really fancy you can use jQuery to create a smooth scrolling effect when the link is clicked. In your site.html template add:
    7663
    77 {{{
     64{{{#!html
    7865<html xmlns="http://www.w3.org/1999/xhtml"
    7966      xmlns:py="http://genshi.edgewall.org/" py:strip="">
     
    9279}}}
    9380
    94 '''Note''': Returning false from the lambda, or anonymous, function prevents the browser
    95 from kicking in it's own event model.However, it degrades nicely and still works even if
    96 the user has !JavaScript disabled.
     81'''Note''': Returning false from the lambda, or anonymous, function prevents the browser from kicking in it's own event model. However, it degrades nicely and still works even if the user has !JavaScript disabled.
    9782
    98 == Installation ==
     83== Bugs/Feature Requests
    9984
    100 Download the zipped source from [raw-attachment:topmacro.zip here] or
    101 clone the repository (see [#Source below]) from !GitHub to a location on your local drive.
    102 Unzip the archive to a temporary location, visit the [http://github.com/dwclifton/tractopmacro/tree/master/0.11 0.11]
    103 directory and run:
     85Existing bugs and feature requests for TopMacro are [query:status!=closed&component=TopMacro&order=priority here].
    10486
    105 {{{
     87If you have any issues, create a [/newticket?component=TopMacro new ticket].
     88
     89[[TicketQuery(component=TopMacro&group=type,format=progress)]]
     90
     91== Installation
     92
     93Download the zipped source from [raw-attachment:topmacro.zip here] or clone the repository (see [#Source below]) from !GitHub to a location on your local drive.
     94Unzip the archive to a temporary location, visit the [http://github.com/dwclifton/tractopmacro/tree/master/0.11 0.11] directory and run:
     95
     96{{{#!sh
    10697python setup.py bdist_egg
    10798cp dist/*.egg /trac/env/Project/plugins
    10899}}}
    109100
    110 == Configuration ==
     101== Configuration
    111102
    112 Enable the macro in:
     103Enable the macro in `/trac/env/Project/conf/trac.ini`:
    113104
    114 /trac/env/Project/conf/trac.ini:
    115 
    116 {{{
     105{{{#!ini
    117106[components]
    118107top.* = enabled
     
    121110You may need to restart your Web server.
    122111
    123 == Examples ==
     112== Examples
    124113
    125114{{{
     
    130119}}}
    131120
    132 == Source ==
     121== Source
    133122
    134123 * Browse the source at: [http://github.com/dwclifton/tractopmacro/tree/master/0.11 GitHub].
     
    138127}}}
    139128
    140 == Bugs/Feature Requests ==
    141 
    142 Existing bugs and feature requests for TopMacro are [query:status!=closed&component=TopMacro&order=priority here].
    143 
    144 If you have any issues, create a [/newticket?component=TopMacro&owner=dwclifton new ticket].
    145 
    146 == Recent Changes ==
     129== Recent Changes
    147130
    148131[[ChangeLog(topmacro, 3)]]
    149132
    150 == Author/Contributors ==
     133== Author/Contributors
    151134
    152  * '''Author:''' [wiki:dwclifton]
    153  * '''Maintainer:''' [wiki:dwclifton]
    154  * '''Contributors:'''
     135'''Author:''' [wiki:dwclifton] [[BR]]
     136'''Maintainer:''' [[Maintainer]] [[BR]]
     137'''Contributors:'''