42 lines
634 B
Svelte
42 lines
634 B
Svelte
|
<script lang="ts">
|
||
|
export let swaf = {};
|
||
|
|
||
|
let count: number;
|
||
|
|
||
|
function handleClick(): void {
|
||
|
count++;
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss">
|
||
|
p:last-of-type {
|
||
|
color: blueviolet;
|
||
|
}
|
||
|
|
||
|
.style-test {
|
||
|
p {
|
||
|
color: blue;
|
||
|
}
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<h1>Hello {count}!</h1>
|
||
|
|
||
|
<button on:click={handleClick}>More hellos!!</button>
|
||
|
|
||
|
{#if swaf.route('auth') === '/'}
|
||
|
We're home!
|
||
|
{:else}
|
||
|
We're somewhere else... {swaf.route('auth')}
|
||
|
{/if}
|
||
|
|
||
|
<p>The route to auth is {swaf.route('auth')}</p>
|
||
|
|
||
|
<p>\$$.notcode</p>
|
||
|
|
||
|
<p>{`{\\$$.escaped}`}</p>
|
||
|
|
||
|
<div class="style-test">
|
||
|
<p>Blue!</p>
|
||
|
</div>
|