xref: /template/minimal/template_plugin.php (revision b01ca7d729825a945151f63eab6c21c8cf701d29)
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
13*b01ca7d7SReactiveMatter// must be run from within DokuWiki
14*b01ca7d7SReactiveMatterif (!defined('DOKU_INC')) die();
15*b01ca7d7SReactiveMatter
1644f4d58dSReactiveMatterfunction tpl_minimal_classes()
1744f4d58dSReactiveMatter{
18*b01ca7d7SReactiveMatter	global $conf, $ACT;
1944f4d58dSReactiveMatter	$theme = '';
2044f4d58dSReactiveMatter	if(tpl_getConf('theme')!='Default')
2144f4d58dSReactiveMatter	{
2244f4d58dSReactiveMatter	    $theme = ' theme-'.strtolower(tpl_getConf('theme'));
2344f4d58dSReactiveMatter	}
2444f4d58dSReactiveMatter
25*b01ca7d7SReactiveMatter	$width = tpl_getConf('stickyToc')?' stoc':'';
2644f4d58dSReactiveMatter	$width = tpl_getConf('fullWidthSite')?' full-width':'';
2744f4d58dSReactiveMatter	$sidebar = (page_findnearest($conf['sidebar']) && ($ACT=='show')) ? ' sidebar' : '';
2844f4d58dSReactiveMatter	return tpl_classes().$width.$sidebar.$theme;
2944f4d58dSReactiveMatter}
3044f4d58dSReactiveMatter
31*b01ca7d7SReactiveMatter
32