diff --git a/src/components/QuickStartFilter.js b/src/components/QuickStartFilter.js index 9ff4723c1..544e8b31f 100644 --- a/src/components/QuickStartFilter.js +++ b/src/components/QuickStartFilter.js @@ -4,7 +4,7 @@ import Link from "@docusaurus/Link"; import {FaGolang} from "react-icons/fa6"; import {FaJava} from "react-icons/fa"; import {FaLaptopCode} from "react-icons/fa"; -import {FaRust} from "react-icons/fa"; +// import {FaRust} from "react-icons/fa"; import {TbBrandCSharp} from "react-icons/tb"; import {FaPython} from "react-icons/fa"; import {FaDocker} from "react-icons/fa"; @@ -23,7 +23,7 @@ const IconWrapper = ({icon, bg}) => ( borderRadius: "50%", backgroundColor: bg, boxShadow: "0 3px 6px rgba(0,0,0,0.1)", - transition: "transform 0.2s ease", + transition: "all 0.2s ease", }} className="icon-wrapper" > @@ -35,7 +35,6 @@ export default function QuickstartFilter({defaultLanguage = null}) { const {colorMode} = useColorMode(); const isDark = colorMode === "dark"; - // 👇 initialize with defaultLanguage if provided const [language, setLanguage] = useState(defaultLanguage); const [server, setServer] = useState(null); @@ -46,7 +45,6 @@ export default function QuickstartFilter({defaultLanguage = null}) { ); }); - // Icon backgrounds for dark mode const darkIconBgs = { Go: "#223044", Python: "#243447", @@ -59,54 +57,19 @@ export default function QuickstartFilter({defaultLanguage = null}) { }; const languages = [ - { - name: "Go", - icon: , - bg: "#E0F7FA", - }, - { - name: "Python", - icon: , - bg: "#E8F0FE", - }, - { - name: "Java", - icon: , - bg: "#FDEDED", - }, - { - name: "JS/TS", - icon: , - bg: "#FFF8E1", - }, - - /*{ - name: "Rust", - icon: , - bg: "#FFF3E0", - }, - */ - { - name: "C#", - icon: , - bg: "#EDE7F6", - }, + { name: "Go", icon: , bg: "#E0F7FA" }, + { name: "Python", icon: , bg: "#E8F0FE" }, + { name: "Java", icon: , bg: "#FDEDED" }, + { name: "JS/TS", icon: , bg: "#FFF8E1" }, + { name: "C#", icon: , bg: "#EDE7F6" }, ]; const servers = [ - { - name: "Local", - icon: , - bg: "#FFF3E0", - }, - { - name: "Docker", - icon: , - bg: "#E3F2FD", - }, + { name: "Local", icon: , bg: "#FFF3E0" }, + { name: "Docker", icon: , bg: "#E3F2FD" }, ]; - // ----- Styles ----- + // ----- Base Styles (Desktop) ----- const headingStyle = { textAlign: "left", marginLeft: "1rem", @@ -115,7 +78,7 @@ export default function QuickstartFilter({defaultLanguage = null}) { color: isDark ? "#fff" : "#222", }; - const serverContainer = { + const containerStyle = { display: "flex", flexWrap: "wrap", gap: "1.5rem", @@ -124,15 +87,6 @@ export default function QuickstartFilter({defaultLanguage = null}) { marginLeft: "1rem", }; - const stepContainer = { - display: "flex", - flexWrap: "wrap", - gap: "1.5rem", - marginLeft: "1rem", - justifyContent: "flex-start", - marginTop: "1.5rem", - }; - const buttonCard = { border: isDark ? "2px solid #333" : "2px solid #ddd", borderRadius: "12px", @@ -178,90 +132,117 @@ export default function QuickstartFilter({defaultLanguage = null}) { textDecoration: "none", }; - // ----- Render ----- return (
+ {/* CSS Media Queries: + 1. Hide label text on mobile. + 2. Remove button border/background/shadow on mobile. + 3. Add visual indicator to the icon-wrapper when selected on mobile. + */} + + {/* Language Selection */}

Choose your language

-
- {languages.map((lang) => ( - - ))} + +

+ {lang.name} +

+ + ); + })}
{/* Server Selection */}

Where do you want to run the app server?

-
- {servers.map((srv) => ( - - ))} + +

+ {srv.name} +

+ + ); + })}
- {/* Quickstarts */} + {/* Quickstarts Grid */} {language && server && ( <>

@@ -303,4 +284,4 @@ export default function QuickstartFilter({defaultLanguage = null}) { )}

); -} +} \ No newline at end of file