Browse Source

Added rounded edge boxes around each section by wrapping WelcomeItem content in a styled container with border-radius, background, and hover effects

ai/1769644767510
Deploy Bot 2 months ago
parent
commit
ccfc346e0a
  1. 77
      src/components/WelcomeItem.vue

77
src/components/WelcomeItem.vue

@ -1,22 +1,37 @@
<template> <template>
<div class="item"> <div class="item-wrapper">
<i> <div class="item">
<slot name="icon"></slot> <i>
</i> <slot name="icon"></slot>
<div class="details"> </i>
<h3> <div class="details">
<slot name="heading"></slot> <h3>
</h3> <slot name="heading"></slot>
<slot></slot> </h3>
<slot></slot>
</div>
</div> </div>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.item-wrapper {
background: var(--color-background-soft);
border: 1px solid var(--color-border);
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 1.5rem;
transition: border-color 0.3s ease;
}
.item-wrapper:hover {
border-color: var(--color-border-hover);
}
.item { .item {
margin-top: 2rem;
display: flex; display: flex;
position: relative; position: relative;
margin: 0;
} }
.details { .details {
@ -30,8 +45,8 @@ i {
place-content: center; place-content: center;
width: 32px; width: 32px;
height: 32px; height: 32px;
color: var(--color-text); color: var(--color-text);
flex-shrink: 0;
} }
h3 { h3 {
@ -42,46 +57,20 @@ h3 {
} }
@media (min-width: 1024px) { @media (min-width: 1024px) {
.item-wrapper {
margin-bottom: 2rem;
}
.item { .item {
margin-top: 0; padding: 0;
padding: 0.4rem 0 1rem calc(var(--section-gap) / 2);
} }
i { i {
top: calc(50% - 25px); width: 50px;
left: -26px; height: 50px;
position: absolute;
border: 1px solid var(--color-border); border: 1px solid var(--color-border);
background: var(--color-background); background: var(--color-background);
border-radius: 8px; border-radius: 8px;
width: 50px;
height: 50px;
}
.item:before {
content: ' ';
border-left: 1px solid var(--color-border);
position: absolute;
left: 0;
bottom: calc(50% + 25px);
height: calc(50% - 25px);
}
.item:after {
content: ' ';
border-left: 1px solid var(--color-border);
position: absolute;
left: 0;
top: calc(50% + 25px);
height: calc(50% - 25px);
}
.item:first-of-type:before {
display: none;
}
.item:last-of-type:after {
display: none;
} }
} }
</style> </style>
Loading…
Cancel
Save