From 062fb7b207f108870dcd88e6b25dbdd33a617608 Mon Sep 17 00:00:00 2001 From: Kenneth Date: Tue, 18 Jun 2024 20:54:03 +0100 Subject: [PATCH 1/5] wip --- src/components/Buffer.astro | 5 + src/components/CommandLine.astro | 26 ++- src/components/LuaLine.astro | 9 + src/components/UgandaHelpText.astro | 259 ++++++++++++++++++++++++++++ src/pages/index.astro | 115 +++++------- tsconfig.json | 2 +- 6 files changed, 335 insertions(+), 81 deletions(-) create mode 100644 src/components/Buffer.astro create mode 100644 src/components/UgandaHelpText.astro diff --git a/src/components/Buffer.astro b/src/components/Buffer.astro new file mode 100644 index 0000000..8542700 --- /dev/null +++ b/src/components/Buffer.astro @@ -0,0 +1,5 @@ +--- +const { id } = Astro.props; +--- + +
diff --git a/src/components/CommandLine.astro b/src/components/CommandLine.astro index dbef499..e23e6e7 100644 --- a/src/components/CommandLine.astro +++ b/src/components/CommandLine.astro @@ -14,7 +14,12 @@ From bbd7e000c85196962ef4b243c7b1d8334e997b4f Mon Sep 17 00:00:00 2001 From: Kenneth Date: Mon, 15 Jul 2024 00:47:05 +0100 Subject: [PATCH 5/5] add some commands --- src/components/CommandLine.astro | 5 ++++- src/components/LuaLine.astro | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/CommandLine.astro b/src/components/CommandLine.astro index 9c95cd8..27603bc 100644 --- a/src/components/CommandLine.astro +++ b/src/components/CommandLine.astro @@ -3,7 +3,6 @@ aria-hidden="true" id="command-line-input" type="text" - size="1" class="bg-base focus:outline-none active:outline-none cursor-default caret-transparent m-0" /> @@ -21,6 +20,10 @@ const cmdEvent = new CustomEvent("closebuffer"); window.dispatchEvent(cmdEvent); }, + help: () => { + const cmdEvent = new CustomEvent("openhelp"); + window.dispatchEvent(cmdEvent); + }, "help iccf": () => { const cmdEvent = new CustomEvent("openiccf"); window.dispatchEvent(cmdEvent); diff --git a/src/components/LuaLine.astro b/src/components/LuaLine.astro index e8bbf8d..61793e3 100644 --- a/src/components/LuaLine.astro +++ b/src/components/LuaLine.astro @@ -49,4 +49,12 @@ import CommandLine from "./CommandLine.astro"; statusIndicator.classList.add("bg-blue"); statusIndicator.classList.remove("bg-peach"); }); + + window.addEventListener("openhelp", () => { + window.location.href = "https://vimhelp.org/"; + }); + + window.addEventListener("openiccf", () => { + window.location.href = "https://vimhelp.org/uganda.txt.html#iccf"; + });