DokuWiki

It's better when it's simple

User Tools

Site Tools


template:ad-hominem

This is an old revision of the document!


Ad-Hominem Template

Compatible with DokuWiki

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

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

Last updated on
2022-09-15
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 on your own risk.

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

Features

  • 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!
  • Looks good in print.
  • 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 jquerycdn setting needs to be set to “local delivery only” for GDPR-compliance)
  • Neatly formatted and standards-compliant code (where possible – again, the DokuWiki content renderer is the limiting factor)
  • Makes better use of larger screens (target is half of a 4K screen), but because the template is fully responsive, smaller is no problem (down to ca. 300px wide)
  • improvements to edit view, media manager, etc.
  • User-side controlled “dark mode”, i.e. follows the client side dark mode settings.
  • Improvements to the default functionality, e.g. a resizeable internal link selection widget, etc.
  • Configuration to override the “home”-link (see below)
  • Integrated “Cookies” banner functionality

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:

  • Icons and site logos – specific names to be used to overwrite the default site logos and e.g. the favicon.
  • Page blocks – you can upload HTML snippets that are then inserted at specific places of all pages, e.g. in the footer or the sidebar.
  • Template options in the site configuration page (section: “Template options”).

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

  • “Display the Cookie message banner”: can be either “Don't show”, “Show on top of page” and “Show on bottom of page”. The first option disables the banner altogether.
  • “The message to display on the Cookie banner”: This is a free-text field that allows you to set the text to display. This text is directly copied into a <p> context in the banner, without escaping. That means you can insert some (inline) HTML for formatting, if needed.
  • “Link to the “More information” page”: this is either an internal or external address that the “More information” link shall link to. Internal addresses should look like, e.g. about:cookies (this is also the default), external addresses start with either <html>http:</html> or <html>https:</html> …

New in 0.6 is the option to override the “home” link in the settings. What is this good for? Imagine your wiki is not “stand-alone”, but rather a sub-site. 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 list.

Levaing 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:

  • If you used the “Template Style Settings” to override the default colours, notably to create a custom “dark” appearance, the time when you update to 0.4.0 or later would be a good time to review these settings.
  • If possible, create images in a way that they also work with dark backgrounds. Especially if you use transparency, it would be good to test and see how these look like with a much darker background.

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 it’s 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.

Visit my site

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

template/ad-hominem.1663273222.txt.gz · Last modified: 2022-09-15 22:20 by sascha-leib

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki