afina los types

pull/11/head
Borja Robert 2 years ago
parent 0981f7f093
commit 3e3bd8bb0e

@ -10,12 +10,12 @@
/> />
</svelte:head> </svelte:head>
<main> <main>
<p>Elige la plantilla que quieras usar para tu diseño</p> <p>Elige plantilla</p>
<div class="main"> <div class="main">
<ul> <ul>
{#each templates as template} {#each templates as template}
<li> <li>
<a href="/{template.name}" <a href="/{template.name}" data-sveltekit-prefetch
><img src="/{template.image}" alt="Plantilla en blanco estilo {template.name}" /> ><img src="/{template.image}" alt="Plantilla en blanco estilo {template.name}" />
<div class="caption">{template.name}</div></a <div class="caption">{template.name}</div></a
> >
@ -39,6 +39,7 @@
} }
p { p {
font-size: 1.5rem; font-size: 1.5rem;
color: #333;
} }
ul { ul {
list-style: none; list-style: none;
@ -46,9 +47,11 @@
li { li {
line-height: 2rem; line-height: 2rem;
display: inline-block; display: inline-block;
padding: 0.5rem; padding: 0.25rem;
background-color: rgb(80, 80, 80); background-color: rebeccapurple;
box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.7);
margin: 0 0.5rem; margin: 0 0.5rem;
border-radius: 0.5rem;
} }
a { a {
text-transform: capitalize; text-transform: capitalize;
@ -56,10 +59,11 @@
color: white; color: white;
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
font-weight: 700; font-weight: 400;
font-size: 1.2rem; font-size: 1.4rem;
} }
img { img {
max-height: 200px; max-height: 200px;
border-radius: 0.25rem 0.25rem 0 0;
} }
</style> </style>

@ -1,6 +1,6 @@
<script> <script>
import { templates } from '$lib/templates/templates';
/** /**
* Un objeto con los datos que llegan de la funcion load de +page.js
* @typedef {{ * @typedef {{
* slug: string; * slug: string;
* templateIndex: number; * templateIndex: number;
@ -10,10 +10,10 @@
*/ */
/** @type LoadFunctionData */ export let data; /** @type LoadFunctionData */ export let data;
import Form from '$lib/form/Form.svelte'; import Form from '$lib/form/Form.svelte';
import Preview from '$lib/preview/Preview.svelte'; import Preview from '$lib/preview/Preview.svelte';
const slug = data.slug;
const templateIndex = data.templateIndex; const templateIndex = data.templateIndex;
const templateImage = data.templateImage; const templateImage = data.templateImage;
</script> </script>

Loading…
Cancel
Save