Skip to content

Commit 4b95722

Browse files
committed
hint when not showing?
1 parent 08db1e8 commit 4b95722

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/components/mdx/GHEmbed.astro

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ interface Props {
66
end?: number;
77
branch?: string;
88
user?: string;
9+
showHint?: boolean;
910
}
1011
11-
const { user = "flq", repo, branch = "develop", file, start, end } = Astro.props;
12+
const { showHint = false, user = "flq", repo, branch = "develop", file, start, end } = Astro.props;
1213
const lines = start && end ? `#L${start}-L${end}` : ''
1314
1415
const query = new URLSearchParams({
@@ -22,8 +23,16 @@ const query = new URLSearchParams({
2223
2324
---
2425

26+
<style>
27+
p {
28+
font-size: small;
29+
color: hsl(0, 0%, 50%);
30+
}
31+
</style>
32+
2533
<script
2634
is:inline
2735
cross-origin="anonymous"
2836
src={`https://emgithub.com/embed-v2.js?${query.toString()}`}
2937
></script>
38+
{showHint && <p>Gist not showing up? Most likely you're using Chrome. Reload the page to see the gist.</p> }

0 commit comments

Comments
 (0)