当前位置: 首页>>代码示例>>PHP>>正文


PHP Assets::add方法代码示例

本文整理汇总了PHP中Assets::add方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::add方法的具体用法?PHP Assets::add怎么用?PHP Assets::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Assets的用法示例。


在下文中一共展示了Assets::add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: before

 function before()
 {
     parent::before();
     if ($this->request->action() !== 'login') {
         $this->check_access();
     }
     Assets::add('css', 'css/langify.css');
     Assets::add('js', 'js/langify.js');
 }
开发者ID:Hinton,项目名称:langify,代码行数:9,代码来源:admin.php

示例2: compose

 public function compose($view)
 {
     \Assets::add(['admin', 'offcanvas', 'datepicker', 'responsive-tables']);
     // Build menu tree for the top bar
     $menu = new Node('menu', [self::buildTree()->addChild(AdminPanelMenuComposer::buildTree())]);
     $rightmenu = new Node('rightmenu', [AdminPanelMenuComposer::buildSecondaryTree()]);
     // Pass menu to the view
     $view->with('menu', $menu->setRender(new FoundationTopBar())->purge())->with('rightmenu', $rightmenu->setRender(new FoundationTopBar())->purge());
 }
开发者ID:nerea91,项目名称:laravel,代码行数:9,代码来源:ReportsMenuComposer.php

示例3: compose

 public function compose($view)
 {
     \Assets::add('admin');
     // Build menu tree for the top bar
     $menu = new Node('menu', [self::buildTree()->addChild(ReportsMenuComposer::buildTree())]);
     $rightmenu = new Node('rightmenu', [self::buildSecondaryTree()]);
     // Pass menu to the view
     $view->with('menu', $menu->setRender(new FoundationTopBar())->purge())->with('rightmenu', $rightmenu->setRender(new FoundationTopBar())->purge());
 }
开发者ID:nerea91,项目名称:laravel,代码行数:9,代码来源:AdminPanelMenuComposer.php

示例4: compose

 public function compose($view)
 {
     \Assets::add('master');
     // Build sections that will be available in all views that use master layout.
     if (auth()->check()) {
         $sections[auth()->user()->getName()] = [link_to_route('admin', _('Dashboard')), link_to_route('logout', _('Logout')), link_to_route('contact', _('Contact'))];
     } else {
         $sections[_('Sections')] = [link_to_route('login', _('Login')), link_to_route('contact', _('Contact'))];
     }
     // Pass sections to the view
     $view->with('sections', $sections);
 }
开发者ID:nerea91,项目名称:laravel,代码行数:12,代码来源:MasterMenuComposer.php

示例5:

{{-- Live preview of Markdown --}}

<?php 
Assets::add(['wiki.css', 'marked.js']);
?>

<fieldset>
	<legend><label>{{ _('Preview') }}</label></legend>
	<div id="preview">{!! $resource->markup !!}</div>
</fieldset>

@section('js')
@parent
<script>
$(document).ready(function() {

	var $source = $("#source"), $preview = $("#preview");
	$source.keyup(function () {
		$preview.html(marked($(this).val()));
	});

});
</script>
@stop
开发者ID:superdol,项目名称:Wiki,代码行数:24,代码来源:preview.blade.php

示例6:

<?php

Assets::add('canvas-demo.js');
?>

@section('main')
<canvas id="displayCanvas" width="1024" height="576"></canvas>
@stop
开发者ID:nerea91,项目名称:laravel,代码行数:8,代码来源:home.blade.php

示例7:

@extends('layouts.base')

<?php 
Assets::add(['admin', 'datatables']);
$labelClass = ['debug' => 'info', 'info' => 'info', 'notice' => 'info', 'warning' => 'warning', 'error' => 'alert', 'critical' => 'alert', 'alert' => 'alert'];
?>

@section('css')
<style>

	table { width:100%; }
	table tbody:hover > tr {/*opacity: 0.8; */}
	table tbody:hover > tr:hover {
		/*opacity: 1.0; */
		background-color:#BBB !important;
	}
	pre {
		font-size:80%;
		padding:0 1em;
	}

	.row.fullWidth {
		width: 100%;
		margin-left: auto;
		margin-right: auto;
		max-width: initial;
		margin-top:1em !important;
	}
	.side-nav .active { border-left: 2px solid #008CBA; }
	.reveal-modal {margin:0 !important}
	.no-wrap{
开发者ID:nerea91,项目名称:laravel,代码行数:31,代码来源:logs.blade.php

示例8: before

 function before()
 {
     parent::before();
     Assets::add('css', 'css/langify.css');
     Assets::add('js', 'js/langify.js');
 }
开发者ID:Hinton,项目名称:langify,代码行数:6,代码来源:translate.php

示例9:

@extends('layouts.master')

<?php 
Assets::add('diff.css');
?>

@section('content')

	<h3 class="text-center">{{ $subtitle }}</h3>


		{{-- FACTS --}}
		<div class="row">
			<div class="small-6 columns">
				<ul class="pricing-table">
					<li class="title">{{ _('Before') }}</li>
					<li class="price">{{ $before->name }}</li>
					<li class="description">{{ _('Created by') }}: {{ $before->user }}</li>
					<li class="bullet-item">{{ $before->created_at }} {{ $before->created_at->diffForHumans() }}</li>
					<li class="cta-button"><a class="button" href="TODO">{{ _('Restore') }}</a></li>
				</ul>
			</div>

			<div class="small-6 columns">
				<ul class="pricing-table">
					<li class="title">{{ _('After') }}</li>
					<li class="price">{{ $after->name }}</li>
					<li class="description">{{ _('Created by') }}: {{ $after->user }}</li>
					<li class="bullet-item">{{ $after->created_at }} {{ $after->created_at->diffForHumans() }}</li>
					<li class="cta-button"><a class="button" href="TODO">{{ _('Restore') }}</a></li>
				</ul>
开发者ID:LeandrosilvaDG,项目名称:Wiki,代码行数:31,代码来源:compare.blade.php

示例10: assetsAction

 /**
  * Minify assets (css & js) files
  */
 public function assetsAction()
 {
     // Set the assets service
     $assets = new Assets();
     $assets->setOptions(['source' => __ROOT__ . '/public/', 'target' => 'min/', 'minify' => Assets::ALWAYS]);
     foreach (['css', 'js'] as $type) {
         $path = __ROOT__ . '/public/' . $type . '/';
         foreach ($iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $item) {
             if (!$item->isDir() && $item->getExtension() == $type) {
                 echo $type . '/' . $iterator->getSubPathName() . "\n";
                 $assets->add($type . '/' . $iterator->getSubPathName());
             }
         }
     }
 }
开发者ID:madoka8,项目名称:ice-base,代码行数:18,代码来源:PrepareTask.php

示例11:

@extends('layouts.base')

<?php 
Assets::add('admin');
?>

@section('body')

	<div class="fixed contain-to-grid">@include('admin/top-bar')</div>

	<div class="row">
		<h1>{!! $title !!}</h1>
		{!! $body !!}
	</div>

@stop
开发者ID:nerea91,项目名称:laravel,代码行数:16,代码来源:document.blade.php

示例12: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(FileEloquentRepository $file_repo, FolderEloquentRepository $folder_repo)
 {
     \Assets::add('vendor/filemanager/js/index.js');
     return view('filemanager::index');
 }
开发者ID:datastat,项目名称:filemanager,代码行数:10,代码来源:FileManagerAdminController.php

示例13:

<?php

Assets::add('wiki.css');
?>

{!! $resource->markup !!}

<p class="text-center">{!! link_to_route('page.version.index', _('View page versions'), [$resource->getKey()], ['class' => 'info tiny button']) !!}</p>

开发者ID:LeandrosilvaDG,项目名称:Wiki,代码行数:8,代码来源:show.blade.php

示例14: config

@extends('layouts.base')

<?php 
Assets::add('master');
?>

@section('body')
<div class="row">
	<div class="large-7 columns large-centered">

		<h2 class="text-center">{{ config('site.name') }}</h2>

		<div class="panel radius">
			<div class="row collapse">
				<div class="small-10 columns">
					<h5>{{ _('Error') }} <span class="color">{{ $code }}</span></h5>
					<h4>{{ $title }}</h4>
				</div>
				<div id="sad" class="small-2 columns text-center"><h1 class="color">:(</h1></div>
			</div>

			<hr/>

			@section('problem-description')
			<p>
			{{ _("Something went wrong while we were processing your request") }}.
			{{ _("We're really sorry about this, and will work hard to get this resolved as soon as possible") }}.
			</p>
			@show

			<p>{!! sprintf(_('Perhaps you would like to go to our %shome page%s?'), '<a href="/">', '</a>') !!}</p>
开发者ID:nerea91,项目名称:laravel,代码行数:31,代码来源:error.blade.php

示例15: markdown

<?php

Assets::add(['markdown.js']);
?>

{!!
	Form::label($f = 'profiles', _('Profiles')),
	checkboxes($f, App\Profile::dropdown(), $resource->profiles->pluck('id')->all())
!!}
@if($errors->has($f))<small class="error">{{ $errors->first($f) }}</small>@endif

{!!
	Form::label($f = 'title', $labels->$f),
	Form::text($f),

	Form::label($f = 'body', $labels->$f),
	Form::textarea($f)
!!}


{{-- Live preview of Markdown --}}
<fieldset id="preview">
	<legend>{{ _('Preview') }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a id="full">{{ _('Toggle full screen') }}</a></legend>
	<h1 id="previewTitle">{!! $resource->title !!}</h1>
	<div id="previewBody">{!! markdown($resource->body) !!}</div>
</fieldset>

@section('js')
@parent
<script>
$(document).ready(function() {
开发者ID:nerea91,项目名称:laravel,代码行数:31,代码来源:fields.blade.php


注:本文中的Assets::add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。