main.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. ?>
  10. <?php
  11. $jsOptions = [
  12. # js config 1
  13. [
  14. 'options' => [
  15. 'position' => 'POS_END',
  16. // 'condition'=> 'lt IE 9',
  17. ],
  18. 'js' =>[
  19. 'js/jquery-3.0.0.min.js',
  20. 'js/jquery.lazyload.min.js',
  21. 'js/owl.carousel.min.js',
  22. 'js/js.js',
  23. ],
  24. ],
  25. # js config 2
  26. [
  27. 'options' => [
  28. 'condition'=> 'lt IE 9',
  29. ],
  30. 'js' =>[
  31. 'js/ie9js.js'
  32. ],
  33. ],
  34. ];
  35. # css config
  36. $cssOptions = [
  37. # css config 1.
  38. [
  39. 'css' =>[
  40. 'css/style.css',
  41. 'css/ie.css',
  42. ],
  43. ],
  44. # css config 2.
  45. [
  46. 'options' => [
  47. 'condition'=> 'lt IE 9',
  48. ],
  49. 'css' =>[
  50. 'css/ltie9.css',
  51. ],
  52. ],
  53. ];
  54. \Yii::$service->page->asset->jsOptions = \yii\helpers\ArrayHelper::merge($jsOptions, \Yii::$service->page->asset->jsOptions);
  55. \Yii::$service->page->asset->cssOptions = \yii\helpers\ArrayHelper::merge($cssOptions, \Yii::$service->page->asset->cssOptions);
  56. \Yii::$service->page->asset->register($this);
  57. ?>
  58. <?php $this->beginPage() ?>
  59. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  60. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?= $currentLangCode = Yii::$service->store->currentLangCode; ?>" lang="<?= $currentLangCode ?>">
  61. <head>
  62. <?= Yii::$service->page->widget->render('head',$this); ?>
  63. </head>
  64. <body>
  65. <?= Yii::$service->page->widget->render('beforeContent',$this); ?>
  66. <?php $this->beginBody() ?>
  67. <header id="header">
  68. <?= Yii::$service->page->widget->render('header',$this); ?>
  69. <?= Yii::$service->page->widget->render('menu',$this); ?>
  70. </header>
  71. <div class="main-container">
  72. <?= $content; ?>
  73. </div>
  74. <div class="footer-container">
  75. <?= Yii::$service->page->widget->render('footer',$this); ?>
  76. </div>
  77. <?= Yii::$service->page->widget->render('trace',$this); ?>
  78. <?= Yii::$service->page->widget->render('scroll',$this); ?>
  79. <?php $this->endBody() ?>
  80. </body>
  81. </html>
  82. <?php $this->endPage() ?>