xref: /template/minimal/template_plugin.php (revision 298daa634a062da78f41e7191a8033c983cf7c13)
177bc0ffeSReactiveMatter<?php
277bc0ffeSReactiveMatter/**
377bc0ffeSReactiveMatter * Minimal Template Helper Plugin (for common tasks)
477bc0ffeSReactiveMatter *
577bc0ffeSReactiveMatter * @link     http://dokuwiki.org/template:minimal
677bc0ffeSReactiveMatter * @author   Reactive Matter <reactivematter@protonmail.com>
777bc0ffeSReactiveMatter * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
877bc0ffeSReactiveMatter */
977bc0ffeSReactiveMatter
1077bc0ffeSReactiveMatter// must be run from within DokuWiki
1177bc0ffeSReactiveMatterif (!defined('DOKU_INC')) die();
1244f4d58dSReactiveMatter
13b01ca7d7SReactiveMatter// must be run from within DokuWiki
14b01ca7d7SReactiveMatterif (!defined('DOKU_INC')) die();
15b01ca7d7SReactiveMatter
1644f4d58dSReactiveMatterfunction tpl_minimal_classes()
1744f4d58dSReactiveMatter{
18b01ca7d7SReactiveMatter	global $conf, $ACT;
1944f4d58dSReactiveMatter	$theme = '';
2044f4d58dSReactiveMatter	if(tpl_getConf('theme')!='Default')
2144f4d58dSReactiveMatter	{
2244f4d58dSReactiveMatter	    $theme = ' theme-'.strtolower(tpl_getConf('theme'));
2344f4d58dSReactiveMatter	}
2444f4d58dSReactiveMatter
25*298daa63SReactiveMatter	$toc = tpl_getConf('stickyToc')?' stoc':'';
2644f4d58dSReactiveMatter	$width = tpl_getConf('fullWidthSite')?' full-width':'';
2744f4d58dSReactiveMatter	$sidebar = (page_findnearest($conf['sidebar']) && ($ACT=='show')) ? ' sidebar' : '';
28*298daa63SReactiveMatter	return tpl_classes().$toc.$width.$sidebar.$theme;
2944f4d58dSReactiveMatter}
3044f4d58dSReactiveMatter
31b01ca7d7SReactiveMatter
32