Table of Contents

Ad-Hominem Template

Compatible with DokuWiki

  • 2024-02-06 "Kaos" yes
  • 2023-04-04 "Jack Jackrum" yes
  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" unknown

template Simple and lightweight, but modernized version of the default template

Last updated on
2024-02-07
Repository
Source
Conflicts with
cookielaw

This is an attempt to create a very simple and lightweight template for DokuWiki that stays true to the ideas of the original design, but modernizes the code and improve on the usability.

It was designed to work for my DokuWiki site of the same name (now migrated to Denkfehler Online), but may be useful for others, too.

This is provided “as is”, with no explicit or implied claim to be usable for any specific purpose. It is well tested and fine-tuned, but you are using it at your own risk.

Feedback and bug reports are of course always welcome :-)

Features

Download and Install

The easiest way to install the template is to use the Extensions Manager in the Admin panel. Just search for “Ad Hominem” and click “install”. Then head to the configuration page and select “Ad Hominem” from the template popup menu.

Alternatively, you can download the latest version as a ZIP file from the following page:

Refer to template on how to install and use templates in DokuWiki.

Configuration

The configuration options are now documented on the GitHub Wiki Page. Make sure to read it, to make the most of your DokuWiki!

In short, the following configuration features are available:

Details on how to configure these can be found on the page linked above.

Cookies Banner

This template has its own, built-in “Cookies”-banner. This function is heavily inspired by Michal Koutný's “cookielaw” plugin, but it is much better integrated into the template design, and of course fully configurable.

There are three settings that control the behaviour of this

The template has an option to override the “home” link in the settings. What is this good for? Imagine your wiki is not “stand-alone”, but rather only a section in your wider website. In this case, you don't want a click on the site name or logo to bring the visitor to the wiki homepage, but rather to your main site homepage. Well, this can be done with this option.

If you enter, for example, “/index.html”, the links on the site icon and site name will both lead to this address. In addition, the “home” icon link in the “You are here” navigation (if enabled) will lead to this link, and the wiki homepage will become a normal entry in the site hierarchy.

Leaving the field empty will keep the original behaviour (home is your wiki homepage) intact.

Dark Mode

This template supports client-controlled “dark mode”. This means that visitors to your site who have “dark mode” activated on their machines will see the site in a suitable dark colour scheme.

The following screenshots show the light and dark mode side by side:

 Screenshots in light and dark mode

Generally, there is nothing to do for a site admin, but please be aware of this, and make sure to check your site in dark mode from time to time (or in light mode, if you normally use dark mode).

There are two potential issues to be aware of:

There is more documentation available on the project’s GitHub Wiki Page, including some ideas on how to deal with problem situations.

And, of course, you can also override the dark mode colours using the Styling Plugin, or disable it altogether in the configuration settings (section: Template settings).

Cookies

This template also comes with its own implementation of the Cookielaw Plugin, and as such, also sets a cookie to remember that the banner has already been shown to the visitor.

The “cookielaw” cookie is set for one year (not 10 years as the original), and it can only contain the value “1”, which means it can not be used for tracking users. This means it is purely a “technical cookie“ in the sense of the EU’s “E-Privacy Directive”.

Please keep in mind, however, that the DokuWiki system sets additional cookies, which are explained on another page.

2-column “compact” print style

Since 1.5 there is now an option to switch from the default “basic” print style to a more “compact” 2-column style.

This “compact” style is typographically more advanced and IMHO also looks a lot better, but it requires some work from the editor to make sure the page works well in print.

Most importantly, use the class “print-wide” can be used to mark up sections that should span both columns, e.g. for images, tables, etc.

If you use the Wrap plugin, you can simply wrap (pun intended) such a section with:

<WRAP print-wide>
 …
</WRAP>

Another option is the Ad.Hoc Tags plugin of the same author, which allows you to use a larger number of HTML tags, including the possibility to simply add class names (and other attributes) in your code. Here you could write, e.g.:

<aside print-wide>

</aside>

Last but not least: <figure> blocks are also spanning both columns by default and also have specialized styling to make sure they look good in print (including their <figcaption>s). If you want to override this behaviour, you can keep them in a single column by adding the class print-narrow.

Other print-related classes include noprint and print-only, which do exactly what their names promise.

HTML Tags

As of DokuWiki “Jack Jackrum”, embedding HTML tags in the DokuWiki code is no longer supported. In order to still allow semantic markup to be added, the autor of this template also provides a plugin, Ad-Hoc Tags, which enables specific HTML tags in a more Wiki-like syntax.

This has been developed with, and is designed to be used with this template (though it is fully useable with other templates as well, of course).

Visit my site

The best way to experience this template is by browsing my sites, which make full use of it: