本文整理汇总了PHP中helpers\Assets::css方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::css方法的具体用法?PHP Assets::css怎么用?PHP Assets::css使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helpers\Assets
的用法示例。
在下文中一共展示了Assets::css方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeFunction
public function executeFunction($link, $type)
{
switch ($type) {
case 'js':
Assets::js([$link]);
break;
case 'css':
Assets::css([$link]);
break;
}
}
示例2:
<head>
<!-- Site meta -->
<meta charset="utf-8">
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<!-- CSS -->
<?php
$theroute = DIR . 'app/Modules/Search/templates/search/';
Assets::css(array($theroute . 'css/ajaxlivesearch.min.css', $theroute . 'css/fontello.css', $theroute . 'css/animation.css', $theroute . 'font/fontello.woff'));
//hook for plugging in css
$hooks->run('css');
?>
</head>
<body>
<?php
//hook for running code after body tag
$hooks->run('afterBody');
?>
<div class="container">
示例3:
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<!-- CSS -->
<?php
Assets::css(array('//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css', '//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic', Url::templatePath() . 'css/style.css', Url::templatePath() . 'css/landing-page.css', Url::templatePath() . 'font-awesome/css/font-awesome.min.css'));
//hook for plugging in css
$hooks->run('css');
?>
<!--
<?php
// Assets::css(array(
// '/vendor/bootstrap/dist/css/bootstrap.min.css',
// '/assets/css/fonts.css',
// '/assets/css/royalslider.css',
// '/assets/css/style.css',
// '/assets/css/landing-page.css',
// ));
// //hook for plugging in css
示例4: BingPhoto
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<!-- CSS -->
<?php
Assets::css(array('https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900', Url::assetPath('css') . 'icons/icomoon/styles.css', Url::assetPath('css') . 'icons/fontawesome/styles.min.css', Url::assetPath('css') . 'icons/flaticon/flaticon.css', Url::assetPath('css') . 'bootstrap.css', Url::assetPath('css') . 'core.css', Url::assetPath('css') . 'components.css', Url::assetPath('css') . 'colors.css'));
//hook for plugging in css
$hooks->run('css');
?>
</head>
<?php
$bing = new BingPhoto(BingPhoto::TODAY, 8);
foreach ($bing->getImages() as $image) {
$images[] = $image['url'];
}
?>
<body class="login-cover" style="background-image: url(<?php
echo $images[array_rand($images)];
示例5:
">
<head>
<!-- Site meta -->
<meta charset="utf-8">
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/config.php
?>
</title>
<!-- CSS -->
<?php
Assets::css(array('//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css', DIR . 'css/style.css'));
//hook for plugging in css
$hooks->run('css');
?>
</head>
<body>
<?php
//hook for running code after body tag
$hooks->run('afterBody');
?>
<div class="container">
示例6:
</title>
<!-- <base href="<?php
//echo Url::get_template_path();
?>
"><meta name="description" content="Bootstrap Metro Dashboard"> -->
<meta name="author" content="Oluwafemi Korede">
<meta name="keyword" content="Dashboard">
<!-- end: Meta -->
<!-- start: Mobile Specific -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- end: Mobile Specific -->
<!-- start: CSS -->
<?php
Assets::css(array(Url::templatePath() . 'css/bootstrap.min.css', Url::templatePath() . 'css/bootstrap-responsive.min.css', Url::templatePath() . 'css/style.css', Url::templatePath() . 'css/style-responsive.css', 'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&subset=latin,cyrillic-ext,latin-ext'));
//hook for plugging in css
$hooks->run('css');
?>
<!-- end: CSS -->
<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<link id="ie-style" href="css/ie.css" rel="stylesheet">
<![endif]-->
<!--[if IE 9]>
<link id="ie9style" href="css/ie9.css" rel="stylesheet">
<![endif]-->
示例7:
<!-- Site meta -->
<meta charset="utf-8">
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<!-- CSS -->
<?php
Assets::css(array('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css', Url::templatePath() . 'css/style.css', Url::templatePath() . 'https://fonts.googleapis.com/css?family=Roboto', Url::templatePath() . 'css/style2.css', Url::templatePath() . 'css/galerie.css'));
//hook for plugging in css
$hooks->run('css');
?>
</head>
<body>
<?php
//hook for running code after body tag
$hooks->run('afterBody');
?>
<div class="nav navbar-fixed-top">
<div class="container-fluid">
<span class="title"><?php
echo $data['title'];
?>
示例8:
<!-- Site meta -->
<meta charset="utf-8">
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<!-- CSS -->
<?php
Assets::css(array(Url::templatePath() . 'css/bootstrap.min.css', Url::templatePath() . 'css/style.css'));
//hook for plugging in css
$hooks->run('css');
?>
</head>
<body>
<?php
//hook for running code after body tag
$hooks->run('afterBody');
?>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
示例9:
<!-- Site meta -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<!-- CSS -->
<?php
Assets::css(array('//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css', '//cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.css', '//blueimp.github.io/Gallery/css/blueimp-gallery.min.css', 'https://code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css', '//cdn.rawgit.com/morteza/bootstrap-rtl/master/dist/cdnjs/3.3.1/css/bootstrap-rtl.min.css', Url::templatePath() . 'css/style.css'));
//hook for plugging in css
$hooks->run('css');
?>
</head>
<body>
<?php
//hook for running code after body tag
$hooks->run('afterBody');
?>
<div class="container">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
示例10: array
?>
<title><?php
echo SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<?php
//CSS
$css_default = array('https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900', Url::assetPath('css') . 'icons/icomoon/styles.css', Url::assetPath('css') . 'icons/fontawesome/styles.min.css', Url::assetPath('css') . 'icons/flaticon/flaticon.css', Url::assetPath('css') . 'bootstrap.css', Url::assetPath('css') . 'core.css', Url::assetPath('css') . 'components.css', Url::assetPath('css') . 'colors.css');
if (isset($data['css'])) {
$all_css = array_merge($css_default, $data['css']);
} else {
$all_css = $css_default;
}
Assets::css($all_css);
//hook for plugging in css
$hooks->run('css');
if ($_SESSION['language_code'] != 'en') {
$moment = Url::assetPath('js') . 'plugins/moment/locale/' . $_SESSION['language_code'] . '.js';
}
//JS
$js_default = array(Url::assetPath('js') . 'plugins/loaders/pace.min.js', Url::assetPath('js') . 'core/libraries/jquery.min.js', Url::assetPath('js') . 'core/libraries/bootstrap.min.js', Url::assetPath('js') . 'plugins/loaders/blockui.min.js', Url::assetPath('js') . 'plugins/ui/nicescroll.min.js', Url::assetPath('js') . 'plugins/forms/selects/select2.min.js', Url::assetPath('js') . 'plugins/forms/styling/switchery.min.js', Url::assetPath('js') . 'plugins/forms/styling/switch.min.js', Url::assetPath('js') . 'plugins/moment/moment.min.js', $moment, Url::assetPath('js') . 'core/app.js', Url::assetPath('js') . 'pages/layout_fixed_custom.js');
if (isset($data['js'])) {
$all_js = array_merge($js_default, $data['js']);
} else {
$all_js = $js_default;
}
Assets::js($all_js);
//hook for plugging in javascript
$hooks->run('js');
示例11:
</li>
<?php
if (Session::get('loggedin') == true) {
echo "<li><a href='/projet/ladeconnexion/'>Deconnexion</a></li>";
echo "<li>" . Session::get('message') . "</li>";
} else {
echo "<li><a href='/projet/connexion/'>Connexion</a></li>";
}
?>
</ul>
</nav>
</div>
</header>
<!-- CSS -->
<?php
Assets::css(array('//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css', Url::templatePath() . 'css/style.css', '/projet/sweetalert/dist/sweetalert2.css'));
//hook for plugging in css
$hooks->run('css');
?>
</head>
<body style="padding-top:60px;">
<?php
//hook for running code after body tag
$hooks->run('afterBody');
?>
<div class="container">
示例12:
<!-- Site meta -->
<meta charset="utf-8">
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<!-- CSS -->
<?php
Assets::css(array(Url::templatePath() . 'css/reset.css', Url::templatePath() . 'css/layout.css', Url::templatePath() . 'css/style.css'));
//hook for plugging in css
$hooks->run('css');
?>
<!-- JAVASCRIPT -->
<?php
Assets::js(array(Url::templatePath() . 'js/jquery-1.5.2.js', Url::templatePath() . 'js/cufon-yui.js', Url::templatePath() . 'js/cufon-replace.js', Url::templatePath() . 'js/Cabin_400.font.js', Url::templatePath() . 'js/tabs.js', Url::templatePath() . 'js/jquery.jqtransform.js', Url::templatePath() . 'js/jquery.nivo.slider.pack.js', Url::templatePath() . 'js/atooltip.jquery.js', Url::templatePath() . 'js/script.js'));
//hook for plugging in javascript
$hooks->run('js');
?>
</head>
<body id="<?php
echo $data['page'];
示例13:
?>
<!DOCTYPE html>
<html lang="en" class="app">
<head>
<meta charset="utf-8" />
<meta name="description" content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title><?php
echo $title . ' | ' . SITETITLE;
?>
</title>
<?php
Assets::css(array(Url::templatePath() . 'js/jPlayer/jplayer.flat.css', Url::templatePath() . 'css/bootstrap.css', Url::templatePath() . 'css/animate.css', Url::templatePath() . 'css/font-awesome.min.css', Url::templatePath() . 'css/simple-line-icons.css', Url::templatePath() . 'css/font.css', Url::templatePath() . 'css/app.css'));
//hook for plugging in css
$hooks->run('css');
?>
<!--[if lt IE 9]>
<?php
Assets::js(array(Url::templatePath() . 'js/ie/html5shiv.js', Url::templatePath() . 'js/ie/respond.min.js', Url::templatePath() . 'js/ie/excanvas.js'));
?>
<![endif]-->
<!--
<script type="text/javascript" src="http://hosted.musesradioplayer.com/mrp.js"></script>
<script type="text/javascript">
MRP.insert({
示例14:
?>
">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
?>
</title>
<link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<?php
Assets::css(array(Url::templatePath() . 'font-awesome/css/font-awesome.min.css', Url::templatePath() . 'css/bootstrap.min.css', Url::templatePath() . 'css/bootstrap-material-design.min.css', Url::templatePath() . 'css/ripples.min.css', Url::templatePath() . 'css/style.css'));
$hooks->run('css');
?>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<?php
$hooks->run('afterBody');
?>
<div id="mobile-indicator"></div> <!-- Para cambiar navbar cuando este en modo resposivo -->
<div id="startchange"></div> <!-- Para el background del navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
示例15:
$hooks = Hooks::get();
?>
<!DOCTYPE html>
<html lang="<?php
echo LANGUAGE_CODE;
?>
">
<head>
<!-- Site meta -->
<meta charset="utf-8">
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
?>
</title>
<!-- CSS -->
<?php
echo Assets::css(array(Url::templatePath() . 'css/bootstrap.min.css', Url::templatePath() . 'css/bootstrap-theme.min.css', Url::templatePath() . 'css/bootstrap-dialog.min.css'));
//hook for plugging in css
$hooks->run('css');
echo Assets::js(array(Url::templatePath() . 'js/jquery-2.1.4.min.js', Url::templatePath() . 'js/bootstrap.min.js', Url::templatePath() . 'js/bootstrap-dialog.min.js'));
$hooks->run('js');
?>
</head>
<body>
<?php
$hooks->run('afterBody');