/** * @param string $theme * @param array $vars */ public static function _($theme, $vars = array()) { $instance = new Theme(); foreach ($vars as $key => $value) { $instance->set($key, $value); } $instance->dispatch($theme); }
/** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string $themeName * @return mixed */ public function handle($request, Closure $next) { if ($request->is('admin') || $request->is('admin/*')) { $theme_locale = 'backend/'; } else { $theme_locale = 'frontend/'; } $themeName = Session::get('themeName') != '' ? $theme_locale . Session::get('themeName') : \Theme::get(); //if(Theme::exists($themeName)){ \Theme::set($themeName); //} return $next($request); }
/** * Execute the console command. * * @return mixed */ public function handle() { $modules = Module::getOrdered(); $this->info('Generate Key'); $this->call('key:generate'); $this->info('Migrations Basics'); $this->call('migrate'); $this->info('Executing Seeders'); $this->call('db:seed'); $this->info('Executing Migrations Modules'); $this->call('module:migrate'); $this->info('Executing Seeders Modules'); foreach ($modules as $module) { $this->info("Executing Seed for module {$module->name}"); $this->call('module:seed', ['module' => $module->name]); } $this->info('Activate theme: Default'); \Theme::set('default'); $this->info('Publish assets themes'); $this->call('theme:publish'); }
<?php Theme::asset()->add('timeline', 'assets/css/components/timeline.css'); Theme::asset()->add('profile', 'assets/css/components/profile.css'); Theme::set('bodyClass', 'client profile'); ?> {!! Theme::partial('head') !!} <style> .ui.post.feed > .event > .label + .content { margin: .2em 0 2em .75em; } .ui.feed .ui.pointing.dropdown > .menu:after { left: 25%; } </style> <div id="main-container" class="pusher"> <div class="full height margin-bottom-30 padding-top-20"> <div class="ui container profile-container"> <div class="ui top attached teal segment profile-header"> <div class="ui grid"> <div class="three wide computer four wide tablet sixteen wide mobile column text-center"> <img src="/assets/img/avatar/d/150.png" alt="" class="rounded centered ui imageheader-avatar"> </div> <div class="eight wide computer twelve wide tablet sixteen wide mobile column profile-info"> <div class="ui header ">{{ ucwords($client->name) }}</div> <a href="#" class="right floated ui basic button"> <i class="edit icon"></i> Edit </a>
/** * @param $request * @param Closure $next * @param $themeName * @return mixed */ public function handle($request, Closure $next, $themeName) { \Theme::set($themeName); return $next($request); }
<?php Theme::asset()->add('timeline', 'assets/css/components/timeline.css'); Theme::asset()->add('profile', 'assets/css/components/profile.css'); Theme::set('bodyClass', 'client'); ?> {!! Theme::partial('head') !!} <div id="main-container" class="pusher"> <div class="full height margin-bottom-30 padding-top-20"> <div class="ui vertical segment"> <div class="ui text container"> <div class="ui header"> <img src="/assets/img/savethechildren.jpg"> <div class="content">{{ $client->name }}</div> </div> </div> </div> <div class="ui stackable column text container grid margin-top-10"> <div class="five wide side column"> {!! Theme::partial('client.sidebar') !!} </div> <div class="eleven wide main column"> {!! Theme::content() !!} </div> </div> </div> </div> {!! Theme::partial('footer') !!}