Fix: fix back-button on the 404-page, remove some obsolete classes

This commit is contained in:
Pieter Vander Vennet 2023-06-29 01:10:55 +02:00
parent fa650cc8d2
commit 006f69561a
18 changed files with 89 additions and 84 deletions

View file

@ -1,25 +0,0 @@
import BaseUIElement from "../BaseUIElement"
import Combine from "./Combine"
import BackToIndex from "../BigComponents/BackToIndex"
export default class LeftIndex extends Combine {
constructor(
leftContents: BaseUIElement[],
mainContent: BaseUIElement,
options?: {
hideBackButton: false | boolean
}
) {
let back: BaseUIElement = undefined
if (options?.hideBackButton ?? true) {
back = new BackToIndex()
}
super([
new Combine([new Combine([back, ...leftContents]).SetClass("sticky top-4")]).SetClass(
"ml-4 block w-full md:w-2/6 lg:w-1/6"
),
mainContent.SetClass("m-8 w-full mb-24"),
])
this.SetClass("h-full block md:flex")
}
}

View file

@ -1,16 +0,0 @@
import { SubtleButton } from "../Base/SubtleButton"
import Svg from "../../Svg"
import Translations from "../i18n/Translations"
import BaseUIElement from "../BaseUIElement"
export default class BackToIndex extends SubtleButton {
constructor(message?: string | BaseUIElement) {
super(
Svg.back_svg().SetStyle("height: 1.5rem;"),
message ?? Translations.t.general.backToMapcomplete,
{
url: "index.html",
}
)
}
}

14
UI/NotFound.svelte Normal file
View file

@ -0,0 +1,14 @@
<script>
import Tr from "./Base/Tr.svelte";
import Translations from "./i18n/Translations.ts";
import BackButton from "./Base/BackButton.svelte";
console.log("???")
</script>
<div class="flex flex-col">
<Tr t={Translations.t.general["404"]}></Tr>
<BackButton clss="m-8" on:click={() => {window.location = "index.html"}}>
<div class="flex w-full justify-center">
<Tr t={Translations.t.general.backToIndex}></Tr>
</div>
</BackButton>
</div>