Example #1
0
 /**
  * Parses dynamic css
  */
 private function _handleDynamicCss()
 {
     $theme = Athens::getComponent()->theme;
     foreach ($this->css as $css) {
         $css = str_replace('{theme}', $theme, $css);
     }
 }
Example #2
0
 /**
  * Adds header tag options
  * @param array $options given options
  */
 private static function _headerOptions($options)
 {
     Html::addCssClass($options, 'page-header navbar');
     if (Athens::HEADER_FIXED === Athens::getComponent()->headerOption) {
         Html::addCssClass($options, 'navbar-fixed-top');
     } else {
         Html::addCssClass($options, 'navbar-static-top');
     }
     return $options;
 }
Example #3
0
 /**
  * Handles style based files
  */
 private function _handleStyleBased()
 {
     $this->css = ArrayHelper::merge($this->styleBasedCss[Athens::getComponent()->style], $this->css);
 }
Example #4
0
 /**
  * Inits options
  */
 private function _initOptions()
 {
     Html::addCssClass($this->options, 'page-sidebar-menu');
     if (Athens::SIDEBAR_MENU_HOVER === Athens::getComponent()->sidebarMenu) {
         Html::addCssClass($this->options, 'page-sidebar-menu-hover-submenu');
     }
     $this->options['data-slide-speed'] = 200;
     $this->options['data-auto-scroll'] = 'true';
     $this->options['data-keep-expanded'] = 'false';
     $this->options['data-height'] = 261;
 }
Example #5
0
    <!-- BEGIN BODY -->
    <body <?php 
echo Layout::getHtmlOptions('body', '', true);
?>
 >
    <?php 
$this->beginBody();
?>
    <!-- BEGIN HEADER -->
    <header>
        <?php 
NavBar::begin(['brandLabel' => '路伴儿网', 'brandLogoUrl' => Athens::getAssetsUrl($this) . '/img/logo.png', 'brandUrl' => Yii::$app->homeUrl, 'options' => Layout::getHtmlOptions('header', false)]);
?>
        <div class="top-menu">
        <?php 
echo Nav::widget(['encodeLabels' => false, 'position' => Nav::POS_RIGHT, 'items' => [['icon' => 'fa fa-inbox', 'badge' => Badge::widget(['label' => '18', 'type' => 'success']), 'label' => '个人中心', 'url' => ['/user/'], 'title' => '', 'more' => ['label' => 'Go', 'url' => '/', 'icon' => 'm-icon-swapright'], 'scroller' => ['height' => 200], 'items' => [['icon' => 'fa fa-calendar', 'label' => '小猫', 'url' => ['/message/view/1'], 'badge' => Badge::widget(['label' => '19', 'type' => 'danger'])]]], ['label' => Nav::userItem('吕宝贵', Athens::getAssetsUrl($this) . '/img/avatar3_small.jpg'), 'url' => '#', 'type' => 'user', 'items' => [['icon' => 'fa fa-calendar', 'label' => '个人信息', 'url' => '/site/about', 'badge' => Badge::widget(['label' => '19', 'type' => 'success'])], ['icon' => 'fa fa-calendar', 'label' => '日程', 'url' => '/site/learn', 'badge' => Badge::widget(['label' => '18', 'type' => 'danger'])], ['icon' => 'fa fa-calendar', 'label' => '日程', 'url' => '/site/learn', 'badge' => Badge::widget(['label' => '18', 'type' => 'danger'])], ['divider'], ['label' => '赞', 'url' => ['/like/']], ['label' => '退出', 'url' => ['/site/logout']]], 'options' => ['class' => 'dropdown-user']]]]);
?>
        </div>
        <?php 
NavBar::end();
?>
    </header>
    <!-- END HEADER -->

    <div class="clearfix"></div>

    <!-- BEGIN CONTAINER -->
    <div class="page-container">
            <!-- BEGIN SIDEBAR -->
            <?php 
echo Menu::widget(['visible' => true, 'items' => [['icon' => 'fa fa-home', 'label' => '首页', 'url' => ['/site/index']], ['icon' => 'fa fa-cogs', 'badge' => Badge::widget(['label' => 'New', 'round' => false, 'type' => Badge::TYPE_SUCCESS]), 'label' => '商品', 'url' => '#', 'items' => [['label' => '新上商品', 'url' => ['/product/new', 'tag' => 'new']], ['label' => '热门商品', 'url' => ['/product/hot']]]], ['icon' => 'fa fa-bookmark-o', 'label' => '界面组件', 'url' => '#', 'items' => [['label' => '按钮和图标', 'url' => ['/widgets/index']]]], ['icon' => 'fa fa-user', 'label' => '关于我们', 'url' => ['/site/about']], ['icon' => 'fa fa-user', 'label' => '联系我们', 'url' => ['/site/contact']]]]);