diff options
author | MaZderMind | 2015-10-05 17:28:23 +0200 |
---|---|---|
committer | MaZderMind | 2015-10-05 17:28:23 +0200 |
commit | d9d8d4a497d49de90845438fb4e38db15171573e (patch) | |
tree | 0a7dd9ce71ed3d931cc6dc141b6fe04c3e696abf /index.php | |
parent | 1e80133967b65f94db26c6b3914a58b341d57eca (diff) |
use php-based lesscss compiler
Diffstat (limited to '')
-rw-r--r-- | index.php | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -8,6 +8,7 @@ require_once('config.php'); require_once('lib/PhpTemplate.php'); require_once('lib/Exceptions.php'); +require_once('lib/less.php/Less.php'); require_once('model/ModelBase.php'); require_once('model/Conference.php'); @@ -65,6 +66,20 @@ try { require('view/streams-json-v1.php'); } + else if($route == 'assets/css/main.css') + { + $parser = new Less_Parser([ + 'sourceMap' => true, + 'compress' => true, + 'relativeUrls' => true, + ]); + $parser->parseFile('assets/css/main.less', forceslash(baseurl()).'assets/css/'); + $css = $parser->getCss(); + header('Content-Type: text/css'); + header('Content-Length: '.strlen($css)); + print($css); + } + else if(!$conference->hasBegun()) { require('view/not-started.php'); |