From 546a9cd375383fba9ee2fb6050935ca247e770f6 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 6 Nov 2023 20:28:27 +0100 Subject: insert hyperlink to source --- frontend/ui.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'frontend/ui.ts') diff --git a/frontend/ui.ts b/frontend/ui.ts index f0146c5..eb0be63 100644 --- a/frontend/ui.ts +++ b/frontend/ui.ts @@ -1,3 +1,4 @@ +import { e } from "./helper.ts"; import { section_info_search, section_search } from "./search.ts"; import { section_engine_select, section_info_start, section_admin_btn } from "./start.ts"; import { section_submit } from "./submit.ts"; @@ -7,7 +8,7 @@ export function add_page_content(engine?: string) { for (const e of [...document.getElementsByTagName("section")]) e.remove() if (engine == "~submit") document.body.append(section_submit()) else if (engine) document.body.append(section_search(engine), section_info_search()) - else document.body.append(section_info_start(), section_engine_select(), section_admin_btn()) + else document.body.append(section_info_start(), section_engine_select(), footer(), section_admin_btn()) } let status_el: HTMLElement @@ -20,3 +21,10 @@ export function status(level: "error" | "info" | "success" | "warn", text: strin status_el.classList.value = "" status_el.classList.add("status", `level-${level}`) } + +export function footer() { + return e("footer", {}, + e("p", {}, "Fastbangs is free software (AGPL-3.0-only)! Find the source code on ", + e("a", { href: "https://codeberg.org/lialenck/fastbangs" }, "Codeberg"), ".") + ) +} -- cgit v1.2.3-70-g09d2