diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro index 2693bd0..ba6de42 100644 --- a/website/src/pages/index.astro +++ b/website/src/pages/index.astro @@ -2,7 +2,6 @@ import Layout from "@/layouts/main.astro" import { Button } from "@/components/ui/button" import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/ui/card" -import { Star } from "lucide-react" const workflows = [ { command: "/deepresearch", description: "Multi-agent investigation across papers, web, and code" }, @@ -68,7 +67,6 @@ const installCommands = [ : "border-border bg-background text-muted-foreground hover:text-foreground", ]} data-command={entry.command} - data-label={entry.label} aria-label={`Show ${entry.label} install command`} > {entry.label} @@ -82,12 +80,9 @@ const installCommands = [ data-command={installCommands[0].command} aria-label="Copy install command" > -
- {installCommands[0].label} - {installCommands[0].command} -
- Copy - + {installCommands[0].command} + +
@@ -96,10 +91,6 @@ const installCommands = [ GitHub -
@@ -230,7 +221,6 @@ const installCommands = [ var toggles = Array.from(document.querySelectorAll(".install-toggle")) var commandBtn = document.getElementById("install-cmd") var commandText = document.getElementById("install-command") - var commandLabel = document.getElementById("install-label") var copyLabel = document.getElementById("install-copy") var checkLabel = document.getElementById("install-check") @@ -239,11 +229,9 @@ const installCommands = [ toggle._toggleBound = true toggle.addEventListener("click", function () { var command = toggle.getAttribute("data-command") - var label = toggle.getAttribute("data-label") - if (!commandBtn || !commandText || !commandLabel || !command || !label) return + if (!commandBtn || !commandText || !command) return commandBtn.setAttribute("data-command", command) commandText.textContent = command - commandLabel.textContent = label toggles.forEach(function (item) { item.classList.remove("border-foreground", "bg-foreground", "text-background") item.classList.add("border-border", "bg-background", "text-muted-foreground") @@ -272,21 +260,4 @@ const installCommands = [ } initCopyBtn() document.addEventListener("astro:after-swap", initCopyBtn) - - function fetchStars() { - var el = document.getElementById("star-count") - if (!el) return - fetch("https://api.github.com/repos/getcompanion-ai/feynman") - .then(function(r) { return r.json() }) - .then(function(d) { - if (d.stargazers_count !== undefined) { - el.textContent = d.stargazers_count >= 1000 ? (d.stargazers_count / 1000).toFixed(1) + "k" : String(d.stargazers_count) - var badge = document.getElementById("star-badge") - if (badge) badge.classList.remove("hidden") - } - }) - .catch(function() {}) - } - fetchStars() - document.addEventListener("astro:after-swap", fetchStars)