-
Notifications
You must be signed in to change notification settings - Fork 1
/
theme.php
26 lines (21 loc) · 984 Bytes
/
theme.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
namespace Habari;
class WaziTheme extends Theme
{
function action_template_header($theme) {
// Add the HTML5 shiv for IE < 9
Stack::add('template_header_javascript', array('//cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.js', null, '<!--[if lt IE 9]>%s<![endif]-->'), 'html5_shiv');
// Add this line to your config.php to show an error and a notice, and
// to process the raw LESS code via javascript instead of the rendered CSS: define('DEBUG_THEME', 1);
if(defined('DEBUG_THEME')) {
Session::error('This is a <b>sample error</b>');
Session::notice('This is a <b>sample notice</b> for ' . $_SERVER['REQUEST_URI']);
Stack::add('template_header_javascript', 'less' );
Stack::add('template_stylesheet', array($theme->get_url('/less/style.less'), null, array('type'=> null, 'rel' => 'stylesheet/less')), 'style');
}
else {
Stack::add('template_stylesheet', $theme->get_url('/css/style.css'), 'style');
}
}
}
?>