|
1 | 1 | --- |
2 | 2 | interface Props { |
3 | | - title: string; |
4 | | - body: string; |
5 | | - href: string; |
| 3 | + title: string; |
| 4 | + body: string; |
| 5 | + href: string; |
6 | 6 | } |
7 | 7 |
|
8 | 8 | const { href, title, body } = Astro.props; |
9 | 9 | --- |
10 | 10 |
|
11 | | -<li class="link-card"> |
12 | | - <a href={href}> |
13 | | - <h2> |
14 | | - {title} |
15 | | - <span>→</span> |
16 | | - </h2> |
17 | | - <p> |
18 | | - {body} |
19 | | - </p> |
20 | | - </a> |
| 11 | +<li class='link-card'> |
| 12 | + <a href={href}> |
| 13 | + <h2> |
| 14 | + {title} |
| 15 | + <span>→</span> |
| 16 | + </h2> |
| 17 | + <p> |
| 18 | + {body} |
| 19 | + </p> |
| 20 | + </a> |
21 | 21 | </li> |
22 | 22 | <style> |
23 | | - .link-card { |
24 | | - list-style: none; |
25 | | - display: flex; |
26 | | - padding: 1px; |
27 | | - background-color: #23262d; |
28 | | - background-image: none; |
29 | | - background-size: 400%; |
30 | | - border-radius: 7px; |
31 | | - background-position: 100%; |
32 | | - transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1); |
33 | | - box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); |
34 | | - } |
35 | | - .link-card > a { |
36 | | - width: 100%; |
37 | | - text-decoration: none; |
38 | | - line-height: 1.4; |
39 | | - padding: calc(1.5rem - 1px); |
40 | | - border-radius: 8px; |
41 | | - color: white; |
42 | | - background-color: #23262d; |
43 | | - opacity: 0.8; |
44 | | - } |
45 | | - h2 { |
46 | | - margin: 0; |
47 | | - font-size: 1.25rem; |
48 | | - transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1); |
49 | | - } |
50 | | - p { |
51 | | - margin-top: 0.5rem; |
52 | | - margin-bottom: 0; |
53 | | - } |
54 | | - .link-card:is(:hover, :focus-within) { |
55 | | - background-position: 0; |
56 | | - background-image: var(--accent-gradient); |
57 | | - } |
58 | | - .link-card:is(:hover, :focus-within) h2 { |
59 | | - color: rgb(var(--accent-light)); |
60 | | - } |
| 23 | + .link-card { |
| 24 | + list-style: none; |
| 25 | + display: flex; |
| 26 | + padding: 1px; |
| 27 | + background-color: #23262d; |
| 28 | + background-image: none; |
| 29 | + background-size: 400%; |
| 30 | + border-radius: 7px; |
| 31 | + background-position: 100%; |
| 32 | + transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1); |
| 33 | + box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); |
| 34 | + } |
| 35 | + .link-card > a { |
| 36 | + width: 100%; |
| 37 | + text-decoration: none; |
| 38 | + line-height: 1.4; |
| 39 | + padding: calc(1.5rem - 1px); |
| 40 | + border-radius: 8px; |
| 41 | + color: white; |
| 42 | + background-color: #23262d; |
| 43 | + opacity: 0.8; |
| 44 | + } |
| 45 | + h2 { |
| 46 | + margin: 0; |
| 47 | + font-size: 1.25rem; |
| 48 | + transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1); |
| 49 | + } |
| 50 | + p { |
| 51 | + margin-top: 0.5rem; |
| 52 | + margin-bottom: 0; |
| 53 | + } |
| 54 | + .link-card:is(:hover, :focus-within) { |
| 55 | + background-position: 0; |
| 56 | + background-image: var(--accent-gradient); |
| 57 | + } |
| 58 | + .link-card:is(:hover, :focus-within) h2 { |
| 59 | + color: rgb(var(--accent-light)); |
| 60 | + } |
61 | 61 | </style> |
0 commit comments