Files
website/src/components/LuaLine.astro

67 lines
2.0 KiB
Plaintext
Raw Normal View History

2024-05-15 00:51:50 +01:00
---
import Link from "./Link.astro";
import CommandLine from "./CommandLine.astro";
---
2024-07-15 00:39:54 +01:00
<div class="hidden sm:block absolute w-full bottom-0">
2024-05-15 00:51:50 +01:00
<footer class="w-full bg-crust flex flex-row leading-tight">
<span
id="status-indicator"
2024-07-15 00:39:54 +01:00
class="bg-blue font-bold text-base inline-block leading-tight"
2024-05-15 00:51:50 +01:00
>&nbsp;NORMAL&nbsp;</span
>
2024-07-15 00:39:54 +01:00
<div id="project-list" class="flex flex-row bg-surface0">
2024-06-18 20:54:03 +01:00
<span>&nbsp;</span>
<Link href="https://polygui.org">poly gui</Link>
<span>&nbsp;</span>
2024-07-15 00:39:54 +01:00
<Link href="https://polygui.org/nanopack/introduction/">nanopack</Link>
2024-06-18 20:54:03 +01:00
<span>&nbsp;</span>
2024-07-15 00:39:54 +01:00
<Link href="https://github.com/kennethnym/mai">mai</Link>
2024-06-18 20:54:03 +01:00
<span>&nbsp;</span>
</div>
2024-07-15 00:39:54 +01:00
<div id="contact-list" class="flex flex-row ml-auto bg-surface0">
2024-05-15 00:51:50 +01:00
<span>&nbsp;</span>
<Link href="https://github.com/kennethnym">github</Link>
<span>&nbsp;</span>
<Link href="https://x.com/kennethnym">x.com</Link>
<span>&nbsp;</span>
<Link href="mailto:kennethnym@outlook.com">email</Link>
<span>&nbsp;</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 = "&nbsp;COMMAND&nbsp;";
statusIndicator.classList.remove("bg-blue");
statusIndicator.classList.add("bg-peach");
});
cmdLine.addEventListener("cmdmodedisabled", () => {
statusIndicator.innerHTML = "&nbsp;NORMAL&nbsp;";
statusIndicator.classList.add("bg-blue");
statusIndicator.classList.remove("bg-peach");
});
2024-07-15 00:47:05 +01:00
window.addEventListener("openhelp", () => {
window.location.href = "https://vimhelp.org/";
});
window.addEventListener("openiccf", () => {
window.location.href = "https://vimhelp.org/uganda.txt.html#iccf";
});
2024-07-15 01:03:20 +01:00
window.addEventListener("savebuffer", () => {
2024-07-15 01:05:56 +01:00
if ((window as any).showSaveFilePicker) {
(window as any).showSaveFilePicker();
2024-07-15 01:03:20 +01:00
}
});
2024-05-15 00:51:50 +01:00
</script>