Ad Hominem Template
A simple and lightweight template, based on the standard DokuWiki template, but with many additional, modern features.
A short overview of the main features of this template:
- Prominent search field with preloading search results.
- Collapsible sidebar and table of contents.
- Link preview: title and first paragraph of the linked page is shown in the title text.
- This also works for Wikipedia links!
- Two (!) different well designed print modes
- The template implements WCAG 2.1 Level AA (however, the DokuWiki content renderer has some limitations)
- GDPR-compliant: does not load external resources like font files or others (note that the config:jquerycdn setting needs to be set to “local delivery only” for GDPR-compliance)
- Integrated “Cookies” banner functionality
- Fully responsive: works on all display formats, from smartphones to 4K monitors
- User-side controlled “dark mode”, i.e. follows the client side dark mode settings.
- Configuration to override the “home”-link
- Integrated languages menu (for the Translate plugin)
These features are explained in more detail below:
Search field
One of the strengths of DokuWiki is the well-integrated and powerful search function. The search field brings all these functions together:
Collapsible sidebar and table of contents
Also the sidebar is a core function in DokuWiki1). This template therefore has two different approaches so that it does not get in the way of the user so much:
On desktop screen sizes, there is an inconspicuous button to fold the sidebar to the edge. In this state the main content area is enlarged. The sidebar also collapses automatically in the admin vor edit view.
On mobile phone screen sizes, the sidebar will behidden and instead a “hamburger” menu is shown in its place. A click on this icon will show the sidebar as a floating menu.
The Table of Contents is by default collapsed to a “hamburger” menu in the top right corner of the main area (top-left on right-to-left languages). A click on this icon expands the TOC.
Link preview
The template comes with a built-in system for link-previews. They work in a way that when a mouse pointer is hovered over certain links, a preview text is loaded into the title
attribute, making the text available as a tooltip, as in the following screenshot:
This function is available for internal links (i.e. the green links in your wikitext) as well as for Wikipedia links for the language versions: English, French, German, Spanish, Polish and Russian. In addition, interwiki links to Fallacies Online and Denkfehler Online are also included, these need to be added to the interwiki.local.conf
file2) with the shortcuts named fo
and dfo
respectively.
Give it a try on the links in the previous paragraph: just hover your mouse over any of the links!
To reduce overhead, the preview text is only loaded when the mouse pointer is actually over the link. This may cause a slight delay in showing the preview, but reduces the overall network load.
Unfortunately, this only works on devices that actually have a mouse pointer (i.e. not on tablets and smartphones). An alternative solution for these devices as well as a mechanism to add other web sites is planned.
To make the best of this function, it is a good practice to always start each article with a main headline (level 1), followed by a short plain text paragraph with a synopsis of the article. This is also the most user-friendly way to begin your wiki-articles (I wished the Wikipedia authors would also take the “short” aspect a bit more seriously).
Cookie banner
The template has a built-in cookie-banner to fulfil the requirements of EU-based wikis. It looks as follows:
The template’s configuration settings contain three options to modify the cookie banner:
- Display the Cookie message banner: Disable or change the position of the cookies banner:
- Don’t show: No cookie banner is shown to the visitor.
- Show on bottom of page: The cookie banner is shown on the bottom of the screen (default).
- Show on top of page: The cookie banner is shown on the top of the screen.
- The message to display on the Cookie banner: This is a free-text field that allows to enter the text that is displayed in the banner. This may even contain HTML tags as it will be copied “as is” into the page code.
- Link to the “More information” page: this can be an internal or external address that will be linked via the “more information” button.
Clicking on the “OK”-button will close the banner and set a 1-year cookie named “cookielaw
” with the value “1
”. When this cookie is set, the banner will not be shown again for this web site.
Note that for technical reasons, the cookie banner can not actually prevent DokuWiki from setting any cookies. However, all standard DokuWiki cookies, as well as the cookielaw
-cookie fall into the categorie of “technical cookies”, which do not require permission from the user.
Also keep in mind that the linked “More information” page should give detailled information on the cookies and data collection practices.