nomadjimbob / mikio

Customizable, Bootstrap 4 inspired template for Dokuwiki
GNU General Public License v2.0
22 stars 6 forks source link

Mikio DokuWiki Template

screenshot

About

Mikio is a Bootstrap 4 style template for DokuWiki

Features

Possible Breaking Changes

Incompatibilities

Comment Syntax support converts custom control macros such as the Mikio macro ~~hero-image ...~~ into comments. If you plan to use this extension on your site, you will need to use the alternative macro format of -~hero-image ...~- for Mikio to detect the information.

Configuration

The configuration can be change with the Configuration Manager Plugin

Right Sidebar

The right sidebar can be applied by creating a normal wiki page called "rightsidebar". Go to http://your-wiki.com/doku.php?id=rightsidebar, click "Create this page", edit the page, save, and you're done. That's it, your saved changes will appear in your right sidebar.

Include Pages

The following pages can be either html files in the root of the template or a page in the namespace. Namespace pages take priority.

Include Images

The following images can be used to replace content in the template. Images can be in TEMPLATE_ROOT/images/, TEMPLATE_ROOT/themes/THEME/images/, or in the namespace. Images can be either png, jpg, gif or svg.

Hero Element

Namespaces can also apply the above hero settings in child pages by including the above settings in a page named theme.

Hiding Elements

Mikio now supports hiding elements using the ~~hide-parts (parts)~~ macro. Each element within the hide-parts macro is required to be seperated by spaces. Currently the following parts are supported:

To hide the topheader, navbar and hero, you would use the macro ~~hide-parts topheader navbar hero~~

Icon Engine

Users can also add their own icon sets into the template. Supported icon sets can either be webfonts or indivial files (such as a SVG library). Instructions can be found in the /icons/icons.php file.

Customizing Page Footer Info Text

By default, Dokuwiki inserts the text start.txt · Last modified: 2023/12/04 10:57... on each page. This can now be customized in the config.

You can use the follow placeholders to insert page attributes:

You can also use Dokuwiki language settings by wrapping the string ID with the percentage symbol. For example use to the language string set against lastmod, use %lastmod%. In a default install under english, %lastmod% will be replaced with Last modified:.

There is also support for simple optional text. By wrapping text in square brackets and at the beginning of the square bracket, inserting the placeholder name followed by an equals sign, if the placeholder exists, then the contents of the square brackets will be parsed. There is also support for LOGGEDIN to check if there is a logged in user.

For example the string Hello[LOGGEDIN= by {user}] would output as Hello if the vistor is a guest (not logged in) or Hello by james if the visitor has logged into the site.

Optionals can also be stacked, for example Hello[LOGGEDIN=[USER= by {user}]]. the by {user} would only be present if there is a logged in user AND the page has a user editor set.

Of course, you can leave the setting blank to hide the page info altogether.

The default value which is the same standard DokuWiki is: {file} · %lastmod% {date}[LOGGEDIN=[USER= %by% {user}][LOCKED= · %lockedby% {locked}]]

Themes

Themes should be placed in the themes directory, in its own directory. LESS files are supported.

Dark Mode

Mikio now supports dark mode! When the user prefers a dark theme, or has selected dark mode, the html tag will set the theme dataset to theme-dark, else it will be theme-light.

You can detect this in CSS using:

:root[data-theme="theme-dark"] {
  // CSS selectors here
}

or in Javascript using:

const html = document.querySelector('html');
if(html.dataset.theme == 'theme-dark') {
  // ...
}

Mikio Plugin

The Mikio Plugin is also available to add bootstrap 4 style + more elements to DokuWiki pages.

If the plugin is installed, the Template Styles Settings page will be expanded to allow directly editing the plugin element styling.

Languages

Releases

Third Party Libraries

This template uses a modified version of simple_html_dom and bootstrap-3-typeahead.

Support