first commit
This commit is contained in:
14
src/app.html
Normal file
14
src/app.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover" class="container py-5">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
1
src/lib/index.js
Normal file
1
src/lib/index.js
Normal file
@@ -0,0 +1 @@
|
||||
// place files you want to import through the `$lib` alias in this folder.
|
||||
45
src/routes/+page.svelte
Normal file
45
src/routes/+page.svelte
Normal file
@@ -0,0 +1,45 @@
|
||||
<script>
|
||||
let nombre = "";
|
||||
let apellido = "";
|
||||
const enviar = () => {
|
||||
alert(`${nombre} ${apellido}`);
|
||||
};
|
||||
</script>
|
||||
|
||||
<h1>Welcome to SvelteKit</h1>
|
||||
<p>
|
||||
Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation
|
||||
</p>
|
||||
<a href="/about">About</a>
|
||||
|
||||
<div class="input-group mb-3 mt-3">
|
||||
<span class="input-group-text" id="basic-addon1">Nombre:</span>
|
||||
<input
|
||||
bind:value={nombre}
|
||||
type="text"
|
||||
class="form-control"
|
||||
placeholder="Introduzca su nombre"
|
||||
aria-label="Nombre"
|
||||
aria-describedby="basic-addon1"
|
||||
/>
|
||||
</div>
|
||||
<div class="input-group mb-3 mt-3">
|
||||
<span class="input-group-text" id="basic-addon2">Apellido:</span>
|
||||
<input
|
||||
bind:value={apellido}
|
||||
type="text"
|
||||
class="form-control"
|
||||
placeholder="Introduzca su apellido"
|
||||
aria-label="Apellido"
|
||||
aria-describedby="basic-addon1"
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-3 mt-3">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-outline-danger"
|
||||
on:click={enviar}
|
||||
disabled={nombre.length < 3 || apellido.length < 3 ? true : false}
|
||||
>Enviar</button
|
||||
>
|
||||
</div>
|
||||
2
src/routes/about/+page.svelte
Normal file
2
src/routes/about/+page.svelte
Normal file
@@ -0,0 +1,2 @@
|
||||
<h1>About</h1>
|
||||
<a href="/">Home</a>
|
||||
Reference in New Issue
Block a user