WelcomeItem.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <div class="item">
  3. <i>
  4. <slot name="icon"></slot>
  5. </i>
  6. <div class="details">
  7. <h3>
  8. <slot name="heading"></slot>
  9. </h3>
  10. <slot></slot>
  11. </div>
  12. </div>
  13. </template>
  14. <style scoped>
  15. .item {
  16. margin-top: 2rem;
  17. display: flex;
  18. }
  19. .details {
  20. flex: 1;
  21. margin-left: 1rem;
  22. }
  23. i {
  24. display: flex;
  25. place-items: center;
  26. place-content: center;
  27. width: 32px;
  28. height: 32px;
  29. color: var(--color-text);
  30. }
  31. h3 {
  32. font-size: 1.2rem;
  33. font-weight: 500;
  34. margin-bottom: 0.4rem;
  35. color: var(--color-heading);
  36. }
  37. @media (min-width: 1024px) {
  38. .item {
  39. margin-top: 0;
  40. padding: 0.4rem 0 1rem calc(var(--section-gap) / 2);
  41. }
  42. i {
  43. top: calc(50% - 25px);
  44. left: -26px;
  45. position: absolute;
  46. border: 1px solid var(--color-border);
  47. background: var(--color-background);
  48. border-radius: 8px;
  49. width: 50px;
  50. height: 50px;
  51. }
  52. .item:before {
  53. content: ' ';
  54. border-left: 1px solid var(--color-border);
  55. position: absolute;
  56. left: 0;
  57. bottom: calc(50% + 25px);
  58. height: calc(50% - 25px);
  59. }
  60. .item:after {
  61. content: ' ';
  62. border-left: 1px solid var(--color-border);
  63. position: absolute;
  64. left: 0;
  65. top: calc(50% + 25px);
  66. height: calc(50% - 25px);
  67. }
  68. .item:first-of-type:before {
  69. display: none;
  70. }
  71. .item:last-of-type:after {
  72. display: none;
  73. }
  74. }
  75. </style>