本文整理汇总了PHP中Asset::css方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset::css方法的具体用法?PHP Asset::css怎么用?PHP Asset::css使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Asset
的用法示例。
在下文中一共展示了Asset::css方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Initialize bootstrap
*/
public static function init()
{
$autoload = \Config::get('bootstrap.assets.autoload', false);
if (!$autoload) {
return;
}
$path = \Config::get('bootstrap.assets.path', '');
$use_min = \Config::get('bootstrap.assets.use_min', true);
$css_file = $path . 'bootstrap';
$js_file = $path . 'bootstrap';
if ($use_min) {
$css_file .= '.min';
$js_file .= '.min';
}
$css_file .= '.css';
$js_file .= '.js';
// See if Casset package is used.
if (\Package::loaded('casset')) {
\Casset::css($css_file, !$use_min);
\Casset::js($js_file, !$use_min);
} else {
\Asset::css($css_file);
\Asset::js($js_file);
}
}
示例2: css
/**
* Asset CSS
*
* Insert a CSS tag
*
* Usage:
*
* {{ asset:css file="" group="" }}
*
* @return string Full url to css asset
*/
public function css()
{
$file = $this->attribute('file');
$file_min = $this->attribute('file_min');
$group = $this->attribute('group');
return Asset::css($file, $file_min, $group);
}
示例3: action_list
/**
* 予約履歴一覧
*
* @access public
* @param
* @return void
* @author kobayashi
* @author ida
*/
public function action_list()
{
Asset::css('jquery-ui.min.css', array(), 'add_css');
Asset::js('jquery-ui.min.js', array(), 'add_js');
$conditions = $this->getCondition();
$condition_list = \Model_Entry::createAdminSearchCondition($conditions);
$total_count = \Model_Entry::getCountByAdminSearch($condition_list);
// ページネーション設定
$pagination = \Pagination::forge('entry_pagination', $this->getPaginationConfig($total_count));
$entry_list = \Model_Entry::findAdminBySearch($condition_list, $pagination->current_page, $this->result_per_page);
$view_model = \ViewModel::forge('admin/entry/list');
if (\Input::param('fleamarket_id')) {
$fleamarket = \Model_Fleamarket::find(\Input::param('fleamarket_id'));
$view_model->set('fleamarket', $fleamarket, false);
}
if (\Input::param('user_id')) {
$user = \Model_User::find(Input::param('user_id'));
$view_model->set('user', $user, false);
}
$view_model->set('entry_list', $entry_list, false);
$view_model->set('pagination', $pagination, false);
$view_model->set('conditions', $conditions, false);
$view_model->set('total_count', $total_count);
$this->template->content = $view_model;
}
示例4: action_404
public function action_404()
{
$this->template = \View::forge('404');
$this->template->title = 'Page not found';
$this->template->custom_class = 'special_page 404';
$this->template->css = Asset::css(array('special-page.css'));
}
示例5: action_detail
/**
* 会場詳細
*
* @access public
* @param mixed $location_id 会場ID
* @param mixed $fleamarket_id フリマID
* @return void
* @author ida
*/
public function action_detail($location_id = null, $fleamarket_id = null)
{
if (!$location_id) {
return $this->forward('errors/notfound', 404);
}
\Asset::css('jquery-ui.min.css', array(), 'add_css');
\Asset::js('jquery-ui.min.js', array(), 'add_js');
// 会場に紐づくフリマを取得する
$fleamarket_date_list = \Model_Fleamarket::find('all', array('select' => array('fleamarket_id', 'event_date'), 'where' => array(array('location_id' => $location_id)), 'order_by' => array('event_date' => 'asc')));
if (!$location_id || !$fleamarket_date_list) {
\Response::redirect('errors/notfound');
}
if (!$fleamarket_id) {
$first_fleamarket = end($fleamarket_date_list);
$fleamarket_id = $first_fleamarket['fleamarket_id'];
}
$fleamarket = \Model_Fleamarket::findDetail($fleamarket_id);
if (!$fleamarket) {
\Response::redirect('errors/notfound');
}
$this->setHtmlReplace(array('AREA' => $this->getArea($fleamarket['prefecture_id']), 'AREA_NAME' => $this->getAreaName($fleamarket['prefecture_id']), 'LOCATION_ID' => $fleamarket['location_id'], 'LOCATION_NAME' => $fleamarket['location_name'], 'FLEAMARKET_NAME' => $fleamarket['name']));
$fleamarket_abouts = \Model_Fleamarket_About::findByFleamarketId($fleamarket_id);
$fleamarket_images = \Model_Fleamarket_Image::findByFleamarketId($fleamarket_id);
$entry_styles = \Model_Fleamarket_Entry_Style::findByFleamarketId($fleamarket_id);
$view_model = \ViewModel::forge('location/detail');
$view_model->set('fleamarket', $fleamarket, false);
$view_model->set('fleamarket_date_list', $fleamarket_date_list, false);
$view_model->set('fleamarket_images', $fleamarket_images, false);
$view_model->set('fleamarket_abouts', $fleamarket_abouts, false);
$view_model->set('fleamarket_entry_styles', $entry_styles, false);
$view_model->set('prefectures', \Config::get('master.prefectures'), false);
$view_model->set('user', $this->login_user, false);
$this->template->content = $view_model;
}
示例6: action_index
public function action_index()
{
$data['all'] = Model_Forms::find('all');
$this->template->js .= Asset::js(array('mylibs/jquery.dataTables.js'));
$this->template->css = Asset::css(array('sprite.tables.css'));
$this->template->content = View::forge('forms/index', $data);
}
示例7: get_detail
/**
* フリーマーケット詳細表示画面
*
* @access public
* @param mixed $fleamarket_id フリーマーケットID
* @return void
* @author ida
*/
public function get_detail($fleamarket_id)
{
Asset::css('jquery-ui.min.css', array(), 'add_css');
Asset::js('jquery-ui.min.js', array(), 'add_js');
if (!$fleamarket_id) {
return $this->forward('errors/notfound', 404);
}
$fleamarket = \Model_Fleamarket::findDetail($fleamarket_id);
if (!$fleamarket) {
return $this->forward('errors/notfound', 404);
}
$this->setHtmlReplace(array('AREA' => $this->getArea($fleamarket['prefecture_id']), 'AREA_NAME' => $this->getAreaName($fleamarket['prefecture_id']), 'FLEAMARKET_NAME' => $fleamarket['name'], 'LOCATION_ID' => $fleamarket['location_id'], 'LOCATION_NAME' => $fleamarket['location_name']));
$fleamarket_abouts = \Model_Fleamarket_About::findByFleamarketId($fleamarket_id);
$fleamarket_images = \Model_Fleamarket_Image::findByFleamarketId($fleamarket_id);
$entry_styles = \Model_Fleamarket_Entry_Style::findByFleamarketId($fleamarket_id);
$entries = \Model_Entry::getTotalEntryByFleamarketId($fleamarket_id);
$fleamarket['entries'] = $entries;
$view_model = \ViewModel::forge('search/detail');
$view_model->set('fleamarket', $fleamarket, false);
$view_model->set('fleamarket_images', $fleamarket_images, false);
$view_model->set('fleamarket_abouts', $fleamarket_abouts, false);
$view_model->set('fleamarket_entry_styles', $entry_styles, false);
$view_model->set('entries', $entries, false);
$view_model->set('prefectures', \Config::get('master.prefectures'), false);
$view_model->set('user', $this->login_user, false);
$this->template->content = $view_model;
}
示例8: set_theme
protected function set_theme()
{
View::bind_global('before', $false);
View::bind_global('navigation', $false);
View::bind_global('after_navigation', $false);
View::bind_global('sidebar', $false);
View::bind_global('pageheader', $false);
//echo "<pre>";var_dump(Uri::current()); exit;
//$theme = Utils_Themer::get_theme(Uri::current());
$theme = Utils_Themer::get_theme($this->request->uri->uri);
//var_dump($theme); exit;
$this->template = view::forge($theme['template']);
View::bind_global('body_attr', $theme['body_attr']);
Asset::css($theme['css'], array(), 'head_css');
foreach ($theme['js'] as $js) {
Casset\Casset::js($js);
}
if ($theme['navigation']) {
$navigation = call_user_func('Utils_Navigation::get_links', $theme['navigation']);
View::bind_global('navigation', $navigation, false);
}
if ($theme['pageheader']) {
View::bind_global('pageheader', $theme['pageheader']);
}
}
示例9: action_index
/**
* 初期画面
*
* ログイン画像を切り替える場合
* 「会員登録はこちら」のimgのidを書きかえる
*
* @access public
* @return void
* @author shimma
* @author ida
*/
public function action_index()
{
Asset::css('login.css', array(), 'add_css');
$return_url = Input::get('rurl');
$data = array('info_message' => '', 'error_message' => '', 'return_url' => $return_url);
$status = Session::get_flash('status');
$data['info_message'] = $this->getStatusMessage($status);
$this->template->content = View::forge('login/index', $data);
}
示例10: before
public function before()
{
$this->template = "template";
parent::before();
$this->css .= Asset::css("reset.css");
$this->css .= Asset::css("bootstrap.min.css");
$this->css .= Asset::css("style.css");
$this->js .= Asset::js("vendor/jquery.min.js");
}
示例11: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
// line 1
echo "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <meta name=\"description\" content=\"\">\n <meta name=\"author\" content=\"\">\n\n <title>SB Admin 2 - Bootstrap Admin Theme</title>\n\n <!-- Bootstrap Core CSS -->\n <link href=\"assets/css/bootstrap.min.css\" rel=\"stylesheet\">\n\n <!-- MetisMenu CSS -->\n ";
// line 18
echo Asset::css("plugins/metisMenu/metisMenu.min.css");
echo "\n\n <!-- Custom CSS -->\n <link href=\"assets/css/sb-admin-2.css\" rel=\"stylesheet\">\n\n <!-- Custom Fonts -->\n <link href=\"assets/font-awesome-4.1.0/css/font-awesome.min.css\" rel=\"stylesheet\" type=\"text/css\">\n \n <!-- My Style -->\n <link href=\"assets/css/plugins/social-buttons.css\" rel=\"stylesheet\">\n <link href=\"assets/css/style.css\" rel=\"stylesheet\">\n \n <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->\n <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n <!--[if lt IE 9]>\n <script src=\"https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js\"></script>\n <script src=\"https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js\"></script>\n <![endif]-->\n\n</head>\n<body>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-md-4 col-md-offset-4\">\n <div class=\"login-panel panel panel-default\">\n <div class=\"panel-heading\">\n <h3 class=\"panel-title\">Đăng nhập vào MFB</h3>\n </div>\n <div class=\"panel-body\">\n <a href=\"";
// line 48
echo isset($context["loginUrl"]) ? $context["loginUrl"] : null;
echo "\" class=\"btn btn-block btn-social btn-facebook\">\n <i class=\"fa fa-facebook\"></i> Sign in with Facebook\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</body>\n</html>\n";
}
开发者ID:nguyen-phuoc-mulodo,项目名称:mfb_fuel,代码行数:11,代码来源:a70634c984797ff1e29ae8f24e12c795e92345f7070b32de144b5c4f58de.php
示例12: before
public function before()
{
parent::before();
if (!\Auth::check()) {
\Output::redirect('myauth');
}
\Asset::remove_path('assets/');
\Asset::add_path('assets/uploadify/');
$this->template->css = \Asset::css(array('style.css'), array(), 'layout', false);
$this->template->js = \Asset::js(array('jquery-1.3.2.min.js', 'swfobject.js', 'jquery.uploadify.v2.1.0.min.js', 'jquery.application.js'), array(), 'layout', false);
}
示例13: view
public function view()
{
$initial_content = '';
$meta_description = '';
$organisation = '';
$assets = [Asset::css(['ebs.css', 'bootstrap.css']), Asset::js(['jquery-2.1.4.js', 'ebs.js', 'bootstrap.js', 'confirm-bootstrap.js'])];
$nav_header = Presenter::forge('layouts/index/header');
$content = View::forge('layout/content', ['content' => $initial_content]);
$nav_footer = Presenter::forge('layouts/index/footer');
$ebs = View::forge('layout/ebs', ['meta_description' => $meta_description, 'organisation' => $organisation, 'assets' => $assets, 'nav_header' => $nav_header, 'content' => $content, 'alert_area' => View::forge('layout/alert_area'), 'nav_footer' => $nav_footer], false);
$this->ebs = $ebs;
}
示例14: action_index
public function action_index()
{
if (!Sentry::user()->has_access('groups_index')) {
self::no_access();
}
$data['total'] = count(Config::get('sentry.permissions.rules'));
$this->template->js .= Asset::js(array('mylibs/jquery.dataTables.js', 'script.js'));
$this->template->css = Asset::css(array('sprite.tables.css'));
$data['groups'] = Sentry::group()->all();
$this->template->title = "Groups » index";
$this->template->h2 = 'List of groups';
$this->template->content = View::forge('groups/index', $data);
}
示例15: action_index
public function action_index()
{
if (!Sentry::user()->has_access('charts_monthly')) {
Session::set_flash('error', 'You don\'t have access to the charts');
Response::redirect('');
}
$data['id'] = '';
$this->template->js = Asset::js(array('plugins.js', 'mylibs/jquery.ba-resize.js', 'mylibs/jquery.easing.1.3.js', 'mylibs/jquery.ui.touch-punch.js', 'libs/date.js', 'script.js', 'mylibs/highcharts.js', 'mylibs/HighCharts/exporting.js', 'charts.js'));
$this->template->css = Asset::css(array('plugin.charts.css'));
$this->template->title = 'Charts';
$this->template->h2 = 'Monthly Subscription in all the forms';
$this->template->content = View::forge('charts/view');
}