FeatureBox.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <q-card class="feature-card">
  3. <q-card-section class="feature-horizontal-section"
  4. :class="localOptions.className"
  5. :horizontal="localOptions.horizontal">
  6. <img class="feature-image"
  7. :src="localOptions.image">
  8. <q-card-section>
  9. <div class="feature-title ellipsis">{{ localOptions.title }}</div>
  10. <div class="feature-description">
  11. {{ localOptions.description }}
  12. </div>
  13. </q-card-section>
  14. </q-card-section>
  15. </q-card>
  16. </template>
  17. <script>
  18. import { mixinWidget, mixinPrefetchServerData } from 'src/mixin/Mixins.js'
  19. export default {
  20. name: 'FeatureBox',
  21. mixins: [mixinPrefetchServerData, mixinWidget],
  22. data() {
  23. return {
  24. defaultOptions: {
  25. title: null,
  26. description: null,
  27. image: null,
  28. horizontal: true
  29. }
  30. }
  31. }
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .feature-card {
  36. width: 100%;
  37. max-width: 100%;
  38. box-shadow: none;
  39. .feature-horizontal-section {
  40. .feature-image {
  41. width: 100px;
  42. height: 100px;
  43. }
  44. .feature-title {
  45. font-weight: 700;
  46. font-size: 20px;
  47. line-height: 35px;
  48. @media screen and (max-width: 600px) {
  49. font-weight: 600;
  50. font-size: 18px;
  51. line-height: 26px;
  52. }
  53. }
  54. .feature-description {
  55. max-width: 300px;
  56. font-weight: 400;
  57. font-size: 18px;
  58. line-height: 31px;
  59. @media screen and (max-width: 600px) {
  60. font-weight: 400;
  61. font-size: 14px;
  62. line-height: 22px;
  63. }
  64. }
  65. }
  66. }
  67. </style>