36 lines
593 B
Svelte
36 lines
593 B
Svelte
<script>
|
|
export let open=true
|
|
export let name;
|
|
</script>
|
|
|
|
<aside class="abolute w-full h-full p-4" class:open class:hidden={!open}>
|
|
<h1>Hello {name}!</h1>
|
|
<p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
|
|
</aside>
|
|
|
|
<style>
|
|
aside {
|
|
left: -100%;
|
|
transition: right 0.3s ease-in-out;
|
|
|
|
text-align: center;
|
|
padding: 1em;
|
|
max-width: 480px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.open {
|
|
left: 0;
|
|
}
|
|
|
|
.hidden {
|
|
visibility: hidden;
|
|
}
|
|
|
|
h1 {
|
|
color: #ff3e00;
|
|
text-transform: uppercase;
|
|
font-size: 4em;
|
|
font-weight: 100;
|
|
}
|
|
</style> |