In addition to the simple styles represented by the WikiMarkup TextFormattingRules, JSPWiki also allows you to put in your own styles, which are defined in the jspwiki.css file. These may vary from site to site, and it is up to the site administrator to define a style.
CSS styles#
Following styles are supported by the standard jspwiki.css file:
- %%small -- Smaller then normal font, like this
- %%sub -- Subscript, like aij = aji
- %%sup -- Superscript, like 23 = 8
- %%strike -- Strike through text, like this text is hardly readable
- %%ltr -- left-to-right text formatting
- %%rtl -- right-to-left text formatting
- %%commentbox -- comment box floating at the right margin
Special block markers:#
Use %%information ... %% for informational messages
Use %%warning ... %% for warning blocks
Use %%error ... %% for error blocks
Use %%quote ... %% to quote a block of text
Use %%center ... %% to center your text
Dynamic styles#
Dynamic styles provided more advanced styling for your pages, powered by a combination of ~JavaScript and CSS.
They can add substantial visual experience to your wikipages, though the structure of your pages
and wiki markup remain unchanged. Actually, the pages are still fully accessible on browsers with JavaScript turned off.
Most of these styles are only available for v2.5.xx onwards.
- %%collapse -- Turn ordinary lists into collapsible trees. See Collapsible List
- %%collapsebox -- Creates a collapsible box which slides in/out vertically. See Collapsible Box
- %%category -- Generates pop up with pages referenced by the category page. See Category Style
- %%tip -- Generates a transparent fly-over tip with additional info. See Tip Style
- %%graphbar -- Add horizontal or vertical graph bars to your wikipages. See GraphBars
- %%sortable -- Turn ordinary wiki tables into sortable tables. See Sortable Tables
- %%table-filter -- Turn ordinary wiki tables into Excel-like filtered tables. See Filtered Tables
- %%zebra-table -- Add alternate row colors to your tables. See Zebra Table Style
- %%columns -- Format text in multi-column news-paper format. See Multi Columns Style
- %%tabbedSection, %%tab -- Create pages with tabular sections. See Tabbed Sections
- %%tabbedAccordion -- Generates a tabbed section, with smooth transition effects based on accordion. See Accordion Style
- %%accordion -- Generates vertical accordion. See Accordion Style
- %%prettify -- Add code-coloring to a preformatted block of text. See Prettify Sourcecode
- %%slimbox -- Generates a fancy picture viewer for all enclosed links, similar to the attachment viewer. See Slimbox
- %%reflection -- Generates a reflection at the bottom of the image. See Reflection Style
Examples#
%%collapse#
- The pome fruits:
- The stone fruits, drupes of genus Prunus:
- Apricot
- Cherry
- Chokecherry
- Plum
- Peach
%%collapsebox#
Lorem Ipsum
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
If you want a closed box by default, add the snippet-code below at begin of the page
%%add-css
.clpse,xpand{
overflow: hidden;
height: 0px;
}
/%
%%category#
Clicking the
category JSPWikiStyles reveals all pages linking to
JSPWikiStyles
%%tip#
Hover your mouse over the
Lorem ipsum dolor sit amet,
consectetuer adipiscing elit.
Donec dictum velit eget risus.
Fusce ligula.
tip to see the nice tip.
%%graphbar#
Simplest for of GraphBars:
- 20 Apples
- 40 Oranges
- 60 Pairs
See GraphBars for more examples.
%%sortable#
Title | Author | Published | Edition | Some IP@ | Expenses |
book1 | zappy | 25 Feb 2005 | 5 | 100.100.100.100 | €500 |
book2 | happy | 25 Jan 2005 | 19 | 256.100.100.100 | €1500 |
book3 | pappy | 23 Mar 2005 | 06 | 10.100.100.100 | €50 |
book4 | dappy | 21 Apr 2005 | 199 | 1.100.100.100 | €0.500 |
book5 | rappy | 25 Jul 2005 | 017 | 1.100.25.100 | €5500 |
book5 | rappy | 23 Jan 2006 | 017 | 1.100.25.100 | €5500 |
%%table-filter#
Title | Author | Published | Edition | Some IP@ | Expenses |
book1 | zappy | 25 Feb 2005 | 5 | 100.100.100.100 | €500 |
book2 | happy | 25 Jan 2005 | 19 | 256.100.100.100 | €1500 |
book3 | pappy | 23 Mar 2005 | 06 | 10.100.100.100 | €50 |
book4 | dappy | 21 Apr 2005 | 199 | 1.100.100.100 | €0.500 |
book5 | rappy | 25 Jul 2005 | 017 | 1.100.25.100 | €5500 |
%%zebra-table#
column-head1 | column-head2 |
cell-data | cell data |
cell-data | cell data |
cell-data | cell data |
cell-data | cell data |
%%columns#
Lorem Ipsum
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent dapibus odio. Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh.
Nullam Sodales
Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque.
%%tabbedSection, %%tab #
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent dapibus odio. Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque. Cras aliquet nibh sit amet tortor. Nam nunc.
Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque.
Cras aliquet nibh sit amet tortor. Nam nunc.
%%tabbedAccordion#
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent dapibus odio. Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque. Cras aliquet nibh sit amet tortor. Nam nunc.
Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque.
Cras aliquet nibh sit amet tortor. Nam nunc.
%%accordion#
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent dapibus odio. Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque. Cras aliquet nibh sit amet tortor. Nam nunc.
Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque.
Cras aliquet nibh sit amet tortor. Nam nunc.
%%prettify#
/**
* the fibonacci series implemented as an Iterable.
*/
public final class Fibonacci implements Iterable<Integer> {
/** the next and previous members of the series. */
private int a = 1, b = 1;
public Iterator<Integer> iterator() {
return new Iterator<Integer>() {
/** the series is infinite. */
public boolean hasNext() { return true; }
public Integer next() {
int tmp = a;
a += b;
b = tmp;
return a;
}
public void remove() { throw new UnsupportedOperationException(); }
};
}
%%slimbox#
%%reflection#
Category.Documentation