/** * Initialize requires CSS and JS files. */ public static function initDisplay() { static $inited = false; if (!$inited) { JS::add('/js/video-js.min.js', false); JS::startup('videojs.options.flash.swf = "/swf/video-js.swf"'); CSS::add('/css/video-js.min.css'); $inited = true; } }
public function get() { $page = Request::getLocation(); $template_page = Configuration::get('splash.pages.' . $page); // No template found. if (empty($template_page) || is_array($template_page) && empty($template_page['template'])) { Output::error('Page not found.'); } else { $this->page = is_array($template_page) ? $template_page['template'] : $template_page; } // Add any CSS or JS files. if (is_array($template_page)) { if (!empty($template_page['css'])) { CSS::add($template_page['css']); } if (!empty($template_page['js'])) { JS::add($template_page['js']); } } }
/** * Run any global initialization functions. */ public function __construct() { // Load messages and errors from the query string. Messenger::loadFromQuery(); Messenger::loadFromSession(); JS::add('/js/fastclick.min.js'); JS::add('/js/jquery.min.js', false); JS::add('/js/jquery.cookie.min.js'); JS::add('/js/modernizr.min.js'); JS::add('/js/placeholder.min.js'); JS::add('/js/foundation.min.js', false); JS::add('/js/lightning.min.js', false); JS::add('/js/jquery.validate.min.js', false); JS::startup('lightning.startup.init()'); JS::startup('$(document).foundation()'); CSS::add('/css/lightning.css'); CSS::add('/css/site.css'); if (!empty($this->css)) { CSS::add($this->css); } if (!empty($this->js)) { JS::add($this->js); } }
?> </li><? endforeach; ?></ul> </div> <? endif; if (!empty($content)) : $this->build($content); endif; ?> </div> <? endif; ?> </div> <pre> <? if (ClientUser::getInstance()->isAdmin()) { $database = Database::getInstance(); print_r($database->getQueries()); print_r($database->timeReport()); } ?> </pre> </section> </div> </div> <?php echo JS::render(); echo CSS::render(); echo $this->renderFooter(); ?> </body> </html>