====== 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 [[https://www.w3.org/TR/WCAG21/|WCAG 2.1]] Level AA (however, the DokuWiki content renderer has some limitations) * [[wp>General Data Protection Regulation|GDPR]]-compliant: does not load external resources like font files or others (note that the [[doku>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 [[doku>en:search|search function]]. The search field brings all these functions together:
{{:projects:dokuwiki:ad-hominem-search.png?nolink|Ad-Hominem: Search field with expanded results list}}
Search field with expanded results list
===== Collapsible sidebar and table of contents ===== Also the [[doku>config:sidebar|sidebar]] is a core function in DokuWiki((See also the article: [[doku>faq:sidebar|How do I add a sidebar?]])). 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:
{{:projects:dokuwiki:ad-hominem-link-preview.png?direct&600|Ad-Hominem: Link preview as tooltip}}
Link preview as tooltip
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: [[wp>Wikipedia|English]], [[wpfr>Wikipédia|French]], [[wpde>Wikipedia|German]], [[wpes>Wikipedia|Spanish]], [[wpes>Wikipedia|Polish]] and [[wpru>Википедия|Russian]]. In addition, interwiki links to [[fo>index|Fallacies Online]] and [[dfo>hauptseite|Denkfehler Online]] are also included, these need to be added to the ''interwiki.local.conf'' file((For more information on this file, please see the page [[doku>Interwiki|Interwiki]] in the DokuWiki documentation.)) 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:
{{:projects:dokuwiki:ad-hominem-cookiebanner.png?direct&600|Ad-Hominem: Cookie banner}}
𝖢ookie banner
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.