function breakpoint($size) { $size = (int) $size; Manager::register_breakpoint($size); $this->breakpoints[$size] = $size; rsort($this->breakpoints); }
function makeupBlocks() { $blocks_path = HelperFile::normalizeFilePath(Manager::getPath('blocks')); if (file_exists($blocks_path)) { foreach (\File::directories($blocks_path) as $path) { $path = HelperFile::normalizeFilePath($path); Manager::block(trim(str_replace($blocks_path, '', $path), '/')); } } }
return faker_rus()->userAgent; }); \Larakit\Twig::register_function('faker_image', function ($width = 640, $height = 480, $cat = 'business') { if (!isset(\Larakit\Makeup\Manager::$lorempixel[$width . 'x' . $height])) { \Larakit\Makeup\Manager::$lorempixel[$width . 'x' . $height] = 0; } return URL::route('lorempixel', ['w' => $width, 'h' => $height, 'cat' => $cat, 'number' => ++\Larakit\Makeup\Manager::$lorempixel[$width . 'x' . $height]]); }); \Larakit\Twig::register_function('makeup_pages', function ($width = 640, $height = 480, $cat = null) { return \Larakit\Makeup\Manager::$pages; }); \Larakit\Twig::register_function('makeup_blocks', function ($width = 640, $height = 480, $cat = null) { return \Larakit\Makeup\Manager::$blocks; }); \Larakit\Twig::register_function('makeup_block', function ($name, $params = []) { return \Larakit\Makeup\Manager::block($name)->setParams($params) . ''; }); View::composer('lk-makeup::!.layouts.page', function ($view) { $view->with('theme', Request::input('theme')); $view->with('breakpoint', Request::input('breakpoint')); $view->with('path', Request::path()); }); View::composer('lk-makeup::!.layouts.block', function ($view) { $view->with('theme', Request::input('theme')); $view->with('breakpoint', Request::input('breakpoint')); $view->with('path', Request::path()); }); View::composer('lk-makeup::!.partials.dispatcher', function ($view) { $view->with('theme', Request::input('theme')); $view->with('breakpoint', Request::input('breakpoint')); $view->with('path', Request::path());