/** * getBasePath * * @return string */ function getBasePath() { if (strlen(Flight::request()->base) == 1) { return getWebsiteUrl() . '/'; } return getWebsiteUrl() . Flight::request()->base . '/'; }
public static function index() { $flash = (string) flash(); if (!empty($flash)) { Flight::view()->set("flash", 'success'); } Flight::view()->set("base_path", getBasePath()); Flight::view()->set("url_website", getWebsiteUrl(false) . '/'); Flight::view()->set("recaptcha_public", getenv('RECAPTCHA_PUBLIC')); Flight::view()->set("ga_code", getenv('GOOGLE_ANALYTICS')); // layout assets Flight::view()->set("asset_favicon", getAssetUrl("assets/images/favicon.png")); Flight::view()->set("asset_css", getAssetUrl("assets/css/app.css")); Flight::view()->set("asset_js_vendors", getAssetUrl("assets/js/vendors.js")); Flight::view()->set("asset_js", getAssetUrl("assets/js/app.js")); Flight::view()->set("asset_share_fb", getAssetUrl("assets/images/acasedona-fb.png")); Flight::view()->set("asset_share_tw", getAssetUrl("assets/images/acasedona-tw.png")); Flight::view()->set("asset_share_gp", getAssetUrl("assets/images/acasedona-fb.png")); Flight::render('flowics', array(), 'flowics'); Flight::render('analytics', array(), 'analytics'); Flight::render('header', array(), 'header'); Flight::render('home', array(), 'yield'); Flight::render('layout', array()); }