css() 정적인 공개 메소드

Returns a browser-specific css selector string
static public css ( string $ua = null, boolean $array = false ) : mixed
$ua string The user agent string
$array boolean True: return an array, false: return a string
리턴 mixed
예제 #1
0
파일: Template.php 프로젝트: rev087/kennel
 private function _getOutput()
 {
     // Make $template and $title accessible in the descendant views
     $this->__set('template', $this);
     $this->__set('title', $this->title);
     // Template View (must run first since ancestor views might call functions from $template)
     $templateView = XML::text($this->_template->__toString());
     // <html>
     $this->_html = XML::element('html');
     $this->_html->dir = $this->dir;
     if (Kennel::getSetting('i18n', 'enabled')) {
         $this->_html->lang = i18n::getLang();
     }
     // <head>
     $this->_head = XML::element('head', $this->_html);
     // <title>
     $title = XML::element('title', $this->_head);
     $title->setValue($this->getTitle());
     // favicon
     if ($this->favicon) {
         $this->_head->adopt(html::favicon($this->favicon));
     }
     // Content Type
     $this->_head->adopt(html::meta(array('charset' => 'utf-8')));
     // <meta>
     foreach ($this->_meta as $meta) {
         $this->_head->adopt(html::meta($meta));
     }
     // <link>
     foreach ($this->_links as $link) {
         $this->_head->adopt(html::link($link['rel'], $link['href'], $link['type'], $link['title']));
     }
     // <style>
     $this->_head->adopt(html::css($this->_stylesheets));
     // <script>
     $this->_head->adopt(html::js($this->_scripts));
     // <body>
     $this->_body = XML::element('body', $this->_html);
     $this->_body->class = browser::css();
     if (Kennel::getSetting('i18n', 'enabled')) {
         $this->_body->class .= ' ' . i18n::getLang();
     }
     if ($this->bodyClass) {
         $this->_body->class .= ' ' . $this->bodyClass;
     }
     // Inject the Template View
     $this->_body->adopt($templateView);
     // Return the whole shebang
     return self::$DOCTYPE_DECLARATIONS[$this->doctype] . $this->_html->output(true);
 }
예제 #2
0
<?php 
if ($panel->form) {
    echo $panel->form->css();
}
if (c::get('panel.color') && c::get('panel.color') != 'red') {
    snippet('colors');
}
?>

</head>

<body class="<?php 
echo $panel->uri->path(1);
?>
 <?php 
echo browser::css();
?>
">

<div class="menu">
  <h1><a class="home" href="<?php 
echo url();
?>
">Kirby Panel</a></h1>

  <?php 
if (c::get('lang.support')) {
    ?>
  <select class="lang" onchange="window.location = this.value">
    <?php 
    foreach (c::get('lang.available') as $lang) {