added nav intigation with random name

This commit is contained in:
RezHackXYZ 2025-06-07 13:37:39 +05:30
parent 93417672ef
commit bd5257abc7
2 changed files with 6 additions and 36 deletions

View file

@ -55,6 +55,7 @@
import { Modal, Content, Trigger } from "sv-popup";
import { colseModal, ShowSeconds } from "./IdleScreen/logic/TimeAndTableData.svelte.js";
import EditTimetableDiv from "./IdleScreen/components/timetable/EditTimetable.svelte";
import {TabOpen} from "./randomname/+page.svelte";
</script>
<div class="mb-1 flex items-center justify-between rounded border-2">
@ -105,6 +106,10 @@
<button class="btn dull mini">Edit timetable </button>
</Trigger>
</Modal>
{:else if CurrentPage == "/randomname"}
<button class="btn dull mini" onclick={() => (TabOpen.v = true)}>
Edit list of names
</button>
{/if}
</div>
</div>

View file

@ -25,7 +25,7 @@
}
}
let TabOpen = $state({
export let TabOpen = $state({
v: false,
});
@ -53,41 +53,6 @@
</script>
<div id="wrap">
<div id="nav">
<a href="/" aria-label="Back to main menu"
><button aria-label="Back to main menu"
><span class="front"
><svg
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 -960 960 960"
width="24px"
fill="#FFFFFF"
><path
d="M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z"
/></svg
> GO BACK
</span></button
></a
>
<h1>Random student selector</h1>
<div>
<button aria-label="Back to main menu" onclick={() => (TabOpen.v = true)}
><span class="front"
><svg
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 -960 960 960"
width="24px"
fill="#FFFFFF"
><path
d="M400-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM80-160v-112q0-33 17-62t47-44q51-26 115-44t141-18h14q6 0 12 2-8 18-13.5 37.5T404-360h-4q-71 0-127.5 18T180-306q-9 5-14.5 14t-5.5 20v32h252q6 21 16 41.5t22 38.5H80Zm560 40-12-60q-12-5-22.5-10.5T584-204l-58 18-40-68 46-40q-2-14-2-26t2-26l-46-40 40-68 58 18q11-8 21.5-13.5T628-460l12-60h80l12 60q12 5 22.5 11t21.5 15l58-20 40 70-46 40q2 12 2 25t-2 25l46 40-40 68-58-18q-11 8-21.5 13.5T732-180l-12 60h-80Zm40-120q33 0 56.5-23.5T760-320q0-33-23.5-56.5T680-400q-33 0-56.5 23.5T600-320q0 33 23.5 56.5T680-240ZM400-560q33 0 56.5-23.5T480-640q0-33-23.5-56.5T400-720q-33 0-56.5 23.5T320-640q0 33 23.5 56.5T400-560Zm0-80Zm12 400Z"
/></svg
> Edit list of names
</span></button
>
</div>
</div>
<div id="root">
<Selector />
<div id="listWrap"><TopDisplay /></div>