61 lines
1.4 KiB
Plaintext
61 lines
1.4 KiB
Plaintext
---
|
|
interface Props {
|
|
accent?: string;
|
|
isTitle?: boolean
|
|
}
|
|
|
|
const { accent, isTitle } = Astro.props as Props;
|
|
|
|
let opachity = 0.05;
|
|
if (isTitle) {
|
|
opachity = 0.2;
|
|
}
|
|
---
|
|
|
|
<div class="container">
|
|
{accent && <div class="accent" style={`background-color: ${accent}; width:4px; border-radius: 999px; flex-shrink: 0;`}></div>}
|
|
<div class="content">
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
|
|
<style define:vars={{color: `rgba(255,255,255,${opachity})`}}>
|
|
.container {
|
|
font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
|
|
position: relative;
|
|
display: flex;
|
|
align-items: stretch;
|
|
gap: 1rem;
|
|
min-height: 120px;
|
|
padding: 1rem;
|
|
background: var(--color);
|
|
border: 1px solid rgba(255,255,255,0.08);
|
|
border-radius: 14px;
|
|
box-shadow: 0 8px 20px rgba(0,0,0,0.18);
|
|
color: white;
|
|
transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.container:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 14px 28px rgba(0,0,0,0.24);
|
|
border-color: rgba(255,255,255,0.14);
|
|
}
|
|
|
|
|
|
.content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.container {
|
|
min-height: 100px;
|
|
padding: 0.85rem;
|
|
gap: 0.8rem;
|
|
}
|
|
}
|
|
</style> |