diff --git a/src/pages/index.astro b/src/pages/index.astro
index 8b0a581..c7245a0 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -1,5 +1,43 @@
---
import Base from "../layouts/Base.astro";
+import { Code } from "astro:components";
+
+const quickStartCode = `import donglora as dl
+
+ser = dl.connect()
+dl.send(ser, "SetConfig", config=dl.DEFAULT_CONFIG)
+dl.send(ser, "StartRx")
+
+while pkt := dl.recv(ser):
+ print(f'{pkt["rssi"]:4d}dBm {pkt["snr"]:3d}dB {pkt["payload"].hex()}')`;
+
+// Shiki theme tuned to match the site's green-accent dark palette
+const siteTheme = {
+ name: "donglora",
+ type: "dark" as const,
+ colors: {
+ "editor.background": "#12121a",
+ "editor.foreground": "#e0e0e8",
+ },
+ settings: [
+ { scope: ["comment"], settings: { foreground: "#555570", fontStyle: "italic" } },
+ { scope: ["keyword", "storage", "keyword.control"], settings: { foreground: "#6ee7b7" } },
+ { scope: ["string", "string.quoted"], settings: { foreground: "#fbbf24" } },
+ { scope: ["constant.numeric", "constant.language"], settings: { foreground: "#c4b5fd" } },
+ { scope: ["entity.name.function", "meta.function-call"], settings: { foreground: "#60a5fa" } },
+ { scope: ["support.function", "support.function.builtin"], settings: { foreground: "#60a5fa" } },
+ { scope: ["variable", "variable.other"], settings: { foreground: "#e0e0e8" } },
+ { scope: ["variable.parameter", "variable.other.readwrite"], settings: { foreground: "#e0e0e8" } },
+ { scope: ["keyword.operator", "keyword.operator.assignment", "keyword.operator.comparison"], settings: { foreground: "#6ee7b7" } },
+ { scope: ["punctuation", "meta.brace"], settings: { foreground: "#8888a0" } },
+ { scope: ["punctuation.definition.string", "punctuation.section"], settings: { foreground: "#fbbf24" } },
+ { scope: ["entity.name.import", "entity.name.module"], settings: { foreground: "#34d399" } },
+ { scope: ["support.type", "entity.name.type"], settings: { foreground: "#60a5fa" } },
+ { scope: ["constant.other", "variable.other.constant"], settings: { foreground: "#c4b5fd" } },
+ { scope: ["meta.function-call.arguments", "variable.parameter.function-call"], settings: { foreground: "#e0e0e8" } },
+ { scope: ["meta.attribute", "entity.other.attribute-name"], settings: { foreground: "#8888a0" } },
+ ],
+};
---
Listen for packets
- +
+ {quickStartCode}
+ your code ──► client library ──► USB ──► firmware ──► LoRa radio + >your code ──► client lib ──► USB ──► DongLoRa radio -your code ──► client library ──┐ -your code ──► client library ──┼──► mux ──► USB ──► firmware ──► LoRa radio -your code ──► client library ──┘+your code ──► client lib ──┐ +your code ──► client lib ──┼──► mux ──► USB ──► DongLoRa radio +your code ──► client lib ──┘
Because the firmware is protocol-agnostic, a DongLoRa dongle works with any LoRa network — Meshtastic, MeshCore, custom protocols, or raw packets. diff --git a/src/styles/global.css b/src/styles/global.css index d82b092..56c49f6 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -48,4 +48,11 @@ background: var(--color-border-bright); border-radius: 3px; } + + /* Shiki code blocks — match site card background */ + .astro-code { + background-color: var(--color-bg-card) !important; + padding: 1rem; + font-size: 0.875rem; + } }