Skip to content

Commit

Permalink
update svelte template to match react, preact
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Oct 6, 2020
1 parent ecd6465 commit 3ab3842
Show file tree
Hide file tree
Showing 4 changed files with 225 additions and 134 deletions.
2 changes: 1 addition & 1 deletion create-snowpack-app/app-template-preact/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

.App-logo {
height: 40vmin;
height: 36vmin;
pointer-events: none;
margin-bottom: 3rem;
animation: App-logo-spin infinite 1.6s ease-in-out alternate;
Expand Down
107 changes: 57 additions & 50 deletions create-snowpack-app/app-template-svelte-typescript/src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,57 +1,64 @@
<script lang="ts">
let message:string = 'Learn Svelte with Typescript';
<script>
$: count = 0;
setInterval(() => count++, 1000);
const message: string = 'Learn Svelte';
</script>

<style>
:global(body) {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.App {
text-align: center;
}
.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: 40vmin;
pointer-events: none;
margin-bottom: 1.0rem;
animation: App-logo-spin infinite 1.6s ease-in-out alternate;
}
@keyframes App-logo-spin {
from {
transform: scale(1);
}
to {
transform: scale(1.06);
}
}
: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>
<a
class="App-link"
href="https://svelte.dev"
target="_blank"
rel="noopener noreferrer"
>
{message}
</a>
</header>
<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">
{message}
</a>
</p>
</header>
</div>
105 changes: 56 additions & 49 deletions create-snowpack-app/app-template-svelte/src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,57 +1,64 @@
<script>
const message = 'Learn Svelte';
$: count = 0;
setInterval(() => count++, 1000);
const message = 'Learn Svelte';
</script>

<style>
:global(body) {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.App {
text-align: center;
}
.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: 40vmin;
pointer-events: none;
margin-bottom: 1.0rem;
animation: App-logo-spin infinite 1.6s ease-in-out alternate;
}
@keyframes App-logo-spin {
from {
transform: scale(1);
}
to {
transform: scale(1.06);
}
}
: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>
<a
class="App-link"
href="https://svelte.dev"
target="_blank"
rel="noopener noreferrer"
>
{message}
</a>
</header>
<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">
{message}
</a>
</p>
</header>
</div>
Loading

0 comments on commit 3ab3842

Please sign in to comment.