Refine the main UI (add search button)

This commit is contained in:
Andrea Fazzi 2023-06-30 18:20:42 +02:00
parent 6d40444de0
commit 931ba4ec68
2 changed files with 212 additions and 190 deletions

View file

@ -1,111 +1,99 @@
<script lang='ts'> <script lang='ts'>
// The ordering of these imports is critical to your app working properly // The ordering of these imports is critical to your app working properly
import '@skeletonlabs/skeleton/themes/theme-skeleton.css'; import '@skeletonlabs/skeleton/themes/theme-skeleton.css';
// If you have source.organizeImports set to true in VSCode, then it will auto change this ordering // If you have source.organizeImports set to true in VSCode, then it will auto change this ordering
import '@skeletonlabs/skeleton/styles/skeleton.css'; import '@skeletonlabs/skeleton/styles/skeleton.css';
// Most of your app wide CSS should be put in this file // Most of your app wide CSS should be put in this file
import '../app.postcss'; import '../app.postcss';
import { AppShell, AppBar, AppRail, AppRailTile, AppRailAnchor } from '@skeletonlabs/skeleton'; import { AppShell, AppBar, AppRail, AppRailTile, AppRailAnchor } from '@skeletonlabs/skeleton';
let currentTile; let currentTile;
</script> </script>
<!-- App Shell --> <!-- App Shell -->
<AppShell> <AppShell>
<svelte:fragment slot="header"> <svelte:fragment slot="header">
<!-- App Bar --> <!-- App Bar -->
<AppBar> <AppBar>
<svelte:fragment slot="lead"> <svelte:fragment slot="lead">
<strong class="text-xl uppercase">Probo</strong> <strong class="text-xl uppercase">Probo</strong>
</svelte:fragment> </svelte:fragment>
<svelte:fragment slot="trail"> <svelte:fragment slot="trail">
<a <a
class="btn btn-sm variant-ghost-surface" class="btn btn-sm variant-ghost-surface"
href="https://discord.gg/EXqV7W8MtY" href="https://discord.gg/EXqV7W8MtY"
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
Discord <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
</a> <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" />
<a </svg>
class="btn btn-sm variant-ghost-surface"
href="https://twitter.com/SkeletonUI"
target="_blank"
rel="noreferrer"
>
Twitter
</a>
<a
class="btn btn-sm variant-ghost-surface"
href="https://github.com/skeletonlabs/skeleton"
target="_blank"
rel="noreferrer"
>
GitHub
</a>
</svelte:fragment>
</AppBar>
</svelte:fragment>
<svelte:fragment slot="sidebarLeft">
<AppRail>
<AppRailTile bind:group={currentTile} name="tile-1" value={0} title="tile-1"> <span>Search</span>
<svelte:fragment slot="lead"> </a>
<div class="flex justify-center"> </svelte:fragment>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> </AppBar>
<path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z" /> </svelte:fragment>
</svg> <svelte:fragment slot="sidebarLeft">
</div> <AppRail>
</svelte:fragment>
<span>Quizzes</span>
</AppRailTile>
<AppRailTile bind:group={currentTile} name="tile-2" value={1} title="tile-2"> <AppRailTile bind:group={currentTile} name="tile-1" value={0} title="tile-1">
<svelte:fragment slot="lead"> <svelte:fragment slot="lead">
<div class="flex justify-center"> <div class="flex justify-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" /> <path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z" />
</svg> </svg>
</div> </div>
</svelte:fragment> </svelte:fragment>
<span>Notes</span> <span>Quizzes</span>
</AppRailTile> </AppRailTile>
<AppRailTile bind:group={currentTile} name="groups" value={2} title="Groups"> <AppRailTile bind:group={currentTile} name="tile-2" value={1} title="tile-2">
<svelte:fragment slot="lead"> <svelte:fragment slot="lead">
<div class="flex justify-center"> <div class="flex justify-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z" /> <path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" />
</svg> </svg>
</div> </div>
</svelte:fragment> </svelte:fragment>
<span>Groups</span> <span>Notes</span>
</AppRailTile> </AppRailTile>
<AppRailTile bind:group={currentTile} name="groups" value={3} title="Settings"> <AppRailTile bind:group={currentTile} name="groups" value={2} title="Groups">
<svelte:fragment slot="lead"> <svelte:fragment slot="lead">
<div class="flex justify-center"> <div class="flex justify-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" /> <path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z" />
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /> </svg>
</svg> </div>
</div> </svelte:fragment>
</svelte:fragment> <span>Groups</span>
<span>Settings</span> </AppRailTile>
</AppRailTile>
<svelte:fragment slot="trail"> <AppRailTile bind:group={currentTile} name="groups" value={3} title="Settings">
<AppRailAnchor href="/" target="_blank" title="Exit"> <svelte:fragment slot="lead">
<div class="flex justify-center"> <div class="flex justify-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M5.636 5.636a9 9 0 1012.728 0M12 3v9" /> <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" />
</svg> <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</div> </svg>
</AppRailAnchor> </div>
</svelte:fragment> </svelte:fragment>
<span>Settings</span>
</AppRailTile>
</AppRail> <svelte:fragment slot="trail">
</svelte:fragment> <AppRailAnchor href="/" target="_blank" title="Exit">
<!-- Page Route Content --> <div class="flex justify-center">
<slot /> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M5.636 5.636a9 9 0 1012.728 0M12 3v9" />
</svg>
</div>
</AppRailAnchor>
</svelte:fragment>
</AppRail>
</svelte:fragment>
<!-- Page Route Content -->
<slot />
</AppShell> </AppShell>

View file

@ -1,97 +1,131 @@
<!-- YOU CAN DELETE EVERYTHING IN THIS PAGE --> <!-- YOU CAN DELETE EVERYTHING IN THIS PAGE -->
<div class="h-full flex flex-col"> <div class="h-full flex flex-col">
<div class="card p-4 m-4 font-heading-token">
<header class="p-3 flex justify-end"> <div class="card p-4 m-4 font-heading-token">
<span class="badge variant-filled"><h1 class="text-xs">1ad25d0000</h1></span> <header class="p-3 flex justify-end">
</header> <span class="badge variant-filled"><h1 class="text-xs">1ad25d0000</h1></span>
</header>
<hr class="opacity-50" />
<p class="p-4">
Per intensità di corrente elettrica si intende
</p>
<form id="question1">
<div class="space-y-2 p-4">
<label class="flex items-center space-x-2">
<input class="radio" type="radio" checked name="radio-direct" value="1" />
<p>La quantità di carica che scorre in un circuito per unità di tempo</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="2" />
<p>La differenza di potenziale elettrico</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="3" />
<p>La quantità di carica elettrica</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="3" />
<p>L'accelerazione a cui sono sottoposti gli elettroni all'interno del circuito</p>
</label>
</div>
</form>
<hr class="opacity-50" />
<footer class="p-3 flex justify-start items-center space-x-4">
<div class="flex-auto flex gap-1">
<span class="badge chip variant-filled-tertiary">#corrente</span>
<span class="badge chip variant-filled-tertiary">#quinte</span>
<span class="badge chip variant-filled-tertiary">#circuiti</span>
</div>
<div class="flex-auto flex justify-end">
<small>Created on {new Date().toLocaleDateString()}</small>
</div>
</footer>
</div>
<hr class="opacity-50" /> <div class="card p-4 m-4 font-heading-token">
<header class="p-3 flex justify-end">
<span class="badge variant-filled"><h1 class="text-xs">1ad25d0000</h1></span>
</header>
<hr class="opacity-50" />
<p class="p-4">
Affinché in un circuito possa circolare corrente continua, il generatore di tensione
</p>
<form id="question_2">
<div class="space-y-2 p-4">
<label class="flex items-center space-x-2">
<input class="radio" type="radio" checked name="radio-direct" value="1" />
<p>Fornisce una potenza pari a quella dissipata per effetto Joule</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="2" />
<p>Fornisce una potenza minore a quella dissipata per effetto Joule</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="3" />
<p>Rallenta le cariche elettriche</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="3" />
<p>Dev'essere spento</p>
</label>
</div>
</form>
<p class="p-4"> <hr class="opacity-50" />
Per intensità di corrente elettrica si intende
</p>
<form id="question1"> <footer class="p-3 flex justify-start items-center space-x-4">
<div class="space-y-2 p-4"> <div class="flex-auto flex gap-1">
<label class="flex items-center space-x-2"> <span class="badge chip variant-filled-tertiary">#corrente</span>
<input class="radio" type="radio" checked name="radio-direct" value="1" /> <span class="badge chip variant-filled-tertiary">#quinte</span>
<p>La quantità di carica che scorre in un circuito per unità di tempo</p> <span class="badge chip variant-filled-tertiary">#circuiti</span>
</label> </div>
<label class="flex items-center space-x-2"> <div class="flex-auto flex justify-end">
<input class="radio" type="radio" name="radio-direct" value="2" /> <small>Created on {new Date().toLocaleDateString()}</small>
<p>La differenza di potenziale elettrico</p> </div>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="3" />
<p>La quantità di carica elettrica</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="3" />
<p>L'accelerazione a cui sono sottoposti gli elettroni all'interno del circuito</p>
</label>
</div>
</form>
<hr class="opacity-50" />
<footer class="p-3 flex justify-start items-center space-x-4">
<div class="flex-auto flex gap-1">
<span class="badge chip variant-filled-tertiary">#foo</span>
<span class="badge variant-filled-tertiary">#bar</span>
<span class="badge variant-filled-tertiary">#biz</span>
</div>
<div class="flex-auto flex justify-end">
<small>Created on {new Date().toLocaleDateString()}</small>
</div>
</footer> </footer>
</div> </div>
<div class="card p-4 m-4 font-heading-token"> <div class="card p-4 m-4 font-heading-token">
<header class="p-3 flex justify-end"> <header class="p-3 flex justify-end">
<span class="badge variant-filled"><h1 class="text-xs">1ad25d0000</h1></span> <span class="badge variant-filled"><h1 class="text-xs">1ad25d0000</h1></span>
</header> </header>
<hr class="opacity-50" />
<p class="p-4">
Affinché in un circuito possa circolare corrente continua, il generatore di tensione
</p>
<form id="question_2">
<div class="space-y-2 p-4">
<label class="flex items-center space-x-2">
<input class="radio" type="radio" checked name="radio-direct" value="1" />
<p>Fornisce una potenza pari a quella dissipata per effetto Joule</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="2" />
<p>Fornisce una potenza minore a quella dissipata per effetto Joule</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="3" />
<p>Rallenta le cariche elettriche</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="3" />
<p>Dev'essere spento</p>
</label>
</div>
</form>
<footer class="p-3 flex justify-start items-center space-x-4">
<div class="flex-auto flex gap-1">
<span class="badge chip variant-filled-tertiary">#corrente</span>
<span class="badge chip variant-filled-tertiary">#quinte</span>
<span class="badge chip variant-filled-tertiary">#circuiti</span>
</div>
<div class="flex-auto flex justify-end">
<small>Created on {new Date().toLocaleDateString()}</small>
</div>
</footer>
</div>
<hr class="opacity-50" />
<p class="p-4">
Affinché in un circuito possa circolare corrente continua, il generatore di tensione
</p>
<form id="question_2">
<div class="space-y-2 p-4">
<label class="flex items-center space-x-2">
<input class="radio" type="radio" checked name="radio-direct" value="1" />
<p>Fornisce una potenza pari a quella dissipata per effetto Joule</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="2" />
<p>Fornisce una potenza minore a quella dissipata per effetto Joule</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="3" />
<p>Rallenta le cariche elettriche</p>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="radio-direct" value="3" />
<p>Dev'essere spento</p>
</label>
</div>
</form>
<hr class="opacity-50" />
<footer class="p-3 flex justify-start items-center space-x-4">
<div class="flex-auto flex gap-1">
<span class="badge variant-filled-tertiary">#foo</span>
<span class="badge variant-filled-tertiary">#bar</span>
<span class="badge variant-filled-tertiary">#biz</span>
</div>
<div class="flex-auto flex justify-end">
<small>Created on {new Date().toLocaleDateString()}</small>
</div>
</footer>
</div>
</div> </div>