Toggle navigation
Toggle navigation
This project
Loading...
Sign in
오윤석
/
maplespec.ga
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
4
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
오윤석
2020-05-29 23:46:23 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a9fae0f91db2fd678fe763895750b99f25a1a503
a9fae0f9
1 parent
1fd07183
svelte spa router 추가
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
27 deletions
app/web/package.json
app/web/src/App.svelte
app/web/src/routes.js
app/web/src/routes/Home.svelte
app/web/package.json
View file @
a9fae0f
...
...
@@ -18,5 +18,6 @@
"dependencies"
:
{
"rollup-plugin-copy"
:
"^3.3.0"
,
"sirv-cli"
:
"^0.4.4"
,
"svelte-spa-router"
:
"^2.1.0"
}
}
...
...
app/web/src/App.svelte
View file @
a9fae0f
<script>
export let name;
import Router from 'svelte-spa-router';
import routes from './routes';
</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>
\ No newline at end of file
<Router {routes} />
\ No newline at end of file
...
...
app/web/src/routes.js
0 → 100644
View file @
a9fae0f
import
Home
from
'./routes/Home.svelte'
;
const
routes
=
{
'/'
:
Home
,
};
export
default
routes
;
\ No newline at end of file
app/web/src/routes/Home.svelte
0 → 100644
View file @
a9fae0f
<main>
<h1>Hello, This is Home!</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>
\ No newline at end of file
Please
register
or
login
to post a comment