aboutsummaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorLouis <spalax@gresille.org>2014-07-03 22:21:38 +0200
committerLouis <spalax@gresille.org>2014-07-17 12:28:42 +0200
commitc7b637471fdd75f64415728690c012da52017f61 (patch)
treece895548bc10ac473d7738db7730dac1ccaf1e3c /doc/plugins
parentf15ecfcf32a4f8973bbfcc8af8d6e4e22fabdbfd (diff)
downloadikiwiki-c7b637471fdd75f64415728690c012da52017f61.tar
ikiwiki-c7b637471fdd75f64415728690c012da52017f61.tar.gz
Improvement of documentation of my plugins
- typos - examples - rendering - explanation - update - etc.
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/contrib/addtag.mdwn1
-rw-r--r--doc/plugins/contrib/created_in_future.mdwn1
-rw-r--r--doc/plugins/contrib/datetime_cmp.mdwn3
-rw-r--r--doc/plugins/contrib/jscalendar.mdwn25
-rw-r--r--doc/plugins/contrib/monthcalendar.mdwn106
-rw-r--r--doc/plugins/contrib/parenttag.mdwn1
-rw-r--r--doc/plugins/contrib/poetry.mdwn12
-rw-r--r--doc/plugins/contrib/sidebar2.mdwn5
-rw-r--r--doc/plugins/contrib/taskreport.mdwn1
9 files changed, 138 insertions, 17 deletions
diff --git a/doc/plugins/contrib/addtag.mdwn b/doc/plugins/contrib/addtag.mdwn
index ed57202d8..5b9461d28 100644
--- a/doc/plugins/contrib/addtag.mdwn
+++ b/doc/plugins/contrib/addtag.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=addtag author="[[Louis|spalax]]"]]
[[!tag type/widget]]
diff --git a/doc/plugins/contrib/created_in_future.mdwn b/doc/plugins/contrib/created_in_future.mdwn
index 09d2d52fc..95793e12a 100644
--- a/doc/plugins/contrib/created_in_future.mdwn
+++ b/doc/plugins/contrib/created_in_future.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name="created_in_future (deprecated)" author="[[Louis|spalax]]"]]
# Created_in_future
diff --git a/doc/plugins/contrib/datetime_cmp.mdwn b/doc/plugins/contrib/datetime_cmp.mdwn
index 7508e0b21..ba35b37c6 100644
--- a/doc/plugins/contrib/datetime_cmp.mdwn
+++ b/doc/plugins/contrib/datetime_cmp.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=datetime_cmp author="[[Louis|spalax]]"]]
[[!tag type/pagespec]]
@@ -36,7 +37,7 @@ where:
* `page`: other page (given in argument);
* `now`: date or time of compilation;
* `today`: same meaning as `now`.
- * `(|_delta)`: used to add a time delta (to use comparisons such as *created at least two day after `some_page`*):
+ * `(|_delta)`: used to add a time delta (to use comparisons such as *created at least two days after `some_page`*):
* *empty*: no delta;
* `_delta`: delta (given in argument).
diff --git a/doc/plugins/contrib/jscalendar.mdwn b/doc/plugins/contrib/jscalendar.mdwn
index 794e4bd9c..8123b3132 100644
--- a/doc/plugins/contrib/jscalendar.mdwn
+++ b/doc/plugins/contrib/jscalendar.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=jscalendar author="[[Louis|spalax]]"]]
# Jscalendar
@@ -12,33 +13,37 @@ Here are some differences compared to this latter plugin.
* No need to rebuild the page containing the calendar each time day changes, or
a page (indexed by the calendar) is added, changed or deleted. This is
particularly useful if you want to have this calendar in the sidebar.
- * Handles the case where several pages appear the same day: a popup appear to let user choose the day he wants.
* Smooth navigation among months.
-* Neutral
- * Most of options are defined in Ikiwiki's setup files instead of the options
- of the directive.
* Cons
- * As a consequence, every calendar of the wiki must index the same set of pages.
* Javascript :( .
## Usage
-### Directive
+### Examples of directive
\[[!jscalendar type="month" ]]
+ \[[!jscalendar type="month" archivebase="calendar"]]
+
+ \[[!jscalendar type="month" year=2014 month=08 pages="posts/* and !posts/*"]]
+
+ \[[!jscalendar type="month" year=-1 month=08]]
+
### Setup file
-It being javascript rather than markdown, most of the configuration must be done in the IkiWiki configuration file rather than in the directive
+This plugin uses the options used by the [[plugins/calendar]] plugin:
- 'archivebase' => "evenements/calendrier",
- 'archive_pagespec' => "evenements/liste/* and ! evenements/liste/*/*",
+ 'archivebase' => "archive",
+ 'archive_pagespec' => "posts/* and ! posts/*/*",
'week_start_day' => 1,
'month_link' => 1,
+The `archivebase` and `archive_pagespec` can be overloaded by the very same
+options of the directive.
+
## Example
-You can see this plugin in action on [[our website|http://www.gresille.org]]. To see what happens when several pages happens on the same day, check the 15th of March 2012.
+You can see this plugin in action on [[our website|http://www.gresille.org]].
Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Jscalendar]]
diff --git a/doc/plugins/contrib/monthcalendar.mdwn b/doc/plugins/contrib/monthcalendar.mdwn
index 4944f3a8f..c21be0abe 100644
--- a/doc/plugins/contrib/monthcalendar.mdwn
+++ b/doc/plugins/contrib/monthcalendar.mdwn
@@ -1,9 +1,12 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=monthcalendar author="[[Louis|spalax]]"]]
# Monthcalendar
This plugin displays a calendar, containing in each of its day the list of links of pages published on this day. It can be used, for example, to display archives of blog posts, or to announce events.
+The difference between this plugin and the [[plugins/calendar]] plugin is that the calendar displayed by this plugin is a big one, containing the full title of every page indexed in it.
+
## Usage
### Directive
@@ -16,6 +19,109 @@ By using the following line in template `calendarmonth.tmpl`, you can have `ikiw
\[[!monthcalendar type="month" year="<TMPL_VAR YEAR>" month="<TMPL_VAR MONTH>" pages="<TMPL_VAR PAGESPEC>"]]
+## CSS
+
+Here is an example of CSS properly rendering the calendar produced by this
+plugin.
+[[!toggle id=css text="CSS"]]
+[[!toggleable id=css text="""
+ /* Calendar */
+ .monthcalendar
+ {
+ color:#aaa;
+ /* font-size:18pt; */
+ margin-top:1em;
+ margin-bottom:1em;
+ width: 100%;
+ }
+
+ .monthcalendar table,
+ .monthcalendar td,
+ .monthcalendar th
+ {
+ border: 1px solid #ccc;
+ }
+
+ #content .monthcalendar td
+ {
+ padding: 0;
+ position: relative;
+ }
+
+ .monthcalendar td div
+ {
+ min-height: 10ex;
+ height: 100%;
+ position: relative;
+ }
+
+ .monthcalendar th
+ {
+ vertical-align: middle;
+ }
+
+ .monthcalendar td ul
+ {
+ padding-left: 0.5em;
+ list-style: dot;
+ list-style-position: inside;
+ text-align: left;
+ font-size: 8pt;
+ position: relative;
+ z-index: 10;
+ font-weight: bold;
+ }
+
+ table.monthcalendar
+ {
+ table-layout: fixed;
+ }
+
+ .monthcalendar .selflink
+ {
+ color:#444444;
+ }
+
+ .monthcalendar-day-head {
+ text-transform:capitalize;
+ }
+
+ .monthcalendar-head {
+ text-transform:capitalize;
+ }
+
+ .monthcalendar-daynumber
+ {
+ float: left;
+ position: absolute;
+ display: block;
+ font-size: 7ex;
+ color: #ccc;
+ line-height: 100%;
+ z-index: 5;
+ padding-top: 0.3ex;
+ text-align: right;
+ width: 1.8em;
+ }
+
+ /* List of pages */
+
+ .monthcalendar-pagelist {
+ display: flex;
+ flex-direction: column;
+ }
+
+ .monthcalendar-item {
+ opacity: 0;
+ height: 0;
+ }
+
+ .monthcalendar-item:target {
+ opacity: 1;
+ height: initial;
+ }
+"""]]
+
## Code
Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Monthcalendar]].
diff --git a/doc/plugins/contrib/parenttag.mdwn b/doc/plugins/contrib/parenttag.mdwn
index d3bede797..5dc01c7c5 100644
--- a/doc/plugins/contrib/parenttag.mdwn
+++ b/doc/plugins/contrib/parenttag.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=parenttag author="[[Louis|spalax]]"]]
[[!tag type/tags]]
diff --git a/doc/plugins/contrib/poetry.mdwn b/doc/plugins/contrib/poetry.mdwn
index 519975e40..aed2e420a 100644
--- a/doc/plugins/contrib/poetry.mdwn
+++ b/doc/plugins/contrib/poetry.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=poetry author="[[Louis|spalax]]"]]
# Poetry
@@ -10,12 +11,15 @@ render poetry (or songs).
### Typography
In regular text, there are two different meaning of a new line: a break between
-two paragraphs, and the word wrap.
+two paragraphs, and the line wrap.
When rendering poetry, we need a third one: the carriage return between two
-verse lines. This one should be different from the word wrap carriage return,
-otherwise one will not be able to tell apart these two (generally, wrapped text
-is indented, whereas verse lines are not).
+verse lines. This one should be different from the line wrap carriage return,
+otherwise one will not be able to tell apart these two: is a word displayed at
+the begenning of its line a new verse line, or the previous verse line,
+continuing on a new line because it is too long?
+
+Generally, wrapped text is indented, whereas verse lines are not.
### Markdown
diff --git a/doc/plugins/contrib/sidebar2.mdwn b/doc/plugins/contrib/sidebar2.mdwn
index 574bdeaab..5c169bfd4 100644
--- a/doc/plugins/contrib/sidebar2.mdwn
+++ b/doc/plugins/contrib/sidebar2.mdwn
@@ -1,9 +1,10 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=sidebar2 author="[[Louis|spalax]]"]]
[[!tag type/chrome]]
*Claim:* The [[sidebar|plugins/sidebar]] plugin has nothing
to do with sidebars. This plugin renders some page (which happens to be named
-`sidebar`) and put the result in template variable `SIDEBAR`, in template
+`sidebar`) and put the result in template variable `SIDEBAR` of template
`page.tmpl`. But the fact that it is a sidebar, i.e. a bar appearing on the
side on the screen, is done by CSS.
@@ -40,7 +41,7 @@ The default, which gives the behaviour of the sidebar plugin, is
# Improvements over sidebar plugin
-* You can add several "sidebars" to your wiki. For example, to have a sidebar, a submeno that appear only in pages documentations, and a footer, your `global_sidebars` would be:
+* You can add several "sidebars" to your wiki. For example, to have a sidebar, a submenu that appears only in documentation pages (`doc/*`), and a footer, your `global_sidebars` would be:
global_sidebars => [
"sidebar", "sidebar", "*",
diff --git a/doc/plugins/contrib/taskreport.mdwn b/doc/plugins/contrib/taskreport.mdwn
index 38c2a10c4..377c9ed39 100644
--- a/doc/plugins/contrib/taskreport.mdwn
+++ b/doc/plugins/contrib/taskreport.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=taskreport author="[[Louis|spalax]]"]]
# Taskreport