WelcomeItem.vue 1.3 KB

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