本文整理汇总了PHP中Theme::asset方法的典型用法代码示例。如果您正苦于以下问题:PHP Theme::asset方法的具体用法?PHP Theme::asset怎么用?PHP Theme::asset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Theme
的用法示例。
在下文中一共展示了Theme::asset方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAvatar
public function getAvatar($size = 100)
{
if (empty($this->entity->logo)) {
return \Theme::asset()->img('theme/images/game/logo.jpg');
}
return \Image::url($this->entity->logo, $size);
}
示例2: getCover
/**
* Get user cover image
*/
public function getCover()
{
$default = \Theme::asset()->img("theme/images/profile-cover.jpg");
if (!$this->entity->cover) {
return $default;
}
return \Image::url($this->entity->cover);
}
示例3: __construct
public function __construct()
{
$this->theme = Theme::type('frontend')->current(\ThemeManager::getActive('frontend'))->reBoot()->layout('layouts.default');
$this->setTitle();
$this->theme->share('loggedInUser', \Auth::user());
$this->theme->share('languages', app('App\\Repositories\\LanguageRepository')->all());
//attach before filter
if (Config::get('maintenance-mode', 0)) {
if (Auth::check() and Auth::user()->id == 1) {
//don't enable it for maintain admin
} else {
$this->beforeFilter('maintenance');
}
}
/**
* Set global site variables
*/
$updateSpeed = \Config::get('realtime-check-interval', 30000);
$updateSpeed = !$updateSpeed ? 30000 : $updateSpeed;
$this->theme->share('site_name', \Config::get('site_title'));
$this->theme->share('site_description', \Config::get('site_description'));
$this->theme->share('site_keywords', \Config::get('site_keywords'));
$this->theme->share('ogType', 'website');
$this->theme->share('ogSiteName', \Config::get('site_title'));
$this->theme->share('ogUrl', \URL::to('/'));
$this->theme->share('ogTitle', \Config::get('site_title'));
$this->theme->share('ogImage', $this->theme->asset()->img('theme/images/logo.png'));
$ajaxify = \Config::get('ajaxify_frontend') ? 'true' : 'false';
$emoticons = \Theme::option()->get('emoticons');
$emoticonLists = '';
if ($emoticons) {
foreach ($emoticons as $code => $details) {
$emoticonLists .= "'<img width=\\'16\\' height=\\'16\\' src=\\'" . $details['image'] . "\\' title=\\'" . $details['title'] . "\\'/>',\n";
}
}
$this->theme->asset()->beforeScriptContent("\n var baseUrl = '" . \URL::to('/') . "/';\n var siteName = '" . \Config::get('site_title') . "';\n var doAjaxify = " . $ajaxify . ";\n var maxPostImage = " . \Config::get('max-images-per-post', '') . ";\n var updateSpeed = " . $updateSpeed . ";\n var isLogin = '" . (Auth::check() ? 'true' : 'false') . "';\n var imgIndicator = '" . \Theme::asset()->img('theme/images/loading.gif') . "';\n\n //time_ago translation\n var trans_ago = '" . trans('global.ago') . "';\n var trans_from_now = '" . trans('global.from-now') . "';\n var trans_any_moment = '" . trans('global.any-moment') . "';\n var trans_less_than_minute = '" . trans('global.less-than-minute') . "';\n var trans_about_minute = '" . trans('global.about-minute') . "';\n var trans_minutes = '" . trans('global.minutes') . "';\n var trans_about_hour = '" . trans('global.about-hour') . "';\n var trans_hours = '" . trans('global.hours') . "';\n var trans_about = '" . trans('global.about') . "';\n var trans_a_day = '" . trans('global.a-day') . "';\n var trans_days = '" . trans('global.days') . "';\n var trans_about_month = '" . trans('global.about-month') . "';\n var trans_months = '" . trans('global.months') . "';\n var trans_about_year = '" . trans('global.about-year') . "';\n var trans_years = '" . trans('global.years') . "';\n var emoticons = [" . $emoticonLists . "];\n ");
/**
* Usefull repository in views
*/
$this->theme->share('connectionRepository', app('App\\Repositories\\ConnectionRepository'));
$this->theme->share('searchRepository', app('App\\Repositories\\SearchRepository'));
$this->theme->share('notificationRepository', app('App\\Repositories\\NotificationRepository'));
$this->theme->share('likeRepository', app('App\\Repositories\\LikeRepository'));
}
示例4:
<?php
Theme::asset()->add('jquery', 'library/jquery/jquery.min.js');
Theme::asset()->usePath()->add('framework', 'js/app.js', ['jquery']);
?>
{!! Form::open() !!}
<input type="hidden" name="file_id" value="{{$file->id }}"/>
<div class="modal-header">
<button type="button" class="close" data-dismiss="popup">×</button>
<h4 class="modal-title">Attachment:: {{$file->file_name }}</h4>
</div>
<div class="modal-body">
<p></p>
<div class="form-group">
<label>Title</label>
<input
type="text"
name="title"
class="form-control"
value="{{$file->title }}"
/>
</div>
<div class="form-group">
<label>Description</label>
<textarea name="description" class="form-control">{{$file->description }}</textarea>
</div>
</div>
<div class="modal-footer">
示例5: array
<?php
return array('design-themes' => ['default' => ['background-image' => Theme::asset()->img('theme/images/background.jpg'), 'background-color' => '#E8E7E7', 'background-position' => '', 'background-attachment' => 'fixed', 'background-repeat' => 'no-repeat', 'link-color' => '#6C7A89', 'page-content-bg-color' => 'rgba(255, 255, 255, 0.3)', 'preview-image' => Theme::asset()->img('theme/images/design/previews/default.png')], 'ocean-blue' => ['background-image' => Theme::asset()->img('theme/images/design/bg/ocean-blue.jpg'), 'background-color' => '#d4c397', 'background-position' => '', 'background-attachment' => 'scroll', 'background-repeat' => 'repeat-x', 'link-color' => '#2b072b', 'page-content-bg-color' => 'rgba(255, 255, 255, 0.3)', 'preview-image' => Theme::asset()->img('theme/images/design/previews/ocean-blue.jpg')], 'shine-green' => ['background-image' => Theme::asset()->img('theme/images/design/bg/shine-green.jpg'), 'background-color' => '#86B63D', 'background-position' => '', 'background-attachment' => 'fixed', 'background-repeat' => 'repeat', 'link-color' => '#467d19', 'page-content-bg-color' => 'rgba(255, 255, 255, 0.3)', 'preview-image' => Theme::asset()->img('theme/images/design/previews/shine-green.jpg')], 'circle-black' => ['background-image' => Theme::asset()->img('theme/images/design/bg/circle-black.jpg'), 'background-color' => '#0A0A0A', 'background-position' => '', 'background-attachment' => 'fixed', 'background-repeat' => 'repeat', 'link-color' => '#ad0c1a', 'page-content-bg-color' => 'rgba(10,9,10, 0.2)', 'preview-image' => Theme::asset()->img('theme/images/design/previews/circle-black.jpg')], 'blacktopo' => ['background-image' => Theme::asset()->img('theme/images/design/bg/blacktopo.jpg'), 'background-color' => '#0A0A0A', 'background-position' => '', 'background-attachment' => 'fixed', 'background-repeat' => 'repeat', 'link-color' => '#ad0c1a', 'page-content-bg-color' => 'rgba(10,9,10, 0.2)', 'preview-image' => Theme::asset()->img('theme/images/design/previews/blacktopo.jpg')], 'darkblue-star' => ['background-image' => Theme::asset()->img('theme/images/design/bg/darkblue-star.jpg'), 'background-color' => '#0A0A0A', 'background-position' => '', 'background-attachment' => 'fixed', 'background-repeat' => 'repeat', 'link-color' => '#ad0c1a', 'page-content-bg-color' => 'rgba(255,255,255, 0.2)', 'preview-image' => Theme::asset()->img('theme/images/design/previews/darkblue-star.jpg')], 'purple-bird' => ['background-image' => Theme::asset()->img('theme/images/design/bg/purple-bird.jpg'), 'background-color' => '#9e7d65', 'background-position' => '', 'background-attachment' => 'fixed', 'background-repeat' => 'repeat', 'link-color' => '#7a4116', 'page-content-bg-color' => 'rgba(255,255,255, 0.2)', 'preview-image' => Theme::asset()->img('theme/images/design/previews/purple-bird.jpg')], 'purple-star' => ['background-image' => Theme::asset()->img('theme/images/design/bg/purple-star.jpg'), 'background-color' => '#e391e3', 'background-position' => '', 'background-attachment' => 'fixed', 'background-repeat' => 'repeat', 'link-color' => '#870f7f', 'page-content-bg-color' => 'rgba(255,255,255, 0.2)', 'preview-image' => Theme::asset()->img('theme/images/design/previews/purple-star.jpg')], 'red-flower' => ['background-image' => Theme::asset()->img('theme/images/design/bg/red-flower.jpg'), 'background-color' => '#eb4971', 'background-position' => '', 'background-attachment' => 'fixed', 'background-repeat' => 'repeat', 'link-color' => '#c70c57', 'page-content-bg-color' => 'rgba(255,255,255, 0.2)', 'preview-image' => Theme::asset()->img('theme/images/design/previews/red-flower.jpg')], 'river-purple' => ['background-image' => Theme::asset()->img('theme/images/design/bg/river-purple.jpg'), 'background-color' => '#66431e', 'background-position' => '', 'background-attachment' => 'fixed', 'background-repeat' => 'repeat', 'link-color' => '#522a06', 'page-content-bg-color' => 'rgba(255,255,255, 0.2)', 'preview-image' => Theme::asset()->img('theme/images/design/previews/river-purple.jpg')]], 'emoticons' => [':)' => ['title' => 'Smile', 'image' => Theme::asset()->img('theme/images/emoticons/big_smile.png')], ':<)' => ['title' => 'Bad Smile', 'image' => Theme::asset()->img('theme/images/emoticons/bad_smile.png')], '-:' => ['title' => 'Amazing', 'image' => Theme::asset()->img('theme/images/emoticons/amazing.png')], ':@' => ['title' => 'Anger', 'image' => Theme::asset()->img('theme/images/emoticons/anger.png')], ':b' => ['title' => 'Bad Egg', 'image' => Theme::asset()->img('theme/images/emoticons/bad_egg.png')], ')b' => ['title' => 'Beaten', 'image' => Theme::asset()->img('theme/images/emoticons/beaten.png')], '(b' => ['title' => 'Black Heart', 'image' => Theme::asset()->img('theme/images/emoticons/black_heart.png')], ':c' => ['title' => 'Cry', 'image' => Theme::asset()->img('theme/images/emoticons/cry.png')], ':-)' => ['title' => 'Happy', 'image' => Theme::asset()->img('theme/images/emoticons/happy.png')], ';-e' => ['title' => 'Electric Shock', 'image' => Theme::asset()->img('theme/images/emoticons/electric_shock.png')], ';-g' => ['title' => 'Girl', 'image' => Theme::asset()->img('theme/images/emoticons/girl.png')], ';-ce' => ['title' => 'Exciting', 'image' => Theme::asset()->img('theme/images/emoticons/exciting.png')], ';-ye' => ['title' => 'Eyes droped', 'image' => Theme::asset()->img('theme/images/emoticons/eyes_droped.png')], ';-(g' => ['title' => 'Greedy', 'image' => Theme::asset()->img('theme/images/emoticons/greedy.png')], ';-ha' => ['title' => 'Haha', 'image' => Theme::asset()->img('theme/images/emoticons/haha.png')], ';-ho' => ['title' => 'Horror', 'image' => Theme::asset()->img('theme/images/emoticons/horror.png')], ';-)m' => ['title' => 'Money', 'image' => Theme::asset()->img('theme/images/emoticons/money.png')], ';-)-n' => ['title' => 'Nothing', 'image' => Theme::asset()->img('theme/images/emoticons/nothing.png')], ';-)-sn' => ['title' => 'Nothing to say', 'image' => Theme::asset()->img('theme/images/emoticons/nothing_to_say.png')], ';-rh' => ['title' => 'Red heart', 'image' => Theme::asset()->img('theme/images/emoticons/red_heart.png')], ';-sc' => ['title' => 'Scorn', 'image' => Theme::asset()->img('theme/images/emoticons/scorn.png')], ';-sh' => ['title' => 'Shame', 'image' => Theme::asset()->img('theme/images/emoticons/shame.png')], ';-s-h' => ['title' => 'Shocked', 'image' => Theme::asset()->img('theme/images/emoticons/shocked.png')], ';-sp' => ['title' => 'Super Man', 'image' => Theme::asset()->img('theme/images/emoticons/super_man.png')], ';-im' => ['title' => 'Iron Man', 'image' => Theme::asset()->img('theme/images/emoticons/the_iron_man.png')], ':P' => ['title' => 'Tongue', 'image' => Theme::asset()->img('theme/images/emoticons/grimace.png')], ':(' => ['title' => 'Unhappy', 'image' => Theme::asset()->img('theme/images/emoticons/unhappy.png')], ':-v' => ['title' => 'Victory', 'image' => Theme::asset()->img('theme/images/emoticons/victory.png')]]);
示例6:
<table id="tblBank" class="BankBinTable table compact">
<thead>
<tr>
<th class="th_left" style="background-color: #788C9E;">Bank Name</th>
<th class="" style="background-color: #788C9E;">Bank Is Product</th>
<th class="" style="background-color: #788C9E;">Bank Logo</th>
<th class="" style="background-color: #788C9E;">Action</th>
</tr>
</thead>
</table>
</div>
<div class="tab-pane " id="tabbankbran" data-id="4">
<div class="btn-add-maintain">
<img id="btnAddBankBranch" class="icons" src="<?php
echo Theme::asset()->url('img/add_button.png');
?>
" />
</div>
<table id="tblbankbran" class="bankbranBinTable table compact">
<thead>
<tr>
<th class="th_left" style="background-color: #788C9E;">Branch Name</th>
<th class="" style="background-color: #788C9E;">Address</th>
<th class="" style="background-color: #788C9E;">Contact No.</th>
<th class="" style="background-color: #788C9E;">Bank Name</th>
<th class="" style="background-color: #788C9E;">Bank Logo</th>
<th class="" style="background-color: #788C9E;">Action</th>
</tr>
</thead>
</table>
示例7:
<?php
Theme::asset()->add('autotranslator-css', 'autotranslator::css/autotranslator.css');
Theme::asset()->add('autotranslator-js', 'autotranslator::js/autotranslator.js');
示例8:
<img src="<?php
echo Theme::asset()->url('img/divider.png');
?>
" />
</li>
<li class="custom-inline">
<div class="welcomeNote">
<div class="collapse navbar-collapse" style="font-family: {{ URL::to('themes/admin/assets/fonts/Roboto-Thin.ttf') }};
font-size: 28pt;font-weight: lighter;">
Welcome <?php
echo Auth::user()->user_fname;
?>
</div>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<img class="dropDown" src="<?php
echo Theme::asset()->url('img/drppdown.png');
?>
" />
</a>
<ul class="dropdown-menu" role="menu">
<!-- <li>-->
<!-- <a href="#">Administration</a>-->
<!-- </li>-->
<!-- <li>-->
<!-- <a href="#">Manage Users</a>-->
<!-- </li>-->
<!-- <li>-->
<!-- <a href="#">User Rights</a>-->
<!-- </li>-->
<!-- <li>-->
<!-- <a href="#">Member History Log</a>-->
示例9:
Theme::asset()->add('colorpicker-css', 'theme/css/colorpicker.css');
Theme::asset()->add('pace-theme-css', 'theme/css/pace-theme.css');
//Theme::asset()->add('easydropdown.metro-css', 'theme/css/easydropdown.metro.css');
Theme::asset()->add('croppic-css', 'theme/css/croppic.css');
Theme::asset()->add('nailthumb-css', 'theme/css/jquery.nailthumb.css');
Theme::asset()->add('jquery.mmenu.all-css', 'theme/css/jquery.mmenu.all.css');
Theme::asset()->add('te-css', 'theme/css/jquery-te.css');
Theme::asset()->add('style-css', 'theme/css/style.css');
Theme::asset()->add('custom-css', 'theme/css/custom.css');
/**Javascript**/
Theme::asset()->add('jquery', 'theme/js/jquery.js');
Theme::asset()->add('jquery-form', 'theme/js/jquery.form.js');
Theme::asset()->add('bootstrap-js', 'theme/js/bootstrap.min.js');
Theme::asset()->add('colorbox-js', 'theme/js/jquery.colorbox-min.js');
Theme::asset()->add('pace-js', 'theme/js/pace.min.js');
Theme::asset()->add('colorpicker-js', 'theme/js/colorpicker.js');
Theme::asset()->add('jquery.textarea.autoresize-js', 'theme/js/jquery.textarea.autoresize.js');
Theme::asset()->add('boostrap-box', 'theme/js/bootbox.js');
Theme::asset()->add('qtip-js', 'theme/js/jquery.qtip.min.js');
Theme::asset()->add('timeago', 'theme/js/jquery.timeago.js');
Theme::asset()->add('bootstrap-confirmation', 'theme/js/bootstrap-confirmation.js');
//Theme::asset()->add('offcanvasmenu', 'theme/js/jquery.offcanvasmenu.js');
Theme::asset()->add('croppic', 'theme/js/croppic.min.js');
Theme::asset()->add('swfobject', 'theme/js/swfobject.js');
Theme::asset()->add('nailthumb-js', 'theme/js/jquery.nailthumb.min.js');
Theme::asset()->add('jquery.mmenu.min.all-js', 'theme/js/jquery.mmenu.min.all.js');
Theme::asset()->add('jquery-te', 'theme/js/jquery-te.min.js');
Theme::asset()->add('sticky-sidebar', 'theme/js/jquery.sticky-kit.min.js');
Theme::asset()->add('script', 'theme/js/script.js');
Theme::asset()->add('paglets', 'theme/js/pagelet.js');
示例10:
</thead>
</table>
</div>
</div>
@stop
@section('modal')
<div class="modal fade" id="viewItem" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sizeBig" >
<div class="modal-content no-aura confirmation modal-content-Big">
<div class="modal-header" id="modal-headerpay" style="height: 55px;">
<span class="msg label-color" id="p-select">Amenity</span>
<input class="btn-close-addmanual" type="image" style="right: -14px"
src="<?php
echo Theme::asset()->url('img/cancel-modal.png');
?>
" data-dismiss="modal" data-reload="no" aria-hidden="true">
</div>
<div class="row bill_view" id='bill_view'>
<div class="col-xs-12 col-sm-7 col-md-7" style="padding-left: 0; padding-right: 0; overflow: hidden; border: 1px solid #dedede">
<div class="transZindex" style="position: absolute; height: 100%; width: 100%; z-index: 9999; display: none"></div>
<div id="adminImgPlace" class="viewer">
<div id="itemCarousel" class="container">
<br>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
示例11:
target="_blank">
<i class="attach icon"></i>
</a>
</div>
</div>
<div class="uploader-loading"></div>
</div>
</li>
</script>
<?php
Theme::asset()->add('fileuploadcss', 'assets/vendor/fileupload/fileupload.css');
Theme::asset()->container('footer')->add('autoellipsis', 'assets/vendor/jquery.autoellipsis.js', ['jquery']);
Theme::asset()->container('footer')->add('mustache', 'assets/vendor/mustache/mustache.min.js', ['jquery']);
Theme::asset()->container('footer')->add('dropzone', 'assets/vendor/dropzone.js', ['jquery']);
Theme::asset()->container('footer')->add('sortable', 'assets/js/components/sortable.js', ['jquery']);
Theme::asset()->container('footer')->add('fileupload', 'assets/vendor/fileupload/fileupload.js', ['dropzone', 'mustache', 'sortable', 'application']);
$__env->startSection('scripts');
?>
<script> $('#<?php
echo $uniqueId;
?>
').data('populatedData', <?php
echo $fileList;
?>
); </script>
<?php
$__env->appendSection();
?>
</div>
示例12: defaultAvatar
/**
* Get Default avatar for us
*/
protected function defaultAvatar($size = 100)
{
$firstLetter = strtolower(substr($this->entity->fullname, 0, 1));
if (in_array($firstLetter, ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'])) {
return \URL::to(\Theme::asset()->img('theme/images/avatar/' . $firstLetter . '/' . $size . '.png'));
} else {
return \URL::to(\Theme::asset()->img('theme/images/avatar/default/' . $size . '.png'));
}
}
示例13: function
<?php
//Theme::asset()->add('uikt', 'css/pace.css');
//Asset::add('pacejs', 'js/pace.min.js');
//Theme::asset()->container('footer')->add('form-serialize', 'library/sui/serialize-object.js', ['jquery']);
//Theme::asset()->container('footer')->add('uikit', 'assets/vendor/uikit/js/uikit.min.js', ['jquery']);
Theme::asset()->container('footer')->add('uikit-dropdown', 'assets/vendor/uikit/js/core/dropdown.js', ['core']);
Route::get('/', ['as' => 'home', 'uses' => 'HomeController@index']);
Route::get('home', 'HomeController@index');
Route::controller('auth', 'LoginController', ['getLogin' => 'login', 'getSignup' => 'signup', 'getLogout' => 'logout']);
//Site pages
Route::group(['middleware' => 'auth'], function () {
Route::post('/refresh', 'HomeController@onRefresh');
Route::match(['put', 'post'], 'file/upload', ['as' => 'file.upload', 'uses' => 'AssetController@store']);
Route::post('file/meta', ['as' => 'file.config', 'uses' => 'AssetController@edit']);
Route::post('file/sort', ['as' => 'files.sort', 'uses' => 'AssetController@sort']);
Route::delete('file/{file}/remove', ['as' => 'file.delete', 'uses' => 'AssetController@destroy']);
Route::get('user/edit', ['as' => 'user.edit', 'uses' => 'UserController@edit']);
Route::get('messages/{user?}', ['as' => 'messages', 'uses' => 'MessageController@index']);
Route::post('messages/{user}', ['as' => 'message.send', 'uses' => 'MessageController@onSend']);
Route::get('user/privacy', ['as' => 'user.privacy', 'uses' => 'UserController@privacy']);
Route::post('user/update', 'UserController@update');
Route::get('user/{user}/profile', ['as' => 'user-profile', 'uses' => 'UserController@profile']);
Route::get('user/{user?}', ['as' => 'user', 'uses' => 'UserController@profile']);
});
Route::get('clients', ['as' => 'clients', 'uses' => 'ClientsController@index']);
Route::group(['prefix' => '{client}', 'where' => ['client' => '^[a-z0-9\\-]+$']], function () {
require __DIR__ . "/client.php";
});
示例14: statics
function statics($path, $version, $secure)
{
return Theme::asset($path, $secure = null, $version = false);
}
示例15: app
<?php
$asset = app('orchestra.asset')->container('orchestra/foundation::footer');
$asset->script('bootstrap', 'packages/orchestra/foundation/vendor/bootstrap/js/bootstrap.min.js');
$asset->script('jquery-ui', 'packages/orchestra/foundation/vendor/jquery.ui/jquery.ui.js');
$asset->script('orchestra', 'packages/orchestra/foundation/js/orchestra.min.js', ['bootstrap', 'jquery-ui']);
$asset->script('jui-toggleSwitch', 'packages/orchestra/foundation/vendor/delta/js/jquery-ui.toggleSwitch.js', ['jquery-ui']);
$asset->script('select2', 'packages/orchestra/foundation/components/select2/select2.min.js');
$asset->script('app', Theme::asset('components/adminlte/js/app.min.js'), ['bootstrap']);
?>
{!! $asset->show() !!}
@placeholder("orchestra.layout: footer")
<script>
jQuery(function onPageReady($) { 'use strict';
var dispatcher = Javie.make('event');
dispatcher.fire("orchestra.ready: {!! app('request')->path() !!}");
});
</script>
@stack('orchestra.footer')