ProductHero.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <section
  3. class="hero is-black">
  4. <div class="hero-body">
  5. <div class="hero-img">
  6. </div>
  7. <div class="container">
  8. <div class="columns">
  9. <div class="column is-9">
  10. <h1 class="title">
  11. {{title}}
  12. </h1>
  13. <h2 class="subtitle">
  14. {{subtitle}}
  15. </h2>
  16. <div class="sub-subtitle">
  17. <user-tile
  18. :name="author.name"
  19. :avatar="author.avatar" />
  20. </div>
  21. </div>
  22. <div class="column is-3">
  23. <div class="column-right">
  24. <slot></slot>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </section>
  31. </template>
  32. <script>
  33. import UserTile from '~/components/shared/UserTile'
  34. export default {
  35. components: {
  36. UserTile
  37. },
  38. props: {
  39. title: {
  40. type: String,
  41. default: 'Some Default Catchy Title'
  42. },
  43. subtitle: {
  44. type: String,
  45. default: 'Some Default Catchy Subtitle'
  46. },
  47. author: {
  48. type: Object,
  49. default: null
  50. }
  51. }
  52. }
  53. </script>
  54. <style scoped lang="scss">
  55. .hero-body {
  56. position: relative;
  57. }
  58. .hero-img {
  59. opacity: 0.8;
  60. position: absolute;
  61. height: 100%;
  62. width: 100%;
  63. top: 0;
  64. left: 0;
  65. -webkit-background-size: cover;
  66. -moz-background-size: cover;
  67. -o-background-size: cover;
  68. background-size: cover;
  69. filter: sepia(.1) grayscale(.1) saturate(.8);
  70. }
  71. .column-right {
  72. position: absolute;
  73. }
  74. @media screen and (max-width: 770px) {
  75. .column-right {
  76. position: inherit;
  77. }
  78. }
  79. .user-avatar {
  80. display: inline-block;
  81. }
  82. .is-black {
  83. background-color: black;
  84. background: linear-gradient(#29303B,#29303B,#29303B);
  85. }
  86. .title {
  87. font-weight: bold;
  88. font-size: 45px;
  89. }
  90. .subtitle {
  91. /*font-weight: bold;*/
  92. font-size: 25px;
  93. }
  94. .author-name {
  95. font-size: 20px;
  96. font-weight: bold;
  97. }
  98. </style>