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


PHP Assets::css方法代码示例

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


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

示例1: test_add_css_includes_arrays

 public function test_add_css_includes_arrays()
 {
     touch(FCPATH . 'themes/admin/css/null1.css');
     Assets::add_css(array('null', 'null1'));
     $r = Assets::css();
     $this->assertTrue(strpos($r, 'null.css') !== false && strpos($r, 'null1.css') !== false);
     unlink(FCPATH . 'themes/admin/css/null.css');
     unlink(FCPATH . 'themes/admin/css/null1.css');
 }
开发者ID:ivantcholakov,项目名称:Bonfire,代码行数:9,代码来源:assets_test.php

示例2: action_index

 public function action_index()
 {
     Assets::package('jquery-ui');
     Assets::css('fullcalendar', ADMIN_RESOURCES . 'libs/fullcalendar-2.1.0/fullcalendar.min.css', 'global');
     Assets::js('fullcalendar', ADMIN_RESOURCES . 'libs/fullcalendar-2.1.0/fullcalendar.min.js', 'jquery');
     Assets::js('fullcalendar.lang', ADMIN_RESOURCES . 'libs/fullcalendar-2.1.0/lang/' . I18n::lang_short() . '.js', 'fullcalendar');
     $this->set_title(__('Calendar'), FALSE);
     $this->template->content = View::factory('calendar/index', array('colors' => array('default', 'darken', 'danger', 'info', 'primary', 'success', 'warning'), 'icons' => array('info', 'warning', 'check', 'user', 'lock', 'clock-o')));
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:9,代码来源:calendar.php

示例3: action_index

 public function action_index()
 {
     $logs = ORM::factory('log')->filter();
     Assets::css('logs', 'cms/media/css/controller/logs.css');
     $per_page = (int) Arr::get($this->request->query(), 'per_page', 20);
     $pager = Pagination::factory(array('total_items' => $logs->reset(FALSE)->count_all(), 'items_per_page' => $per_page));
     $sidebar = new Sidebar(array(new Sidebar_Fields_DateRange(array('label' => __('Date range'), 'name' => 'created_on', 'range' => array(array('name' => '', 'value' => Arr::path($this->request->query(), 'created_on.0')), array('name' => '', 'value' => Arr::path($this->request->query(), 'created_on.1'))))), new Sidebar_Fields_Select(array('name' => 'level[]', 'label' => __('Log level'), 'options' => Log::levels(), 'selected' => (array) $this->request->query('level'))), new Sidebar_Fields_Input(array('name' => 'per_page', 'label' => __('Items per page'), 'value' => $per_page, 'size' => 3))));
     $this->set_title(__('Logs'), FALSE);
     $this->template->content = View::factory('logs/index', array('logs' => $logs->with('user')->limit($pager->items_per_page)->offset($pager->offset)->find_all(), 'pager' => $pager, 'sidebar' => $sidebar));
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:10,代码来源:logs.php

示例4: action_index

 public function action_index()
 {
     \Assets::css('page2', base_UI . 'css/rangeslider.css');
     \Assets::js('page1', base_UI . 'js/plugins/range/rangeslider.min.js');
     \Assets::js('page2', base_UI . 'js/plugins/range/range_script.js');
     \Assets::js('attr', base_UI . 'js/pages/attr.js');
     \Assets::js('jumper', base_UI . 'js/index/recovery_pass_jumper.js');
     $user_id = \Registry::getCurrentUser()->iduser;
     $data_formula = $this->dataFormula();
     $this->template->assign(['data_formula' => $data_formula]);
     $this->response->body($this->template->fetch('main.tpl'));
 }
开发者ID:astar3086,项目名称:studio_mn24,代码行数:12,代码来源:Index.php

示例5: testRenderCss

 /**
  * Tests whether CSS files can be combined, minified,
  * and cached successfully. Verfies returned HTML 
  * tag and checks to see whether cached file exists.
  * @return void
  */
 public function testRenderCss()
 {
     $this->setup();
     Assets::css(array('test.css', 'test2.css'));
     Assets::less('test.less');
     // Does returned tag match expected output?
     $this->assertTrue(Assets::renderCss() == "<link rel=\"stylesheet\" href=\"/assets/cache/" . Assets::getCompiledName('css') . "\">");
     // Does file exist?
     $this->filename = __DIR__ . '/assets/cache/' . Assets::getCompiledName('css');
     $this->assertTrue(file_exists($this->filename));
     $this->tearDown();
 }
开发者ID:bradstinson,项目名称:assets,代码行数:18,代码来源:AssetsTest.php

示例6: set

 /**
  * Add hook for shortcode tag
  *
  * There can only be one hook for each shortcode.
  * Which means that if another plugin has a similar shortcode, it will
  * override yours or yours will override theirs depending on which order
  * the plugins are included and/or ran.
  *
  * @param   string          $tag       Shortcode tag to be searched in post content.
  * @param   callable        $callback  Hook to run when shortcode is found.
  * @param   string|boolean  $asset     CSS or JS or both to be added. css|js|both [Optional]
  *
  * @return  array
  *
  * @throws  Gleez_Exception
  *
  * @uses    Assets::css
  * @uses    Assets::js
  */
 public static function set($tag, $callback, $asset = FALSE)
 {
     if (!is_callable($callback)) {
         throw new Gleez_Exception('Invalid Shortcode::callback specified');
     }
     self::$_tags[$tag] = $callback;
     if ($asset and $asset == 'css') {
         Assets::css($tag, "media/css/shortcodes/{$tag}.css");
     }
     if ($asset and $asset == 'js') {
         Assets::js($tag, "media/js/shortcodes/{$tag}.js");
     }
     return self::$_tags;
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:33,代码来源:shortcode.php

示例7: action_welcome

 /**
  * Prepare welcome page
  */
 public function action_welcome()
 {
     // If Gleez CMS don't installed
     if (!Gleez::$installed) {
         // Send to the installer with server status
         $this->request->redirect(Route::get('install')->uri(array('action' => 'index')), 200);
     }
     Assets::css('welcome', "media/css/welcome.css", array('default'), array('weight' => 30));
     $this->title = __('Welcome!');
     $this->schemaType = 'WebPage';
     $content = View::factory('welcome');
     // Disable sidebars on welcome page
     $this->_sidebars = FALSE;
     $this->response->body($content);
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:18,代码来源:welcome.php

示例8: before

 /**
  * The before() method is called before controller action
  *
  * @uses  Assets::css
  * @uses  Auth::get_user
  * @uses  Request::uri
  * @uses  Request::action
  */
 public function before()
 {
     Assets::css('user', 'media/css/user.css', array('theme'), array('weight' => 60));
     parent::before();
     // Get the currently logged in user or set up a new one.
     // Note that get_user will also do an auto_login check.
     if (($this->_user = $this->_auth->get_user()) === FALSE) {
         $this->_user = ORM::factory('user');
     }
     if (strpos($this->request->uri(), 'user/reset/', 0) !== FALSE) {
         $this->request->action('reset_' . $this->request->action());
     }
     // Disable sidebars on user pages
     $this->_sidebars = FALSE;
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:23,代码来源:user.php

示例9: login

 public function login()
 {
     $auth = Auth::instance();
     $request = Request::current();
     // If user already signed-in / don't show the widget on user controller.
     if ($auth->logged_in() or $request->controller() === 'user') {
         return;
     }
     Assets::css('user', 'media/css/user.css', array('weight' => 2));
     // Create form action
     $destination = isset($_GET['destination']) ? $_GET['destination'] : Request::initial()->uri();
     $params = array('action' => 'login');
     $action = Route::get('user')->uri($params) . URL::query(array('destination' => $destination));
     return View::factory('widget/login')->set('register', Config::get('auth.register'))->set('use_username', Config::get('auth.username'))->set('providers', array_filter(Auth::providers()))->set('action', $action)->set('post', ORM::factory('user'))->render();
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:15,代码来源:user.php

示例10: before

 /**
  * The before() method is called before controller action
  *
  * @throws  HTTP_Exception
  *
  * @uses    Assets::css
  * @uses    User::is_guest
  */
 public function before()
 {
     if (User::is_guest()) {
         throw HTTP_Exception::factory(403, 'Permission denied! You must login!');
     }
     $id = $this->request->param('id', FALSE);
     if ($id and 'index' == $this->request->action()) {
         $this->request->action('view');
     }
     if (!$id and 'index' == $this->request->action()) {
         $this->request->action('inbox');
     }
     Assets::css('user', 'media/css/user.css', array('theme'), array('weight' => 60));
     parent::before();
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:23,代码来源:message.php

示例11: render

 /**
  * Генерация HTML кода CSS, JS, Meta
  * 
  * По умолчанию выводятся все группы CSS, JS, Meta, если вы выводите JS
  * код перед тегом </body>, то непобхимо передать параметр FALSE и сделать
  * вывод JS кода в нужно месте с помощью
  *		
  *		<?php echo Assets::js(); ?>
  * 
  * @param boolean $include_js Включить в вывод JavaScript
  * @return string
  */
 public function render($js_footer = FALSE)
 {
     $html = Assets::group('FRONTEND') . Assets::css() . Assets::js($js_footer);
     return $html;
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:17,代码来源:meta.php

示例12: e

    e(settings_item('site.title'));
} else {
    echo 'Bonfire';
}
?>
</title>

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="fbmfbm">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="Sat, 01 Dec 2001 00:00:00 GMT">

    <?php 
echo Assets::css();
?>
    <link href="http://fonts.googleapis.com/css?family=Droid+Serif" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Nobile" rel="stylesheet" type="text/css">
    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="<?php 
echo base_url();
?>
components/ol3/build/ol.css"/>
    <link rel="stylesheet" href="<?php 
echo base_url();
?>
assets/css/app.css">
    <link rel="stylesheet" href="<?php 
echo base_url();
?>
开发者ID:fbmfbm,项目名称:drhil01,代码行数:31,代码来源:_header.php

示例13: js_path

</title>

	<meta name="viewport" content="width=device-width, initial-scale=1.0">

	<meta name="robots" content="noindex" />
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="<?php 
echo js_path();
?>
admin/ui-grid/ui-grid-unstable.css"/>
    <link rel="stylesheet" href="<?php 
echo css_path();
?>
admin.css"/>
	<?php 
echo Assets::css(null, true);
?>

	<script src="<?php 
echo Template::theme_url('js/modernizr-2.5.3.js');
?>
"></script>
</head>
<body class="desktop" ng-controller="MainCtrl">
<!--[if lt IE 7]>
		<p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or
		<a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p>
<![endif]-->


	<noscript>
开发者ID:fbmfbm,项目名称:drhil01,代码行数:31,代码来源:_header.php

示例14: ser

use Lobby\Need;
use Lobby\Time;
$page_title = "Lobby Store";
$appID = \Request::get('app');
if ($appID !== null) {
    $app = \Lobby\Server::store(array("get" => "app", "id" => $appID));
    if ($app) {
        $page_title = $app['name'] . " | Lobby Store";
    }
}
?>
<html>
  <head>
    <?php 
\Assets::css("apps-grid", "/admin/css/apps-grid.css");
\Assets::css("lobby-store", "/admin/css/lobby-store.css");
\Assets::js("lobby-store", "/admin/js/lobby-store.js");
\Hooks::doAction("admin.head.begin");
\Response::head($page_title);
?>
  </head>
  <body>
    <?php 
\Hooks::doAction("admin.body.begin");
?>
    <div id="workspace">
      <div class="contents">
        <?php 
if ($appID !== null) {
    if ($app === false) {
        echo ser("404 - App Not Found", "App was not found in Lobby Store.");
开发者ID:LobbyOS,项目名称:server,代码行数:31,代码来源:lobby-store.php

示例15: isset

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php 
echo $title;
?>
 | <?php 
echo Config::get('app.name', SITETITLE);
?>
</title>
    <?php 
echo isset($meta) ? $meta : '';
// Place to pass data / plugable hook zone
?>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <?php 
Assets::css(array(template_url('css/bootstrap-rtl.min.css', 'Default'), 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css', 'https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css', template_url('css/AdminLTE-rtl.min.css', 'AdminLTE'), vendor_url('dist/css/skins/_all-skins.min.css', 'almasaeed2010/adminlte'), vendor_url('plugins/select2/select2.min.css', 'almasaeed2010/adminlte'), template_url('css/style-rtl.css', 'AdminLTE')));
echo isset($css) ? $css : '';
// Place to pass data / plugable hook zone
?>

<style>
.pagination {
    margin: 0;
}

.pagination > li > a, .pagination > li > span {
  padding: 5px 10px;
}
</style>

<?php 
开发者ID:nova-framework,项目名称:cms,代码行数:31,代码来源:backend-rtl.php


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