xref: /template/mikio/README.md (revision a8eebd8223c9e7a29443b978b64e79b827875f04)
1# Mikio DokuWiki Template
2
3## About
4
5`Mikio` is a Bootstrap 4 style template for [DokuWiki](http://dokuwiki.org)
6
7
8## Features
9
10
11  * [bootstrap styling](http://getbootstrap.com/)
12  * Navbar with dropdown support
13  * Subnavbar support (using a page named submenu)
14  * Right sidebar
15  * Hero element
16  * Icon support
17  * Customizable breadcrumbs
18  * Subtheming support
19  * Tags plugin support
20  * Mobile friendly
21
22
23## Configuration
24
25The configuration can be change with the [Configuration Manager Plugin](https://www.dokuwiki.org/plugin:config)
26
27  * `iconTag` : icon tag to use to engage the icon engine. Default to `icon`
28  * `customTheme` : the mikio subtheme to use
29
30  * `navbarUseTitleIcon` : show the site logo in the navbar
31  * `navbarUseTitleText` : show the site title in the navbar
32  * `navbarUseTaglineText` : show the site tagline in the navbar. Requires the `navbarUseTitleText` to be enabled
33  * `navbarCustomMenuText` : custom menu to use in the navbar. Menu items are in the format of url|title with each item seperated by a semicolon. Requires one of the `navbarPos` to be set to `custom`
34
35  * `navbarDWMenuType` : how to show the DokuWiki menu items in the navbar. Can be either icons, text or both
36  * `navbarDWMenuCombine` : how to show the DokuWiki menu in the navbar. Can be either category dropdowns, single items or a combined dropdown. The combined menu title is pulled from the `tools-menu` language value
37
38  * `navbarPosLeft` : what menu to show on the left of the navbar
39  * `navbarPosMiddle` : what menu to show in the middle of the navbar
40  * `navbarPosRight` : what menu to show on the right of the navbar
41  * `navbarShowSub` : show the sub navbar. This menu is pulled from the `submenu` page in the current or parent namespaces. The menu is also shown on child pages. If no page is found, the sub navbar is automatically hidden
42
43  * `searchButton` : show the search button as a icon or text
44
45  * `heroTitle` : show the hero block on pages
46  * `heroImagePropagation` : search for hero images in parent namespaces if none is found in the current namespace
47
48  * `tagsConsolidate` : Consolidate tags found in the current page and display it in the hero, content header or sidebar
49
50  * `breadcrumbHideHome` : hide breadcrumbs in the root namespace
51  * `breadcrumbPosition` : where to display the breadcrumbs, either under the navbar, in the hero element or above the page content
52  * `breadcrumbPrefix` : enable changing the breadcrumb prefix
53  * `breadcrumbPrefixText` : text to set the breadcrumb prefix. Requires `breadcrumbPrefix` to be enabled
54  * `breadcrumbSep` : enable changing the breadcrumb seperator
55  * `breadcrumbSepText` : text to set the breadcrumb seperator. Requires `breadcrumbSep` to be enabled
56  * `breadcrumbHome` : change the breadcrumb home item to none, page title of root page, 'home' or an icon/image. The 'home' text is pulled from the `home` language value
57  * `breadcrumbShowLast` : only show an amount of breadcrumbs from the last. Will also show the home item in the list if enabled. Set this to `0` to show all items
58
59  * `sidebarShowLeft` : show the left sidebar if content is found
60  * `sidebarLeftRow1` : content to show in the first row of the left sidebar
61  * `sidebarLeftRow2` : content to show in the second row of the left sidebar
62  * `sidebarLeftRow3` : content to show in the third row of the left sidebar
63  * `sidebarLeftRow4` : content to show in the forth row of the left sidebar
64  * `sidebarShowRight` : show the right sidebar if content is found
65
66  * `tocFull` : show the table of contents as a full height item
67
68  * `pageToolsFloating` : when and if to show the floating page tools
69  * `pageToolsFooter` : when and if to show page tools in the footer
70
71  * `footerCustomMenuText` : custom menu to use in the footer. Menu items are in the format of url|title with each item seperated by a semicolon
72  * `footerSearch` : show the search bar in the footer
73
74  * `licenseType` : how to show the license in the footer
75  * `licenseImageOnly` : show the license in the footer as an image only. Requires `licenseType` to at least be enabled
76
77  * `includePageUseACL` : respect ACL when including pages
78  * `includePagePropagate` : search parent namespaces when including pages
79
80
81## Include Pages
82
83The following pages can be either html files in the root of the theme or a page in the namespace. Namespace pages take priority.
84
85  * `topheader` : content to include above the navbar
86  * `header` : content include below the navbar but above the page content
87  * `contentheader` : content to include above the page content
88  * `contentfooter` : content to include below the page content
89  * `sidebarheader` : content to include above the left sidebar content
90  * `sidebarfooter` : content to include below the left sidebar content
91  * `rightsidebarheader` : content to include above the right sidebar content
92  * `rightsidebarfooter` : content to include below the right sidebar content
93  * `footer` : content to include in the footer
94  * `bottomfooter` : content to include below the footer
95
96
97## Include Images
98
99The following images can be used to replace content in the theme. Images can be in the root of the theme or in the namespace. Images can be either png, jpg, gif or svg.
100
101  * `logo` : site logo in the navbar
102  * `breadcrumb-prefix` breadcrumb prefix
103  * `breadcrumb-sep` breadcrumb seperator
104  * `hero` hero image for hero element
105
106
107## Hero Element
108
109  * `title` : The hero title is sourced from the page title. The page title is removed from the page content
110  * `subtitle` : Pages can set the subtitle by inserting ~~hero-subtitle TEXT~~ in the page content
111  * `image` : The hero image is sourced from an image named hero in the current or parental namespace. Namespace searching can be confined by the `includePagePropagate` setting. Pages can also override the image by inserting ~~hero-image URL~~ in the page content. DokuWiki and external URLs are supported
112  * `colors` : Colors can be overridden by including ~~hero-colors BACKGROUND_COLOR HERO_TITLE_COLOR HERO_SUBTITLE_COLOR BREADCRUMB_TEXT_COLOR BREADCRUMB_HOVER_COLOR~~. You do not need to include all the color options. Use 'initial' to skip a color override
113
114Namespaces can also apply the above hero settings in child pages by including the above settings in a page named `theme`.
115
116
117## Icon Engine
118
119  * Mikio includes an icon engine that allows you to include icons in your pages by using <icon OPTIONS> in your content
120  * If the icon tag conflicts with another plugin, you can change the tag from `icon` to a user set value in the settings
121  * By default, Mikio enables FontAwesome 4 by also includes FontAwesome 5, Elusive 2 and Bootstrap Icons which can be enabled by uncommenting their inclusions in `/icons/icons.php`
122
123Users can also add their own icon sets into the theme. 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.
124
125
126## Subthemes
127
128Subthemes should be placed in the themes directory in its own directory. LESS files are supported.
129
130
131## Mikio Plugin
132
133The [Mikio Plugin](https://github.com/nomadjimbob/mikioplugin/) is also available to add bootstrap 4 style + more elements to DokuWiki pages.
134
135
136## Languages
137
138  * `sidebar-title` : Text for the collapsable block in the sidebar
139  * `tools-menu` : Text for the combined tools DokuWiki menu title
140  * `home` : Text for the breadcrumb home title
141
142
143## Support
144
145  * If you think you have found a problem, or would like to see a feature, please [open an issue](https://github.com/nomadjimbob/mikio/issues)
146  * If you are a coder, feel free to create a pull request, but please be detailed about your changes!
147
148
149## Dev
150
151For developers
152
153The function `tpl_strap_meta_header` found in the file [tpl_lib_strap](./tpl_lib_strap.php)
154
155  * control the headers and is call via the registration of the event `TPL_METAHEADER_OUTPUT`
156  * control the Jquery version. Not logged in, Bootstrap, logged in Dokuwiki (with ui,..)
157
158Ter info, the template file are:
159  * [main.php](./main.php): The main page. [Doc](https://www.dokuwiki.org/devel:templates:main.php)
160  * [detail.php](./detail.php): The template to show the detail of an image. [Doc](https://www.dokuwiki.org/devel:templates:detail.php)
161  * [mediamanager.php](./mediamanager.php): The template to show the media manager.
162
163
164## Note
165
166  * The site tool and the page tool are in the same menu called Tools.
167
168  * There is two entry points:
169
170     * the file [main.php](main.php) - that shows the page
171     * the file [detail.php](detail.php) - that shows the image
172