public function show(Request $request) { if (!$request->get('email')) { // we notify the current user Modal::alert([trans('validation.required', ['attribute' => trans('validation.attributes.email')])], 'error'); return redirect()->route('password.index'); } // we get the user if (!($user = Sentinel::findUserByCredentials($request->only('email')))) { // we notify the current user Modal::alert([trans('auth.message.find.failure', ['email' => $request->get('email')])], 'error'); return redirect()->route('password.index'); } // we verify that the reminder token is valid if (!Reminder::exists($user, $request->only('token'))) { // notify the user & redirect Modal::alert([trans('auth.message.password_reset.token.expired')], 'error'); return redirect(route('password.index')); } // SEO settings $this->seo_meta['page_title'] = trans('seo.front.password.show.title'); $this->seo_meta['meta_desc'] = trans('seo.front.password.show.description'); $this->seo_meta['meta_keywords'] = trans('seo.front.password.show.keywords'); // data send to the view $data = ['email' => $request->get('email'), 'reminder' => $request->get('token'), 'seo_meta' => $this->seo_meta, 'css' => elixir('css/app.auth.css')]; return view('pages.front.password-reset')->with($data); }
/** * @return $this */ public function index() { // SEO Meta settings $this->seo_meta['page_title'] = trans('seo.front.registration.title'); $this->seo_meta['meta_desc'] = trans('seo.front.registration.description'); $this->seo_meta['meta_keywords'] = trans('seo.front.registration.keywords'); // og meta settings $this->og_meta['og:title'] = trans('seo.front.registration.title'); $this->og_meta['og:description'] = trans('seo.front.registration.description'); $this->og_meta['og:type'] = 'article'; $this->og_meta['og:url'] = route('registration.index'); // we get the registration prices $prices = $this->repository->where('active', true)->orderBy('price', 'asc')->get(); // we get the json registration content $registration_page = null; if (is_file(storage_path('app/registration/content.json'))) { $registration_page = json_decode(file_get_contents(storage_path('app/registration/content.json'))); } // we parse the markdown content $parsedown = new Parsedown(); $description = isset($registration_page->description) ? $parsedown->text($registration_page->description) : null; // we replace the images aliases by real paths $description = ImageManager::replaceLibraryImagesAliasesByRealPath($description); // we replace the files aliases by real paths $description = FileManager::replaceLibraryFilesAliasesByRealPath($description); // prepare data for the view $data = ['seo_meta' => $this->seo_meta, 'og_meta' => $this->og_meta, 'prices' => $prices, 'title' => isset($registration_page->title) ? $registration_page->title : null, 'registration_form_file' => isset($registration_page->registration_form_file) ? $registration_page->registration_form_file : null, 'background_image' => isset($registration_page->background_image) ? $registration_page->background_image : null, 'description' => $description, 'css' => elixir('css/app.registration.css')]; // return the view with data return view('pages.front.registration')->with($data); }
public static function elixir($asset) { $asset = elixir($asset); if (starts_with($asset, '/')) { $asset = substr($asset, 1); } return $asset; }
/** * Get the path to a versioned Elixir file or fallback to original file. * * @param string $file * * @return string */ function assetic($file) { try { return asset(elixir($file)); } catch (Exception $e) { return asset($file); } }
/** * Render the given HttpException. * * @param \Symfony\Component\HttpKernel\Exception\HttpException $e * @return \Symfony\Component\HttpFoundation\Response */ protected function renderHttpException(HttpException $e) { // load base JS JavaScript::put(['base_url' => url('/'), 'site_name' => config('settings.app_name_' . config('app.locale'))]); $seo_meta = ['page_title' => 'Erreur ' . $e->getStatusCode(), 'meta_desc' => $e->getMessage(), 'meta_keywords' => '']; $data = ['code' => $e->getStatusCode(), 'seo_meta' => $seo_meta, 'css' => elixir('css/app.error.css')]; return response()->view('templates.common.errors.errors', $data); }
/** * @param $path * @return string */ public function getFullPath($path) { if ($this->use_elixir) { $path = rtrim($this->path, '/') . '/' . $path; return elixir($path); } else { return url($path); } }
/** * login * * @return $this */ protected function index() { // SEO settings $this->seo_meta['page_title'] = trans('seo.front.login.index.title'); $this->seo_meta['meta_desc'] = trans('seo.front.login.index.description'); $this->seo_meta['meta_keywords'] = trans('seo.front.login.index.keywords'); // data send to the view $data = ['seo_meta' => $this->seo_meta, 'css' => elixir('css/app.auth.css')]; return view('pages.front.login')->with($data); }
/** * @return $this */ public function createAccount(Request $request) { // SEO Meta settings $this->seo_meta['page_title'] = trans('seo.front.account.create.title'); $this->seo_meta['meta_desc'] = trans('seo.front.account.create.description', ['site' => config('settings.app_name_' . config('app.locale'))]); $this->seo_meta['meta_keywords'] = trans('seo.front.account.create.keywords'); // prepare data for the view $data = ['seo_meta' => $this->seo_meta, 'email' => $request->get('email'), 'css' => elixir('css/app.auth.css')]; // return the view with data return view('pages.front.account-create')->with($data); }
public function showEdit(Request $request) { $current_user = ParseUser::getCurrentUser(); Html\Assets::addLink(Html\Link::Css('/vendor/dropzone/dropzone.css')); Html\Assets::addLink(Html\Link::Css(elixir('css/default.css'))); Html\Assets::addLink(Html\Link::Script('//www.parsecdn.com/js/parse-1.6.7.min.js')); Html\Assets::addLink(Html\Link::Script('/vendor/dropzone/dropzone.js')); Html\Assets::addLink(Html\Link::Script(elixir('scripts/profileUploader.js'))); Html\Assets::addMetaTag(Html\Meta::Tag('description', '')); $renderData = $this->getRenderData($request); $renderData['user'] = $current_user; return view('editprofile', $renderData); }
public function __construct(Request $request) { //add default css and site js Html\Assets::addLink(Html\Link::Css('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600italic,600,700')); Html\Assets::addLink(Html\Link::Css('/vendor/bootstrap/3.3.5/css/bootstrap.min.css')); Html\Assets::addLink(Html\Link::Css('/vendor/font-awesome/4.4.0/css/font-awesome.min.css')); Html\Assets::addLink(Html\Link::Script('/vendor/jquery/1.11.1/jquery.min.js')); Html\Assets::addLink(Html\Link::Script(elixir('scripts/loading.js'))); Html\Assets::addLink(Html\Link::Script('/vendor/bootstrap/3.3.5/js/bootstrap.min.js')); Html\Assets::addLink(Html\Link::Script('/vendor/notifyjs/notify.min.js')); Html\Assets::addLink(Html\Link::Script(elixir('scripts/footer.js'))); Html\Assets::addLink(Html\Link::Script(elixir('scripts/notify.js'))); }
/** * @return $this */ public function index() { // we get the palmares list $palmares = $this->repository->eventsWithResultsSortedByCategory(); // SEO Meta settings $this->seo_meta['page_title'] = 'Palmares'; $this->seo_meta['meta_desc'] = 'Découvrez le palmares du club Université Nantes Aviron, depuis sa création jusqu\'a aujourd\'hui...'; $this->seo_meta['meta_keywords'] = 'club, université, nantes, aviron, palmares, resultats'; // prepare data for the view $data = ['seo_meta' => $this->seo_meta, 'palmares' => $palmares, 'css' => elixir('css/app.palmares.css')]; // return the view with data return view('pages.front.palmares')->with($data); }
/** * @return $this */ public function index(Request $request) { // we get the json content $page = null; if (is_file(storage_path('app/photos/content.json'))) { $page = json_decode(file_get_contents(storage_path('app/photos/content.json'))); } // we parse the markdown content $parsedown = new Parsedown(); $title = isset($page->title) ? $page->title : null; $description = isset($page->description) ? $parsedown->text($page->description) : null; // SEO Meta settings $this->seo_meta['page_title'] = trans('seo.front.photos.title') ? trans('seo.front.photos.title') : $title; $this->seo_meta['meta_desc'] = trans('seo.front.photos.description') ? trans('seo.front.photos.description') : str_limit($description, 160); $this->seo_meta['meta_keywords'] = trans('seo.front.photos.keywords'); // og meta settings $this->og_meta['og:title'] = trans('seo.front.photos.title') ? trans('seo.front.photos.title') : $title; $this->og_meta['og:description'] = trans('seo.front.photos.description') ? trans('seo.front.photos.description') : str_limit($description, 160); $this->og_meta['og:type'] = 'article'; $this->og_meta['og:url'] = route('photos.index'); if (isset($page->background_image)) { $this->og_meta['og:image'] = ImageManager::imagePath(config('image.photos.public_path'), $page->background_image, 'background_image', 767); } // we sanitize the entries $request->replace(InputSanitizer::sanitize($request->all())); // we convert the fr date to database format if ($request->get('year')) { $request->merge(['year' => Carbon::create($request->get('year'))->format('Y')]); } // we check inputs validity $rules = ['year' => 'date_format:Y']; // we check the inputs validity if (!Validation::check($request->all(), $rules)) { return redirect()->back(); } // we get the availables years $years = $this->repository->getAvailableYears(); // we set the year if ($request->year) { $selected_year = $request->year; } else { $selected_year = array_first($years); } // sort results by year $photos_list = $this->repository->getModel()->whereBetween('date', [$selected_year . '-01-01', $selected_year . '-12-31'])->where('active', true)->orderBy('date', 'desc')->get(); // prepare data for the view $data = ['seo_meta' => $this->seo_meta, 'og_meta' => $this->og_meta, 'photos_list' => $photos_list, 'title' => isset($page->title) ? $page->title : null, 'background_image' => isset($page->background_image) ? $page->background_image : null, 'description' => $description, 'years' => $years, 'selected_year' => $selected_year, 'css' => elixir('css/app.photos.css'), 'js' => elixir('js/app.photos.js')]; // return the view with data return view('pages.front.photos-list')->with($data); }
/** * {@inheritdoc} */ public function toString() { $path = $this->path ?: false; if ($path === false) { return false; } if ($this->elixir === true) { $path = elixir($path); } if (in_array(env('APP_ENV'), $this->environments)) { return $this->cdn() . $path; } return $path; }
public function showRegister(Request $request) { Html\Assets::addLink(Html\Link::Css(elixir('css/default.css'))); Html\Assets::addMetaTag(Html\Meta::Tag('description', '')); $renderData = $this->getRenderData($request); $redirect_url = $request->getSchemeAndHttpHost() . '/fblogin'; $permissions = ['email']; $fb = new Facebook(['app_id' => config('facebook.app_id'), 'app_secret' => config('facebook.app_secret'), 'default_graph_version' => 'v2.2']); $helper = $fb->getRedirectLoginHelper(); $renderData['msg'] = $request->session()->get('message') ?: ''; $renderData['activeTab'] = 'signup'; $renderData['fb_login_url'] = $helper->getLoginUrl($redirect_url, $permissions); return view('login', $renderData); }
/** * @return $this */ public function index() { // SEO Meta settings $this->seo_meta['page_title'] = trans('seo.front.calendar.title'); $this->seo_meta['meta_desc'] = trans('seo.front.calendar.description'); $this->seo_meta['meta_keywords'] = trans('seo.front.calendar.keywords'); // og meta settings $this->og_meta['og:title'] = trans('seo.front.calendar.title'); $this->og_meta['og:description'] = trans('seo.front.calendar.description'); $this->og_meta['og:type'] = 'article'; $this->og_meta['og:url'] = route('calendar.index'); // prepare data for the view $data = ['seo_meta' => $this->seo_meta, 'og_meta' => $this->og_meta, 'css' => elixir('css/app.calendar.css')]; // return the view with data return view('pages.front.calendar')->with($data); }
public function showUploader($roomId, Request $request) { $current_user = ParseUser::getCurrentUser(); if (!$current_user) { return redirect()->route('login'); } $message = $request->input('msg'); Html\Assets::addLink(Html\Link::Css('/vendor/dropzone/dropzone.css')); Html\Assets::addLink(Html\Link::Css(elixir('css/default.css'))); Html\Assets::addLink(Html\Link::Script('//www.parsecdn.com/js/parse-1.6.7.min.js')); Html\Assets::addLink(Html\Link::Script('/vendor/dropzone/dropzone.js')); Html\Assets::addLink(Html\Link::Script(elixir('scripts/chatUploader.js'))); Html\Assets::addMetaTag(Html\Meta::Tag('description', '')); $query = new ParseQuery("ChatRoom"); $chatObj = $query->get($roomId); $renderData = $this->getRenderData($request); $renderData['user'] = $current_user; $renderData['chatObj'] = $chatObj; $renderData['message'] = $message; return view('chatUploader', $renderData); }
/** * @return $this */ public function index() { // SEO Meta settings $this->seo_meta['page_title'] = trans('seo.front.leading_team.title'); $this->seo_meta['meta_desc'] = trans('seo.front.leading_team.description'); $this->seo_meta['meta_keywords'] = trans('seo.front.leading_team.keywords'); // og meta settings $this->og_meta['og:title'] = trans('seo.front.leading_team.title'); $this->og_meta['og:description'] = trans('seo.front.leading_team.description'); $this->og_meta['og:type'] = 'article'; $this->og_meta['og:url'] = route('front.leading_team'); // we get the activated members of the leading team and the employees $team = $this->repository->getModel()->whereHas('activations', function ($query) { $query->where('activations.completed', true); })->where(function ($query) { $query->whereIn('board_id', config('user.board_key')); $query->orWhere('status_id', config('user.status_key.employee')); })->orderBy('status_id', 'asc')->get(); // prepare data for the view $data = ['seo_meta' => $this->seo_meta, 'og_meta' => $this->og_meta, 'team' => $team, 'css' => elixir('css/app.leading-team.css'), 'js' => elixir('js/app.leading-team.js')]; // return the view with data return view('pages.front.leading-team')->with($data); }
<!-- Footer --> <footer> <div class="row"> <div class="col-lg-12"> <p>Copyright © 2015 | <a href="http://vk.com/gurkalov" title="Гуркалов Дмитрий">Гуркалов Дмитрий</a></p> </div> </div> </footer> </div> <!-- /.container --> <script src='<?php echo subdomainStatic(elixir("js/all.js")); ?> '></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.js"></script> <?php if ('production' === env('APP_ENV', 'local')) { ?> <!-- Yandex.Metrika counter --> <script type="text/javascript"> (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter33451068 = new Ya.Metrika({ id:33451068, clickmap:true, trackLinks:true, accurateTrackBounce:true
public function getThumbnailUrl() { if (Storage::exists($this->getThumbnailDir() . $this->name)) { return route('account.uploads.thumbnail', $this); } return elixir('assets/img/thumbnail.png'); }
</md-caption> </footer> </body> <script src="<?php echo elixir('js/dependencies.js'); ?> "></script> <script src="<?php echo elixir('js/app.js'); ?> "></script> <script src="<?php echo elixir('js/app.js'); ?> "></script> <script src="https://cdn.socket.io/socket.io-1.3.7.js"></script> <!-- difficulty including this in bower file for now, more research needs to be done --> <script> angular.module("iserveu").constant("CSRF_TOKEN", '<?php echo csrf_token(); ?> '); </script> <script src="/themes/<?php echo Setting::get('theme.name', 'default'); ?> /theme.js"></script>
/** * @param string $filename [default: css/all.css] * @param null|string $dependency * @param array|null $attributes * * @return $this */ public function addCssElixir($filename = 'css/all.css', $dependency = null, array $attributes = []) { return $this->addCss($filename, elixir($filename), $dependency, $attributes); }
/** * @param string $filename [default: js/app.js] * @param null|string $dependency * @param bool $footer * * @return $this */ public function addJsElixir($filename = 'js/app.js', $dependency = null, $footer = false) { return $this->addJs($filename, elixir($filename), $dependency, $footer); }
/** * @param $news_key * @return $this */ public function preview($id) { // we check the current user permission if (!Permission::hasPermission('news.preview')) { // we redirect the current user to the news page edit if he has the required permission if (Sentinel::getUser()->hasAccess('news.page.view')) { return redirect()->route('news.page.edit'); } else { // or we redirect the current user to the dashboard return redirect()->route('dashboard.index'); } } // we get the news from its unique key try { $news = $this->repository->getModel()->where('id', $id)->firstOrFail(); } catch (Exception $e) { // we log the error CustomLog::error($e); Modal::alert([trans('news.message.find.failure', ['id' => $id])], 'error'); return redirect()->back(); } // we parse the markdown content $parsedown = new Parsedown(); $news->content = isset($news->content) ? $parsedown->text($news->content) : null; // we replace the images aliases by real paths $news->content = ImageManager::replaceLibraryImagesAliasesByRealPath($news->content); // we replace the files aliases by real paths $news->content = FileManager::replaceLibraryFilesAliasesByRealPath($news->content); // SEO Meta settings $this->seo_meta['page_title'] = $news->meta_title ? $news->meta_title : $news->title; $this->seo_meta['meta_desc'] = $news->meta_desc ? $news->meta_desc : str_limit(strip_tags($news->content), 160); $this->seo_meta['meta_keywords'] = $news->meta_keywords; // og meta settings $this->og_meta['og:title'] = $news->meta_title ? $news->meta_title : $news->title; $this->og_meta['og:description'] = $news->meta_desc ? $news->meta_desc : str_limit(strip_tags($news->content), 160); $this->og_meta['og:type'] = 'article'; $this->og_meta['og:url'] = route('news.show', ['id' => $news->id, 'key' => $news->key]); if ($news->image) { $this->og_meta['og:image'] = $news->imagePath($news->image, 'image', '767'); } // prepare data for the view $data = ['seo_meta' => $this->seo_meta, 'og_meta' => $this->og_meta, 'news' => $news, 'css' => elixir('css/app.news.css'), 'js' => elixir('js/app.news-detail.js')]; // return the view with data return view('pages.front.news-detail')->with($data); }
/** * @return $this */ public function show() { // SEO Meta settings $this->seo_meta['page_title'] = trans('seo.front.home.show.title'); $this->seo_meta['meta_desc'] = trans('seo.front.home.show.description'); $this->seo_meta['meta_keywords'] = trans('seo.front.home.show.keywords'); // we get the two last news $last_news = $this->news->where('released_at', '<=', Carbon::now()->format('Y-m-d H:i:s'))->where('active', true)->orderBy('released_at', 'desc')->take(2)->get(); // we convert in html the markdown content of each news if ($last_news) { $parsedown = new Parsedown(); foreach ($last_news as $n) { $n->content = isset($n->content) ? $parsedown->text($n->content) : null; } } // we get the slides $slides = $this->slide->orderBy('position', 'asc')->where('active', true)->get(); JavaScript::put(['slides_count' => sizeof($slides)]); // we get the json home content $home = []; if (is_file(storage_path('app/home/content.json'))) { $home = json_decode(file_get_contents(storage_path('app/home/content.json'))); } // we parse the markdown content $parsedown = new Parsedown(); $description = isset($home->description) ? $parsedown->text($home->description) : null; // we replace the images aliases by real paths $description = ImageManager::replaceLibraryImagesAliasesByRealPath($description); // we replace the files aliases by real paths $description = FileManager::replaceLibraryFilesAliasesByRealPath($description); // og meta settings $this->og_meta['og:title'] = trans('seo.front.home.show.title'); $this->og_meta['og:description'] = trans('seo.front.home.show.description'); $this->og_meta['og:url'] = route('home'); $this->og_meta['og:image'] = $slides[0]->imagePath($slides[0]->background_image, 'background_image', '767'); $this->og_meta['og:video'] = $home->video_link; // prepare data for the view $data = ['seo_meta' => $this->seo_meta, 'og_meta' => $this->og_meta, 'slides' => $slides, 'last_news' => $last_news, 'title' => isset($home->title) ? $home->title : null, 'description' => $description, 'video_link' => isset($home->video_link) ? $home->video_link : null, 'css' => elixir('css/app.home.css'), 'js' => elixir('js/app.home.js')]; // return the view with data return view('pages.front.home')->with($data); }
<html <?php language_attributes(); ?> > <head> <meta charset="<?php bloginfo('charset'); ?> "> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width"> <title></title> <link rel="stylesheet" href="<?php elixir('/themes/app/styles/app.css'); ?> "> <?php wp_head(); ?> </head> <body> <script src="<?php elixir('/themes/app/scripts/app.js'); ?> "></script> <?php wp_footer(); ?> </body> </html>
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <title>Grãdina Puzzle</title> <link rel="stylesheet" type="text/css" href="<?php echo elixir("css/app.css"); ?> "> </head> <body> @include('navbar') <div id="garden-background"> <svg> <rect x="0" y="0" width="200%" height="200%" fill="url(#gridPattern)" id="bgRectangle" /> </svg> </div> <div id="garden-container"> <svg> </svg> <div id="garden-select"></div> </div> <div id="garden-price"> <span class="total-label">Preț Execuție: <span class="total-number">0</span></span> <button type="button" class="details-btn">Detalii</button> <div class="details-container hidden"> <div class="details-content"> <button type="button" class="close" aria-label="Close"><span aria-hidden="true">×</span></button> <table class="details-grid"> <thead>
" rel="stylesheet" type="text/css"> </head> <body> <div class="container"> <div class="row header"> <h1>Sportschool</h1> </div> @include('_nav') @yield('content') </div> <script type="text/javascript"> var _paq = _paq || []; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//stats.bcome.nl/"; _paq.push(['setTrackerUrl', u+'s.php']); _paq.push(['setSiteId', 5]); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'s.js'; s.parentNode.insertBefore(g,s); })(); </script> <noscript><p><img src="//stats.bcome.nl/piwik.php?idsite=5" style="border:0;" alt="" /></p></noscript> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="<?php echo elixir('js/all.js'); ?> "></script> @yield('scripts') </body> </html>
<html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title> <?php $__env->startSection('title'); ?> <?php echo $__env->yieldSection(); ?> </title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> <link href="/addons/bootstrap/jquery.smartmenus.bootstrap.css" rel="stylesheet"> <link rel="stylesheet" href="<?php echo e(elixir('css/app.css')); ?> "/> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-inverse" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span>
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <title><?php echo isset($title) ? $title : 'Admin'; ?> </title> <link rel="stylesheet" type="text/css" href="<?php echo elixir("css/admin.css"); ?> "> @yield("extend-head") </head> <body> <div class="container"> @include('navbar') <div class="col-xs-12"> @yield("body") </div> </div> @yield("extend-body") </body> </html>
/** * 获取 elixir 的 CDN 连接. * * @param $file * * @return string */ function cdn_elixir($file) { $cdn_url = config('app.static_mirror_url'); return $cdn_url ? trim($cdn_url, '/') . elixir($file) : elixir($file); }