Skip to content

Commit 9714ec0

Browse files
committed
docs: Add GitHub icon
1 parent 39ecae4 commit 9714ec0

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

docs/src/components/Header/Header.astro

+13
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ const lang = getLanguageFromURL(currentPage);
2424
</a>
2525
</div>
2626
<div style="flex-grow: 0.8;"></div>
27+
<a
28+
href="https://github.com/manzt/anywidget"
29+
target="_blank"
30+
aria-label="GitHub Repository"
31+
class="github-icon"
32+
>
33+
<svg aria-hidden="true" viewBox="0 0 24 24" class="w-7 h-7">
34+
<path d="M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"></path>
35+
</svg>
36+
</a>
2737
<ThemeToggleButton client:visible />
2838
{
2939
KNOWN_LANGUAGE_CODES.length > 1 && (
@@ -48,6 +58,9 @@ const lang = getLanguageFromURL(currentPage);
4858
position: sticky;
4959
top: 0;
5060
}
61+
.github-icon {
62+
fill: var(--theme-text-light)
63+
}
5164
.logo {
5265
flex: 1;
5366
display: flex;

docs/src/components/Header/ThemeToggleButton.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ const ThemeToggle: FunctionalComponent = () => {
5151
const root = document.documentElement;
5252
if (theme === "light") {
5353
root.classList.remove("theme-dark");
54+
root.classList.remove("dark");
5455
} else {
5556
root.classList.add("theme-dark");
57+
root.classList.add("dark");
5658
}
5759
}, [theme]);
5860

docs/src/components/Hero.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ import Counter from "./examples/Counter.astro";
7272
></iframe>
7373
</div>
7474

75-
<p class="mt-4 text-lg text-gray-600">
75+
<p class="mt-4 text-lg">
7676
My talk from SciPy 2024 about how anywidget sets a standard for portable widgets while maintaining ecosystem compatibility.
7777
</p>
7878

docs/tailwind.config.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const colors = require("tailwindcss/colors");
33
/** @type {import('tailwindcss').Config} */
44
module.exports = {
55
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
6+
darkMode: "selector",
67
theme: {
78
extend: {
89
colors: {

0 commit comments

Comments
 (0)