Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
update Quote component
Browse files
app/src/components/Quote.astro
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
---
|
| 2 |
interface Props {
|
|
|
|
| 3 |
source?: string;
|
| 4 |
}
|
| 5 |
|
| 6 |
-
const { source } = Astro.props;
|
| 7 |
---
|
| 8 |
|
| 9 |
<blockquote class="quote">
|
|
@@ -11,9 +12,11 @@ const { source } = Astro.props;
|
|
| 11 |
<slot />
|
| 12 |
</div>
|
| 13 |
{
|
| 14 |
-
source && (
|
| 15 |
<footer class="quote__footer">
|
| 16 |
-
<span class="
|
|
|
|
|
|
|
| 17 |
</footer>
|
| 18 |
)
|
| 19 |
}
|
|
@@ -85,18 +88,31 @@ const { source } = Astro.props;
|
|
| 85 |
sans-serif;
|
| 86 |
}
|
| 87 |
|
| 88 |
-
.
|
| 89 |
font-weight: 500;
|
| 90 |
opacity: 0.85;
|
| 91 |
font-style: italic;
|
| 92 |
color: var(--text-color);
|
| 93 |
}
|
| 94 |
|
| 95 |
-
.
|
| 96 |
content: "— ";
|
| 97 |
font-style: normal;
|
| 98 |
}
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
@media (max-width: 640px) {
|
| 101 |
.quote {
|
| 102 |
margin: 24px 0;
|
|
|
|
| 1 |
---
|
| 2 |
interface Props {
|
| 3 |
+
author?: string;
|
| 4 |
source?: string;
|
| 5 |
}
|
| 6 |
|
| 7 |
+
const { author, source } = Astro.props;
|
| 8 |
---
|
| 9 |
|
| 10 |
<blockquote class="quote">
|
|
|
|
| 12 |
<slot />
|
| 13 |
</div>
|
| 14 |
{
|
| 15 |
+
(author || source) && (
|
| 16 |
<footer class="quote__footer">
|
| 17 |
+
{author && <span class="quote__author" set:html={author} />}
|
| 18 |
+
{author && source && <span class="quote__separator">, </span>}
|
| 19 |
+
{source && <span class="quote__source" set:html={source} />}
|
| 20 |
</footer>
|
| 21 |
)
|
| 22 |
}
|
|
|
|
| 88 |
sans-serif;
|
| 89 |
}
|
| 90 |
|
| 91 |
+
.quote__author {
|
| 92 |
font-weight: 500;
|
| 93 |
opacity: 0.85;
|
| 94 |
font-style: italic;
|
| 95 |
color: var(--text-color);
|
| 96 |
}
|
| 97 |
|
| 98 |
+
.quote__author::before {
|
| 99 |
content: "— ";
|
| 100 |
font-style: normal;
|
| 101 |
}
|
| 102 |
|
| 103 |
+
.quote__separator {
|
| 104 |
+
font-weight: 500;
|
| 105 |
+
opacity: 0.85;
|
| 106 |
+
color: var(--text-color);
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.quote__source {
|
| 110 |
+
font-weight: 500;
|
| 111 |
+
opacity: 0.85;
|
| 112 |
+
font-style: italic;
|
| 113 |
+
color: var(--text-color);
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
@media (max-width: 640px) {
|
| 117 |
.quote {
|
| 118 |
margin: 24px 0;
|