Item.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <li class="catalog-list__item">
  3. <div class="catalog-item">
  4. <a class="catalog-item__link" href="javascript:void(0)">
  5. <aside class="catalog-item__side">
  6. <div class="catalog-item__figure">
  7. <img class="catalog-item__img" :src="news.urlToImage ? news.urlToImage : ''" alt="" />
  8. </div>
  9. </aside>
  10. <main class="catalog-item__main">
  11. <div class="catalog-item__main-top">
  12. <div class="catalog-item__main-title">
  13. <img v-if="categoryNews.lightning" :src="require('~/static/svg/styled/lightning.svg')" />
  14. <span v-html="news.title"></span>
  15. </div>
  16. </div>
  17. <div class="catalog-item__main-bottom">
  18. <div class="catalog-item__main-info">
  19. <div class="catalog-item__main-info-element">
  20. <span>{{ $convertDate(news.publishedAt) }}</span>
  21. </div>
  22. <div class="catalog-item__main-info-element">
  23. <span> <BaseIcon :name="'views'" /></span><span>235</span>
  24. </div>
  25. <div class="catalog-item__main-info-element">
  26. <span> <BaseIcon :name="'comments'" clear/></span><span>57</span>
  27. </div>
  28. </div>
  29. </div>
  30. </main></a
  31. >
  32. </div>
  33. </li>
  34. </template>
  35. <script>
  36. export default {
  37. props: {
  38. news: {
  39. type: Object,
  40. required: true,
  41. },
  42. },
  43. methods: {
  44. }
  45. };
  46. </script>
  47. <style>
  48. </style>