Skip to content

Instantly share code, notes, and snippets.

@danbulant
Created September 4, 2020 19:25
Show Gist options
  • Save danbulant/07f57a1ffca1323c982fa99c58961a26 to your computer and use it in GitHub Desktop.
Save danbulant/07f57a1ffca1323c982fa99c58961a26 to your computer and use it in GitHub Desktop.
Svelte basics - Basic svelte template
<script>
export let name;
</script>
<main>
<h1>Hello {name}!</h1>
<p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
</main>
<style>
main {
text-align: center;
padding: 1em;
max-width: 240px;
margin: 0 auto;
}
h1 {
color: #ff3e00;
text-transform: uppercase;
font-size: 4em;
font-weight: 100;
}
@media (min-width: 640px) {
main {
max-width: none;
}
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment