1<?php
2/**
3 * Minimal Template Helper Plugin (for common tasks)
4 *
5 * @link     http://dokuwiki.org/template:minimal
6 * @author   Reactive Matter <reactivematter@protonmail.com>
7 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
8 */
9
10// must be run from within DokuWiki
11if (!defined('DOKU_INC')) die();
12
13// must be run from within DokuWiki
14if (!defined('DOKU_INC')) die();
15
16function tpl_minimal_classes()
17{
18	global $conf, $ACT;
19	$theme = '';
20	if(tpl_getConf('theme')!='Default')
21	{
22	    $theme = ' theme-'.strtolower(tpl_getConf('theme'));
23	}
24
25	$toc = tpl_getConf('stickyToc')?' stoc':'';
26	$width = tpl_getConf('fullWidthSite')?' full-width':'';
27	$sidebar = (page_findnearest($conf['sidebar']) && ($ACT=='show')) ? ' sidebar' : '';
28	return tpl_classes().$toc.$width.$sidebar.$theme;
29}
30
31
32