diff options
author | MaZderMind | 2015-10-06 13:01:43 +0200 |
---|---|---|
committer | MaZderMind | 2015-10-06 13:01:43 +0200 |
commit | 428a7f2bc69db91633574a91b5afdd64593c2912 (patch) | |
tree | 37f8a925cfb2b475ade6249406835aed096253d4 /index.php | |
parent | 3d2439faecd44be86f2da5aa7cafff6eb2df0491 (diff) | |
parent | d0e4536fafdeae749cf0f6e4934817a2a7adcefd (diff) |
Merge branch 'php-less-compiler'
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 21 |
1 files changed, 21 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,26 @@ try { require('view/streams-json-v1.php'); } + else if($route == 'assets/css/main.css') + { + $dir = forceslash(sys_get_temp_dir()); + + $css_file = Less_Cache::Get([ + 'assets/css/main.less' => forceslash(baseurl()).'assets/css/', + ], [ + 'sourceMap' => true, + 'compress' => true, + 'relativeUrls' => true, + + 'cache_dir' => $dir, + ]); + + $css = file_get_contents($dir.$css_file); + header('Content-Type: text/css'); + header('Content-Length: '.strlen($css)); + print($css); + } + else if(!$conference->hasBegun()) { require('view/not-started.php'); |