2023-01-20 23:43:00 +00:00
|
|
|
---
|
|
|
|
export interface Props {
|
2023-03-09 10:44:18 +00:00
|
|
|
site: string
|
|
|
|
link: string
|
2023-03-10 20:01:12 +00:00
|
|
|
image: string
|
2023-01-20 23:43:00 +00:00
|
|
|
}
|
|
|
|
|
2023-03-10 20:01:12 +00:00
|
|
|
const { image, link, site } = Astro.props
|
2023-03-14 20:49:13 +00:00
|
|
|
const icon: string = `background-image: url('/assets/social/${image}.webp')`
|
2023-01-20 23:43:00 +00:00
|
|
|
---
|
|
|
|
|
2023-03-11 18:59:51 +00:00
|
|
|
<a href={link} target="_blank" rel="noopener noreferrer" aria-label={site}>
|
2023-03-09 10:44:18 +00:00
|
|
|
<article class="contact do-hover">
|
2023-03-10 20:01:12 +00:00
|
|
|
<div style={icon}>
|
2023-03-15 16:03:50 +00:00
|
|
|
<span>
|
|
|
|
<h2>{site}</h2>
|
|
|
|
</span>
|
2023-03-10 20:01:12 +00:00
|
|
|
</div>
|
2023-03-09 10:44:18 +00:00
|
|
|
</article>
|
2023-01-20 23:43:00 +00:00
|
|
|
</a>
|
|
|
|
|
|
|
|
<style>
|
2023-03-15 16:03:50 +00:00
|
|
|
a {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
2023-07-08 13:02:07 +00:00
|
|
|
article div {
|
|
|
|
border-radius: 1.25rem;
|
|
|
|
background-size: contain;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
--size-value: 6.25rem;
|
|
|
|
width: var(--size-value);
|
|
|
|
height: var(--size-value);
|
|
|
|
}
|
|
|
|
|
2023-03-15 16:03:50 +00:00
|
|
|
article:hover span {
|
2023-07-08 13:02:07 +00:00
|
|
|
border-radius: 1.25rem;
|
|
|
|
padding: 0 0.5rem;
|
2023-03-15 16:03:50 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
text-align: center;
|
|
|
|
background-color: var(--c-darkgray);
|
2023-07-08 13:02:07 +00:00
|
|
|
height: calc(var(--size-value) + 0.1rem);
|
|
|
|
width: calc(var(--size-value) + 0.1rem);
|
2023-03-15 16:03:50 +00:00
|
|
|
opacity: 90%;
|
|
|
|
}
|
|
|
|
|
2023-03-10 20:01:12 +00:00
|
|
|
article:hover h2 {
|
2023-03-15 16:03:50 +00:00
|
|
|
margin: 0;
|
|
|
|
display: inline-flex;
|
|
|
|
font-weight: bold;
|
2023-03-09 10:44:18 +00:00
|
|
|
color: white;
|
|
|
|
font-size: 18px;
|
2023-03-10 20:01:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
article h2 {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2023-03-15 16:03:50 +00:00
|
|
|
article span {
|
|
|
|
display: none;
|
|
|
|
}
|
2023-03-09 10:44:18 +00:00
|
|
|
article {
|
2023-07-08 13:02:07 +00:00
|
|
|
border-radius: 1.25rem;
|
2023-03-10 20:01:12 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2023-03-09 10:44:18 +00:00
|
|
|
background-color: var(--c-darkergray);
|
|
|
|
border-color: var(--c-darkgray);
|
|
|
|
padding: 10px;
|
|
|
|
text-align: center;
|
|
|
|
transition: transform var(--speed) var(--ease);
|
2023-03-10 20:01:12 +00:00
|
|
|
height: auto;
|
|
|
|
width: auto;
|
2023-03-09 10:44:18 +00:00
|
|
|
}
|
|
|
|
a:hover {
|
|
|
|
transform: scale(var(--hover-scale));
|
|
|
|
}
|
|
|
|
</style>
|