tailwind chooseworld

This commit is contained in:
Cat /dev/Nulo 2023-08-28 10:51:20 -03:00
parent 964bd059c3
commit b86139622c
2 changed files with 18 additions and 17 deletions

View file

@ -6,11 +6,14 @@
/** @type {import("../lib/doc").WorldIdentifier} */ /** @type {import("../lib/doc").WorldIdentifier} */
export let world; export let world;
/** @type {string} */
export let className = "";
$: title = titleStore(getWorldY(world).ydoc, "page/index"); $: title = titleStore(getWorldY(world).ydoc, "page/index");
</script> </script>
<a <a
class={className}
href={inject(routes.Page, { href={inject(routes.Page, {
worldId: world.room, worldId: world.room,
pageId: "index", pageId: "index",

View file

@ -6,28 +6,26 @@
const worldsPromise = loadWorlds(); const worldsPromise = loadWorlds();
</script> </script>
<h1>Buen día.</h1> <header class="my-4 mx-8">
<h3>Elegí un mundo.</h3> <h1 class="font-bold text-3xl">Buen día.</h1>
<h3>Elegí un mundo.</h3>
</header>
{#await worldsPromise then worlds} {#await worldsPromise then worlds}
<ul> <ul class="m-4">
{#each worlds as world} {#each worlds as world}
<li> <li>
<WorldLink {world} /> <WorldLink
className="px-6 py-4 bg-slate-200 w-full block rounded-2xl my-4 shadow text-xl"
{world}
/>
</li> </li>
{/each} {/each}
<li><a href={routes.CreateWorld}>Crear mundo</a></li> <li>
<a
class="px-6 py-4 bg-slate-200 w-full block rounded-2xl my-4 shadow text-xl"
href={routes.CreateWorld}>Crear mundo</a
>
</li>
</ul> </ul>
{/await} {/await}
<style>
ul :global(a) {
background: ButtonFace;
color: ButtonText;
display: block;
padding: 1em;
margin: 0.5em;
border-radius: 15px;
}
</style>