<script>
	import { templates } from '$lib/templates/templates';
</script>

<svelte:head>
	<title>Carteles DMD</title>
	<meta
		name="description"
		content="Aplicación para la generación automática de carteles de actividades de DMD"
	/>
</svelte:head>
<main>
	<p>Elige plantilla</p>
	<div class="main">
		<ul>
			{#each templates as template}
				<li>
					<a href="/{template.name}" data-sveltekit-prefetch
						><img src="/{template.image}" alt="Plantilla en blanco estilo {template.name}" />
						<div class="caption">{template.name}</div></a
					>
				</li>
			{/each}
		</ul>
	</div>
</main>

<style>
	main {
		max-width: 800px;
		margin: 0 auto;
	}
	.main {
		display: grid;
		grid-auto-columns: 1fr;
		grid-auto-rows: 1fr;
		grid-gap: 1rem;
		padding: 1rem 0;
	}
	p {
		font-size: 1.5rem;
		color: #333;
	}
	ul {
		list-style: none;
	}
	li {
		line-height: 2rem;
		display: inline-block;
		padding: 0.25rem;
		background-color: rebeccapurple;
		box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.7);
		margin: 0 0.5rem;
		border-radius: 0.5rem;
	}
	a {
		text-transform: capitalize;
		cursor: pointer;
		color: white;
		text-decoration: none;
		text-align: center;
		font-weight: 400;
		font-size: 1.4rem;
	}
	img {
		max-height: 200px;
		border-radius: 0.25rem 0.25rem 0 0;
	}
</style>
