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