Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken indentation and make lang attribute consistent in svelte-typescript template #3374

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
146 changes: 76 additions & 70 deletions create-snowpack-app/app-template-svelte-typescript/src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,70 +1,76 @@
<script lang='typescript'>
import {onMount} from 'svelte';
let count: number = 0;
onMount(() => {
const interval = setInterval(() => count++, 1000);
return () => {
clearInterval(interval);
};
});
</script>

<style>
:global(body) {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.App {
text-align: center;
}
.App code {
background: #0002;
padding: 4px 8px;
border-radius: 4px;
}
.App p {
margin: 0.4rem;
}

.App-header {
background-color: #f9f6f6;
color: #333;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
}
.App-link {
color: #ff3e00;
}
.App-logo {
height: 36vmin;
pointer-events: none;
margin-bottom: 3rem;
animation: App-logo-spin infinite 1.6s ease-in-out alternate;
}
@keyframes App-logo-spin {
from {
transform: scale(1);
}
to {
transform: scale(1.06);
}
}
</style>

<div class="App">
<header class="App-header">
<img src="/logo.svg" class="App-logo" alt="logo" />
<p>Edit <code>src/App.svelte</code> and save to reload.</p>
<p>Page has been open for <code>{count}</code> seconds.</p>
<p>
<a class="App-link" href="https://svelte.dev" target="_blank" rel="noopener noreferrer">
Learn Svelte
</a>
</p>
</header>
</div>

<script lang="ts">
import {onMount} from 'svelte'

let count: number = 0
onMount(() => {
const interval = setInterval(() => count++, 1000)
return () => {
clearInterval(interval)
}
})
</script>

<style>
:global(body) {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}

.App {
text-align: center;
}

.App code {
background: #0002;
padding: 4px 8px;
border-radius: 4px;
}

.App p {
margin: 0.4rem;
}

.App-header {
background-color: #f9f6f6;
color: #333;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
}

.App-link {
color: #ff3e00;
}

.App-logo {
height: 36vmin;
pointer-events: none;
margin-bottom: 3rem;
animation: App-logo-spin infinite 1.6s ease-in-out alternate;
}

@keyframes App-logo-spin {
from {
transform: scale(1);
}
to {
transform: scale(1.06);
}
}
</style>

<div class="App">
<header class="App-header">
<img src="/logo.svg" class="App-logo" alt="logo"/>
<p>Edit <code>src/App.svelte</code> and save to reload.</p>
<p>Page has been open for <code>{count}</code> seconds.</p>
<p>
<a class="App-link" href="https://svelte.dev" target="_blank" rel="noopener noreferrer">
Learn Svelte
</a>
</p>
</header>
</div>