예제 #1
0
파일: main.php 프로젝트: comaw/hashtag
$form = ActiveForm::begin(['action' => Url::toRoute('hashtag/search'), 'options' => ['class' => "mainnav-form"]]);
?>
                <input type="text" name="tagsearch" value="<?php 
echo Yii::$app->request->post('tagsearch');
?>
" class="form-control input-md mainnav-search-query" id="tagsearch" placeholder="<?php 
echo Yii::t('app', 'Search');
?>
">

                    <button class="btn btn-sm mainnav-form-btn"><i class="fa fa-search"></i></button>
                    <?php 
ActiveForm::end();
?>
                <?php 
echo \frontend\widgets\Menu::widget(['url' => [Yii::t('app', 'Home') => ['link' => Url::home(), 'fa' => 'fa-map-o'], Yii::t('app', 'Hashtags') => ['item' => [Yii::t('app', 'Wiki hashtags') => ['link' => Url::toRoute('hashtag/index'), 'fa' => 'fa-hashtag'], Yii::t('app', 'Search hashtags') => ['link' => Url::toRoute('hashtag/search'), 'fa' => 'fa-search'], Yii::t('app', 'Add hashtag') => ['link' => Url::toRoute('hashtag/add'), 'fa' => 'fa-pencil-square-o']]], Yii::t('app', 'Catalog') => ['item' => [Yii::t('app', 'Users') => ['link' => Url::toRoute('сatalog/index'), 'fa' => 'fa-users'], Yii::t('app', 'Interests') => ['link' => Url::toRoute('сatalog/interest'), 'fa' => 'fa-user-secret'], Yii::t('app', 'Add user') => ['link' => Url::toRoute('сatalog/add'), 'fa' => 'fa-user-plus']]], Yii::t('app', 'Statistics') => ['item' => [Yii::t('app', 'Popular hashtags') => ['link' => Url::toRoute('statistic/interest'), 'fa' => 'fa-star-half-o'], Yii::t('app', 'Relevant hashtags') => ['link' => Url::toRoute('statistic/interest'), 'fa' => 'fa-sitemap'], Yii::t('app', 'Popular topics') => ['link' => Url::toRoute('statistic/index'), 'fa' => 'fa-ticket'], Yii::t('app', 'Popular users') => ['link' => Url::toRoute('statistic/add'), 'fa' => 'fa-user']]]]]);
?>
            </nav>
        </div>
    </div>
    <div class="content">
        <div class="container">
            <?php 
echo $content;
?>
        </div>
    </div>
</div>
<footer class="footer">
    <div class="container">
        <p class="pull-left">© <?php 
예제 #2
0
파일: Menu.php 프로젝트: comaw/hashtag
"><?php 
            echo isset($u2['fa']) ? '<i class="fa ' . $u2['fa'] . ' dropdown-icon"></i> ' : '';
            echo $name2;
            ?>
</a>
                    </li>
                <?php 
        }
        ?>
                </ul>
            </li>
        <?php 
    } else {
        ?>
        <li class="<?php 
        echo Menu::current($u['link']) ? 'active is-open' : '';
        ?>
">
            <a href="<?php 
        echo $u['link'];
        ?>
" title="<?php 
        echo Html::encode($name);
        ?>
"><?php 
        echo isset($u['fa']) ? '<i class="fa ' . $u['fa'] . ' dropdown-icon"></i> ' : '';
        echo $name;
        ?>
</a>
        </li>
        <?php