Hero.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <section
  3. class="hero is-black is-medium">
  4. <div class="hero-body">
  5. <div
  6. class="hero-img"
  7. :style="{ background : `url(https://images.unsplash.com/photo-1510519138101-570d1dca3d66?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1631&q=80) no-repeat center center`}">
  8. </div>
  9. <div class="container">
  10. <h1 class="title">
  11. Super Amazing Promo
  12. </h1>
  13. <h2 class="subtitle">
  14. Super Amazing Promo Subtitle
  15. </h2>
  16. <a target="_" :href="'#'" class="button is-danger">Learn More!</a>
  17. </div>
  18. </div>
  19. </section>
  20. </template>
  21. <script>
  22. export default {
  23. }
  24. </script>
  25. <style lang="scss" scoped>
  26. .hero-body {
  27. position: relative;
  28. }
  29. .hero-img {
  30. opacity: 0.8;
  31. position: absolute;
  32. height: 100%;
  33. width: 100%;
  34. top: 0;
  35. left: 0;
  36. -webkit-background-size: cover;
  37. -moz-background-size: cover;
  38. -o-background-size: cover;
  39. background-size: cover;
  40. }
  41. .user-avatar {
  42. display: inline-block;
  43. }
  44. .is-black {
  45. background-color: black;
  46. }
  47. .title {
  48. font-weight: bold;
  49. font-size: 45px;
  50. }
  51. .subtitle {
  52. /*font-weight: bold;*/
  53. font-size: 25px;
  54. }
  55. .author-name {
  56. font-size: 20px;
  57. font-weight: bold;
  58. }
  59. </style>