add underlay files for listdirectives
[ikiwiki] / underlays / basewiki / directive / calendar.mdwn
1 The `calendar` directive is supplied by the [[!iki plugins/calendar]] plugin.
2
3 This directive displays a calendar, similar to the typical calendars shown on
4 some blogs.
5
6 # examples
7
8         \[[!calendar ]]
9
10         \[[!calendar type="month" pages="blog/* and !*/Discussion"]]
11
12         \[[!calendar type="year" year="2005" pages="blog/* and !*/Discussion"]]
13
14 This plugin is inspired by the calendar plugin for Blosxom, but
15 derives no code from it. This plugin is essentially a fancy front end
16 to archives of previous pages, usually used for blogs. It can produce
17 a calendar for a given month, or a list of months for a given year.
18
19 This plugin requires extra setup.  See the plugin documentation for details.
20
21 ## usage
22
23 * `type` - Used to specify the type of calendar wanted. Can be one of
24   "month" or "year". The default is a month view calendar.
25 * `pages` - Specifies the [[ikiwiki/PageSpec]] of pages to link to from the
26   month calendar. Defaults to "*".
27 * `archivebase` - Configures the base of the archives hierarchy. The
28   default is "archives". Note that this default can also be overridden
29   for the whole wiki by setting `archivebase` in ikiwiki's setup file.
30 * `year` - The year for which the calendar is requested. Defaults to the
31   current year.
32 * `month` - The numeric month for which the calendar is requested, in the
33   range 1..12. Used only for the month view calendar, and defaults to the
34   current month.
35 * `week_start_day` - A number, in the range 0..6, which represents the day
36   of the week that the month calendar starts with. 0 is Sunday, 1 is Monday,
37   and so on. Defaults to 0, which is Sunday.
38 * `months_per_row` - In the annual calendar, number of months to place in
39   each row. Defaults to 3.
40
41 ## CSS
42
43 The output is liberally sprinkled with classes, for fine grained CSS
44 customization.
45
46 * `month-calendar` - The month calendar as a whole.
47 * `month-calendar-head` - The head of the month calendar (ie,"March").
48 * `month-calendar-day-head` - A column head in the month calendar (ie, a
49   day-of-week abbreviation).
50 * `month-calendar-day-noday`, `month-calendar-day-link`, 
51   `month-calendar-day-nolink`, `month-calendar-day-future`,
52   `month-calendar-day-this-day` - The day squares on the month calendar,
53   for days that are not in the month (before or after the month itself), that
54   don't have links, that do have links, that are in the future, or are that
55   are the current day, respectively.
56 * `Sunday`, `Monday`, `Tuesday`, ... - Each day square is also given a class
57   matching its  (localised) day of week, this can be used to highlight
58   weekends.
59 * `year-calendar` - The year calendar as a whole.
60 * `year-calendar-head` - The head of the year calendar (ie, "2007").
61 * `year-calendar-subhead` - For example, "Months".
62 * `year-calendar-month-link`, `year-calendar-month-nolink`,
63   `year-calendar-month-future`, `year-calendar-this-month` - The month
64   squares on the year calendar, for months with stories,
65   without, in the future, and currently selected, respectively.