main.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <?php
  2. /**
  3. * Author: lf
  4. * Blog: https://blog.feehi.com
  5. * Email: job@feehi.com
  6. * Created at: 2017-03-15 21:16
  7. */
  8. /* @var $this \yii\web\View */
  9. /* @var $content string */
  10. use yii\helpers\Html;
  11. use frontend\assets\AppAsset;
  12. use yii\helpers\Url;
  13. use frontend\widgets\MenuView;
  14. AppAsset::register($this);
  15. ?>
  16. <?php $this->beginPage() ?>
  17. <!DOCTYPE html>
  18. <html lang="<?= Yii::$app->language ?>">
  19. <head>
  20. <title><?= Html::encode($this->title) ?></title>
  21. <?php $this->head() ?>
  22. <?php !isset($this->metaTags['keywords']) && $this->registerMetaTag(['name' => 'keywords', 'content' => Yii::$app->feehi->seo_keywords], 'keywords');?>
  23. <?php !isset($this->metaTags['description']) && $this->registerMetaTag(['name' => 'description', 'content' => Yii::$app->feehi->seo_description], 'description');?>
  24. <meta charset="<?= Yii::$app->charset ?>">
  25. <?= Html::csrfMetaTags() ?>
  26. <meta http-equiv="X-UA-Compatible" content="IE=10,IE=9,IE=8">
  27. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
  28. <script>
  29. window._deel = {
  30. name: '<?=Yii::$app->feehi->website_title?>',
  31. url: '<?=Yii::$app->getHomeUrl()?>',
  32. comment_url: '<?=Url::to(['article/comment'])?>',
  33. ajaxpager: '',
  34. commenton: 0,
  35. roll: [4,]
  36. }
  37. </script>
  38. </head>
  39. <?php $this->beginBody() ?>
  40. <body class="home blog">
  41. <?= $this->render('_flash') ?>
  42. <header id="masthead" class="site-header">
  43. <nav id="top-header">
  44. <div class="top-nav">
  45. <div id="user-profile">
  46. <span class="nav-set">
  47. <span class="nav-login">
  48. <?php
  49. if (Yii::$app->getUser()->getIsGuest()) {
  50. ?>
  51. <a href="<?= Url::to(['site/login']) ?>" class="signin-loader"><?= Yii::t('frontend', 'Hi, Log in') ?></a>&nbsp; &nbsp;
  52. <a href="<?= Url::to(['site/signup']) ?>" class="signup-loader"><?= Yii::t('frontend', 'Sign up') ?></a>
  53. <?php } else { ?>
  54. <?=Yii::t("frontend", "Welcome")?>, <?= Html::encode(Yii::$app->user->identity->username) ?>
  55. <a href="<?= Url::to(['site/logout']) ?>" class="signup-loader"><?= Yii::t('frontend', 'Log out') ?></a>
  56. <?php } ?>
  57. </span>
  58. </span>
  59. </div>
  60. <div class="menu-container">
  61. <ul id="menu-page" class="top-menu">
  62. <a target="_blank" href="<?=Url::to(['page/view', 'name'=>'about'])?>"><?= Yii::t('frontend', 'About us') ?></a>
  63. |
  64. <a target="_blank" href="<?=Url::to(['page/view', 'name'=>'contact'])?>"><?= Yii::t('frontend', 'Contact us') ?></a>
  65. </ul>
  66. </div>
  67. </div>
  68. </nav>
  69. <div id="nav-header" class="">
  70. <div id="top-menu">
  71. <div id="top-menu_1">
  72. <span class="nav-search"><i class="fa fa-search"></i></span>
  73. <span class="nav-search_1"><i class="fa fa-navicon"></i></span>
  74. <hgroup class="logo-site" style="margin-top: 10px;">
  75. <h1 class="site-title">
  76. <a href="<?= Yii::$app->getHomeUrl() ?>"><img src="<?=Yii::$app->getRequest()->getBaseUrl()?>/static/images/logo.png" alt="<?= Yii::$app->feehi->website_title ?>"></a>
  77. </h1>
  78. </hgroup>
  79. <div id="site-nav-wrap">
  80. <nav id="site-nav" class="main-nav">
  81. <div>
  82. <?= MenuView::widget() ?>
  83. </div>
  84. </nav>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <?= MenuView::widget([
  90. 'template' => '<nav><ul class="nav_sj" id="nav-search_1">{lis}</ul></nav>',
  91. 'liTemplate' => "<li class='menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-{menu_id}'><a href='{url}'>{title}</a>{sub_menu}</li>"
  92. ]) ?>
  93. </header>
  94. <div id="search-main">
  95. <div class="searchbar">
  96. <form class="searchform" action="<?= Url::toRoute('search/index') ?>" method="get">
  97. <?= Yii::$app->getUrlManager()->enablePrettyUrl ? "" : "<input type='hidden' name='" . Yii::$app->getUrlManager()->routeParam . "' value='search/index'>" ?>
  98. <input type="text" name="q" value="<?= Html::encode(Yii::$app->getRequest()->get('q')) ?>" required="" placeholder="<?= Yii::t('frontend', 'Please input keywords') ?>">
  99. <button class="searchsubmit" type="submit"><?= Yii::t('frontend', 'Search') ?></button>
  100. </form>
  101. </div>
  102. <div class="searchbar">
  103. <form class="searchform" target="_blank" action="https://www.baidu.com/s" method="get">
  104. <input type="hidden" name="entry" value="1">
  105. <input class="swap_value" name="w" placeholder="<?= Yii::t('frontend', 'Please input keywords') ?>">
  106. <button class="searchsubmit" type="submit"><?= Yii::t('frontend', 'Baidu') ?></button>
  107. </form>
  108. </div>
  109. <div class="clear"></div>
  110. </div>
  111. <section class="container">
  112. <div class="speedbar"></div>
  113. <?= $content ?>
  114. </section>
  115. <div class="branding branding-black">
  116. <div class="container_f">
  117. <h2><?= Yii::t('frontend', 'Effective,Professional,Conform to SEO') ?></h2>
  118. <a class="btn btn-lg" href="http://www.feehi.com/page/contact" target="_blank"><?= Yii::t('frontend', 'Contact us') ?></a>
  119. </div>
  120. </div>
  121. <footer class="footer">
  122. <div class="footer-inner">
  123. <p>
  124. <a href="http://www.feehi.com/" title="Feehi CMS">Feehi CMS</a> <?= Yii::t('frontend', 'Copyright, all rights reserved') ?> © 2015-<?=date('Y')?>&nbsp;&nbsp;
  125. <select onchange="location.href=this.options[this.selectedIndex].value;" style="height: 30px">
  126. <?php
  127. foreach (Yii::$app->params['supportLanguages'] as $language => $languageDescription){
  128. $selected = "";
  129. if (Yii::$app->language == $language){
  130. $selected = "selected";
  131. }
  132. $url = Url::to(['site/language', 'lang' => $language]);
  133. echo "<option $selected value='{$url}'>{$languageDescription}</option>";
  134. }
  135. ?>
  136. </select>
  137. </p>
  138. <p><?=Yii::$app->feehi->website_icp?> Powered by Feehi CMS <a title="飞嗨" target="_blank" href="http://blog.feehi.com">飞嗨</a></p>
  139. </div>
  140. </footer>
  141. <div class="rollto" style="display: none;">
  142. <button class="btn btn-inverse" data-type="totop" title="back to top"><i class="fa fa-arrow-up"></i></button>
  143. </div>
  144. </body>
  145. <?php $this->endBody() ?>
  146. <?php
  147. if (Yii::$app->feehi->website_statics_script) {
  148. echo Yii::$app->feehi->website_statics_script;
  149. }
  150. ?>
  151. </html>
  152. <?php $this->endPage() ?>