header.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. use app\models\News; ?>
  3. <header>
  4. <div class="header__top">
  5. <div class="header-top section" style="">
  6. <div class="header-top__wrapper section-wrapper section-wrapper_extra">
  7. <div class="header-top__banner">
  8. <div class="header-banner">
  9. <div class="header-banner_desktop">
  10. <div id="adfox_163238655688285853" class=""></div>
  11. </div>
  12. <div class="header-banner_mobile">
  13. <div id="adfox_163238723987728973"></div>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="container">
  21. <div class="row">
  22. <div class="col-md-2 d-none d-lg-block">
  23. <div class="header-center__info">
  24. <ul class="header-center__info-list">
  25. <li class="header-center__info-item"><span class="header-center__info-link">16°, Барнаул</span></li>
  26. <li class="header-center__info-item"><span id="USD" class="header-center__info-link header-center__info-link_down">$&nbsp;57.83</span></li>
  27. <li class="header-center__info-item"><span id="EUR" class="header-center__info-link header-center__info-link_down">€&nbsp; 57.89</span></li>
  28. </ul>
  29. </div>
  30. </div>
  31. <div class="col-lg-6 col-md-8">
  32. <?=$this->render("stories")?>
  33. </div>
  34. <div class="col-md-4">
  35. <?=$this->render("/_etc/header/header_comments")?>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="nav-cont">
  40. <div id="js-header-bottom-id" class="header__bottom js-header-bottom">
  41. <div class="header-bottom container">
  42. <div class="header-bottom__wrapper section-wrapper">
  43. <main class="header-bottom__main">
  44. <div class="header-bottom__logo"><a href="/" class="header-bottom__logo-link"><img src="/img/amic-logo.svg" width="91" height="28"></a></div>
  45. <div class="header-bottom__nav">
  46. <nav class="header-nav">
  47. <ul class="header-nav__list">
  48. <li class="header-nav__item"><a href="/news" class="header-nav__link">
  49. Новости
  50. </a></li>
  51. <li class="header-nav__item"><a href="/articles" class="header-nav__link">
  52. Читай
  53. </a></li>
  54. <li class="header-nav__item"><a href="/podcasts" class="header-nav__link">
  55. Слушай
  56. </a></li>
  57. <li class="header-nav__item"><a href="/video" class="header-nav__link">
  58. Смотри
  59. </a></li>
  60. </ul>
  61. </nav>
  62. </div>
  63. </main>
  64. <aside class="header-bottom__side">
  65. <div class="header-bottom__buttons">
  66. <div class="header-bottom__button">
  67. <a href="https://fmprod.ru/radiostantsii/item/evropa-plyus/" target="_blank" class="button button_grey">
  68. <span class="button__text tg">▶ Слушать радио</span>
  69. </a>
  70. </div>
  71. <div class="header-bottom__button">
  72. <a href="https://t.me/news_amic" target="_blank" class="button button_grey button_grey-tg">
  73. <span class="button__icon">
  74. <svg style="width: 17px;height: 14px;" class="icon icon-tg"><use xlink:href="/svg/symbol/sprite-styled.svg#tg"></use></svg>
  75. </span>
  76. <span class="button__text tg">&nbsp;Телеграм-канал</span>
  77. </a>
  78. </div>
  79. </div>
  80. </aside>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </header>
  86. <script>
  87. (function (){
  88. let header = document.getElementById("js-header-bottom-id");
  89. let height = header.offsetHeight;
  90. header.parentNode.style.height = height+"px";
  91. let position = header.offsetTop;
  92. window.onscroll = function (){
  93. if(window.scrollY>=position){
  94. if(!header.classList.contains("fixed")) header.classList.add("fixed");
  95. } else {
  96. if(header.classList.contains("fixed")) header.classList.remove("fixed");
  97. }
  98. }
  99. })();
  100. </script>