index.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <div>
  3. <section class="grid section">
  4. <div class="grid__wrapper section-wrapper">
  5. <aside class="grid__side">
  6. <div class="news-side">
  7. <div class="news-side__wrapper">
  8. <h2 class="news-side__title">
  9. <a href="/news">Лента новостей</a>
  10. </h2>
  11. <!-- <div class="news-side__banner">
  12. <div class="banner banner_side">
  13. <a class="banner__link" href="javascript:void(0)">
  14. <div class="banner__time">12:07:48</div>
  15. <div class="banner__title">
  16. осталось до&nbsp;конца распродажи в&nbsp;DNS
  17. </div>
  18. <div class="banner__icon">
  19. <BaseIcon :name="'dns'" /></div
  20. ></a>
  21. </div>
  22. </div> -->
  23. <WidgetLent :params="{showad:false,showadMainPage:true}" />
  24. </div>
  25. </div>
  26. </aside>
  27. </div>
  28. </section>
  29. <div class="section-wrapper">
  30. <NewsTypeExtendHeader v-if="indexNewsList.sections['daily_news'] && indexNewsList.sections['daily_news'].news[0]" :news="indexNewsList.sections['daily_news'].news[0]" />
  31. </div>
  32. <div v-if="indexNewsList.sections['section_1'] && indexNewsList.sections['section_1'].news[0]" class="grid__wrapper section-wrapper">
  33. <NewsTypeMainHeader
  34. :main-news-list="indexNewsList.sections['section_1']"
  35. />
  36. </div>
  37. <NewsTypeCommon v-if="indexNewsList.sections['section_2'] && indexNewsList.sections['section_2'].news[0]" :news-list="indexNewsList.sections['section_2']" />
  38. <NewsTypeExtendBody v-if="indexNewsList.sections['section_3'] && indexNewsList.sections['section_3'].news[0]" :news="indexNewsList.sections['section_3'].news[0]" />
  39. <NewsTypeMainWeek v-if="indexNewsList.sections['section_4'] && indexNewsList.sections['section_4'].news[0]" :week-news-list="indexNewsList.sections['section_4']" />
  40. <BannersW1254H100 />
  41. <NewsModuleWrapper v-if="indexNewsList.modules[0] && indexNewsList.modules[0].news[0]" :module="indexNewsList.modules[0]" />
  42. <NewsTypeBodyCommon v-if="indexNewsList.sections['section_5'] && indexNewsList.sections['section_5'].news[0]" :news-list="indexNewsList.sections['section_5']" />
  43. <NewsTypeSlider v-if="indexNewsList.sections['section_6'] && indexNewsList.sections['section_6'].news[0]" :slider-news="indexNewsList.sections['section_6']" />
  44. <BannersW1254H300 />
  45. <NewsModuleWrapper v-if="indexNewsList.modules[1] && indexNewsList.modules[1].news[0]" :module="indexNewsList.modules[1]" />
  46. <NewsTypeCommon v-if="indexNewsList.sections['section_7'] && indexNewsList.sections['section_7'].news[0]" :news-list="indexNewsList.sections['section_7']" />
  47. <BannersW1254H100Or90 />
  48. <NewsModuleWrapper v-if="indexNewsList.modules[2] && indexNewsList.modules[2].news[0]" :module="indexNewsList.modules[2]" />
  49. </div>
  50. </template>
  51. <script>
  52. import { mapGetters, mapActions } from 'vuex'
  53. import SkyScrapperMain from '~/components/Banners/SkyScrapperMain.vue'
  54. export default {
  55. components: { SkyScrapperMain },
  56. async asyncData ({ store }) {
  57. await store.dispatch('modules/news/setIndexNewsList')
  58. await store.dispatch('modules/news/getNewsFeedList')
  59. },
  60. data () {
  61. // return {
  62. // script3: `window.yaContextCb=window.yaContextCb||[];window.yaContextCb.push(()=>{Ya.adfoxCode.create({ownerId:279920,containerId:"adfox_1630315824593273",params:{pp:"i",ps:"dbpj",p2:"hijl"}})});`,
  63. // script2: `window.yaContextCb=window.yaContextCb||[];window.yaContextCb.push(()=>{Ya.adfoxCode.create({ownerId:279920,containerId:"adfox_16303082032982855",params:{pp:"h",ps:"dbpj",p2:"hhya"}})});`,
  64. // script1: `window.yaContextCb=window.yaContextCb||[];window.yaContextCb.push(()=>{Ya.adfoxCode.create({ownerId:279920,containerId:"adfox_163005842132031396",params:{pp:"g",ps:"dbpj",p2:"hhxx"}})});`
  65. // }
  66. },
  67. // mounted() {
  68. // setInterval(this.setIndexNewsList, 240000);
  69. // },
  70. computed: {
  71. ...mapGetters({
  72. indexNewsList: 'modules/news/indexNewsList'
  73. }),
  74. sliders () {
  75. return this.indexNewsList.sliders
  76. },
  77. nzk_logo () {
  78. return require('~/static/png/nzk_logo.png')
  79. }
  80. },
  81. methods: {
  82. ...mapActions({
  83. setIndexNewsList: 'modules/news/setIndexNewsList'
  84. }),
  85. isMobile () {
  86. return this.$device.isMobile
  87. }
  88. },
  89. head () {
  90. return {
  91. title: 'Новости Барнаула и Алтайского края — на сайте amic.ru ИА Амител',
  92. meta: [
  93. {
  94. hid: 'description',
  95. name: 'description',
  96. content: 'Новости в Барнауле и Алтайском крае: оперативно репортажи с фото и видео. Интересные темы, эксперты, ответы на вопросы, тесты, игры.'
  97. }
  98. ],
  99. link: [
  100. { rel: 'canonical', href: 'https://www.amic.ru/' }
  101. ],
  102. script: [
  103. {
  104. // src: 'https://cdn.onthe.io/io.js/d7T3K6DqlqQy',
  105. async: true,
  106. innerHTML: `
  107. window._io_config = window._io_config || {};
  108. window._io_config["0.2.0"] = window._io_config["0.2.0"] || [];
  109. window._io_config["0.2.0"].push({
  110. page_url: "https://old.amic.ru/",
  111. page_url_canonical: "https://www.amic.ru/",
  112. page_title: 'Новости Барнаула и Алтайского края — на сайте amic.ru ИА Амител',
  113. page_type: "main",
  114. page_language: "ru"
  115. })`
  116. }
  117. ],
  118. __dangerouslyDisableSanitizers: ['script']
  119. }
  120. }
  121. }
  122. </script>
  123. <style lang="less">
  124. /* @import url("@/assets/css/style.css"); */
  125. .container {
  126. margin: 0 auto;
  127. min-height: 100vh;
  128. }
  129. .title {
  130. font-family: "Quicksand", "Source Sans Pro", -apple-system, BlinkMacSystemFont,
  131. "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  132. display: block;
  133. font-weight: 300;
  134. font-size: 100px;
  135. color: #35495e;
  136. letter-spacing: 1px;
  137. }
  138. .subtitle {
  139. font-weight: 300;
  140. font-size: 42px;
  141. color: #526488;
  142. word-spacing: 5px;
  143. padding-bottom: 15px;
  144. }
  145. .links {
  146. padding-top: 15px;
  147. }
  148. .VuePagination__count {
  149. display: none;
  150. }
  151. .nzk_banner{
  152. position: absolute;
  153. top: -15px;
  154. right: 0;
  155. width: 100px;
  156. }
  157. </style>