Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. <template>
  2. <div
  3. class="offer-container col-xs-12 col-sm-6 pb15"
  4. v-if="data"
  5. >
  6. <router-link :to="localizedRoute(link)">
  7. <div
  8. class="offer"
  9. v-lazy:background-image="image"
  10. >
  11. <h2 class="title m0 h1">
  12. {{ title }}
  13. </h2>
  14. <p class="subtitle m0 serif h3 uppercase">
  15. {{ subtitle }}
  16. </p>
  17. </div>
  18. </router-link>
  19. </div>
  20. </template>
  21.  
  22. <script>
  23. import cmsBlock from 'vsf-cms-block-mixin/components/cmsBlock'
  24.  
  25. export default {
  26. name: 'LeftBanner',
  27. mixins: [
  28. cmsBlock
  29. ],
  30. computed: {
  31. title () {
  32. return this.parsedContent.querySelector('h2').rawText
  33. },
  34. subtitle () {
  35. return this.parsedContent.querySelector('p').rawText
  36. },
  37. link () {
  38. return this.parsedContent.querySelector('a').attributes['href']
  39. },
  40. image () {
  41. return this.parsedContent.querySelector('img').attributes['src']
  42. }
  43. }
  44. }
  45. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement