File tree Expand file tree Collapse file tree 4 files changed +8
-52
lines changed Expand file tree Collapse file tree 4 files changed +8
-52
lines changed Original file line number Diff line number Diff line change 1
- * Looking for a shareable component template? Go here --> [ sveltejs/component-template] ( https://github.com/sveltejs/component-template ) *
2
-
3
- ---
4
-
5
- # svelte app
6
-
7
- This is a project template for [ Svelte] ( https://svelte.dev ) apps. It lives at https://github.com/sveltejs/template .
8
-
9
- To create a new project based on this template using [ degit] ( https://github.com/Rich-Harris/degit ) :
10
-
11
- ``` bash
12
- npx degit sveltejs/template svelte-app
13
- cd svelte-app
14
- ```
15
-
16
- * Note that you will need to have [ Node.js] ( https://nodejs.org ) installed.*
17
-
1
+ # SvelteBasic
18
2
19
3
## Get started
20
4
Original file line number Diff line number Diff line change 1
1
<script >
2
- export let name ;
2
+ export let value = ' World ' ;
3
3
</script >
4
4
5
- <main >
6
- <h1 >Hello {name }!</h1 >
7
- <p >Visit the <a href =" https://svelte.dev/tutorial" >Svelte tutorial</a > to learn how to build Svelte apps.</p >
8
- </main >
9
-
10
- <style >
11
- main {
12
- text-align : center ;
13
- padding : 1em ;
14
- max-width : 240px ;
15
- margin : 0 auto ;
16
- }
17
-
18
- h1 {
19
- color : #ff3e00 ;
20
- text-transform : uppercase ;
21
- font-size : 4em ;
22
- font-weight : 100 ;
23
- }
24
-
25
- @media (min-width : 640px ) {
26
- main {
27
- max-width : none ;
28
- }
29
- }
30
- </style >
5
+ <div >Hello {value }</div >
Original file line number Diff line number Diff line change 1
1
import App from './App.svelte' ;
2
2
3
3
const app = new App ( {
4
- target : document . body ,
5
- props : {
6
- name : 'world'
7
- }
4
+ target : document . body ,
8
5
} ) ;
9
6
10
- export default app ;
7
+ export default app ;
You can’t perform that action at this time.
0 commit comments