WIP: vim emulation
This commit is contained in:
44
src/components/LuaLine.astro
Normal file
44
src/components/LuaLine.astro
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
import Link from "./Link.astro";
|
||||
import CommandLine from "./CommandLine.astro";
|
||||
---
|
||||
|
||||
<div class="absolute w-full bottom-0">
|
||||
<footer class="w-full bg-crust flex flex-row leading-tight">
|
||||
<span
|
||||
id="status-indicator"
|
||||
class="bg-blue text-base inline-block leading-tight"
|
||||
> NORMAL </span
|
||||
>
|
||||
<div class="flex flex-row bg-surface0">
|
||||
<span> </span>
|
||||
<Link href="https://github.com/kennethnym">github</Link>
|
||||
<span> </span>
|
||||
<Link href="https://x.com/kennethnym">x.com</Link>
|
||||
<span> </span>
|
||||
<Link href="mailto:kennethnym@outlook.com">email</Link>
|
||||
<span> </span>
|
||||
</div>
|
||||
</footer>
|
||||
<CommandLine />
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const statusIndicator = document.getElementById(
|
||||
"status-indicator",
|
||||
) as HTMLSpanElement;
|
||||
const cmdLine = document.getElementById("command-line") as HTMLDivElement;
|
||||
|
||||
cmdLine.addEventListener("cmdmodeenabled", () => {
|
||||
statusIndicator.innerHTML = " COMMAND ";
|
||||
statusIndicator.classList.remove("bg-blue");
|
||||
statusIndicator.classList.add("bg-peach");
|
||||
console.log("cmd mode!");
|
||||
});
|
||||
|
||||
cmdLine.addEventListener("cmdmodedisabled", () => {
|
||||
statusIndicator.innerHTML = " NORMAL ";
|
||||
statusIndicator.classList.add("bg-blue");
|
||||
statusIndicator.classList.remove("bg-peach");
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user