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

  • 2020-07-29 "Hogfather" yes
  • 2018-04-22 "Greebo" unknown
  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" unknown

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

Last updated on
2021-08-30
Repository
Source

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 (link, see below) but may be useful for others, too.

Please keep in mind that this is still “work in progress”, and this template may not be ready for production use on other sites. Use with care.

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.
  • Tries to implement WCAG 2.1 Level AA (not quite there yet, but this is definitely a goal!)
  • Neatly formatted and standards-compliant code (where possible – the main page text comes from the DokuWiki renderer and that's out of my control).
  • 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.

Download and Install

Use the following URL to download this template:

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

Configuration

Icons

Similar to the default, this template allows for pictures with specific names to be uploaded using the media manager and serve as site icons, etc. These images have to be uploaded either to the root directory, or into the :wiki: namespace.

Note on SVG images: by default, the media manager does not allow the upload of SVG images. To use them, please add a configuration setting in mime.local.conf. Please see MIME Configuration for more information.

Site logo: this is the logo that appears in the top-left corner of every page. Note that this template uses a different default size (64×64 pixels) than the standard template. This file can be named “logo.svg” or “logo.png” (the preferred format is SVG).

Favicon: This is the icon used by the browser, e.g. for bookmarks and/or tabs. This should either be in Windows Icon Format (containing a set of 16, 24 and 48 pixels size icons), PNG, or SVG. The preferred format is Windows Icon, but SVG is the most flexible size. This should be named “favicon.ico”, “favicon.png” or “favicon.svg”.

Apple Touch Icon: Used by iOS devices when the user places a bookmark on the homescreen. This should be a 180×180 pixels PNG file named “apple-touch-icon.png”.

HTML Blocks

The template looks for HTML files that will be included at specific places in the page. This is useful for repeating sections, configuration options, etc. These files can be located in the /conf/ directory, or directly in the template directory (/lib/tpl/ad-hominem/).

Metadata

The file “meta.html”, if it exists, will be included at the end of the <head> section. This can be used to add specific metadata to all pages of the site. For example, load additional CSS or JavaScript files, links to your social-media accounts, etc.

An area in the page header, located just below the search field, is reserved for the content of the file “header.html”, if it exists. This is a good place to add site-wide notifications, like warning of technical problems, etc.

There are two hooks for HTML files in the sidebar: one on top (called “sidebarheader.html”), and another at the bottom (“sidebarfooter.html”). These can be used to add navigation items that should repeat on all pages (e.g. a link to the homepage, or to legal mentions).

Page Content

A repeating section on top of the main page content (above the “youarehere” links) can be added by placing a file called “pageheader.html” in the template directory.

Likewise, at the bottom of the page (after the “Last changed” item). The file to be inserted here has to be called “pagefooter.html”.

There is a footer section reserved for a static HTML file called “footer.html”. If there are bullet lists in this file, they will be displayed as inline lists in mobile view (similar to the other footer sections).

Sites using this Template

Feel free to add your site here if you use this template. Please keep the list in alphabetic order:

template/ad-hominem.1630349829.txt.gz · Last modified: 2021-08-30 20:57 by sascha-leib