diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2021-03-13 15:28:29 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2021-03-13 15:28:29 +0100 |
| commit | c1bc5993a694f6fd047a3881351827058042483b (patch) | |
| tree | 3d64130e1e6a2f86f70981df28cf22cd535bf2b2 /src/pages | |
| parent | bd8e98d7e24c4dbaee7db6ec7955f7c2f6d396a6 (diff) | |
Use routify and GraphQL server
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/_fallback.svelte | 5 | ||||
| -rw-r--r-- | src/pages/_layout.svelte | 37 | ||||
| -rw-r--r-- | src/pages/a/[id].svelte | 5 | ||||
| -rw-r--r-- | src/pages/f/[id].svelte | 6 | ||||
| -rw-r--r-- | src/pages/g/[id].svelte | 6 | ||||
| -rw-r--r-- | src/pages/index.svelte | 6 | ||||
| -rw-r--r-- | src/pages/p/[id].svelte | 5 | ||||
| -rw-r--r-- | src/pages/t/[id].svelte | 5 |
8 files changed, 75 insertions, 0 deletions
diff --git a/src/pages/_fallback.svelte b/src/pages/_fallback.svelte new file mode 100644 index 0000000..df7da3c --- /dev/null +++ b/src/pages/_fallback.svelte @@ -0,0 +1,5 @@ +<script> + import InvalidRoute from '$components/invalid_route/invalid_route.svelte'; +</script> + +<InvalidRoute /> diff --git a/src/pages/_layout.svelte b/src/pages/_layout.svelte new file mode 100644 index 0000000..80cc29e --- /dev/null +++ b/src/pages/_layout.svelte @@ -0,0 +1,37 @@ +<script> + import '$config/i18n'; + import { isLoading } from 'svelte-i18n'; + import ForumList from '$components/forum_list/forum_list.svelte'; + import Header from '$components/header/header.svelte'; + import Footer from '$components/footer/footer.svelte'; +</script> + +{#if $isLoading} + <h1>Loading.</h1> + <p>Please wait.</p> +{:else} + <Header /> + <main> + <slot></slot> + </main> + <ForumList /> + <Footer /> +{/if} + +<style> + main { + grid-column: col-start 2 / span 11; + } + + :global(#forum) { + display: grid; + font-family : 'ヒラギノ明朝 ProN' , 'Hiragino Mincho ProN' , '游明朝','游明朝体',YuMincho,'Yu Mincho' , 'MS 明朝' , 'MS Mincho' , HiraMinProN-W3 , 'TakaoEx明朝' , TakaoExMincho , 'MotoyaLCedar' , 'Droid Sans Japanese' , serif; + grid-template-columns: repeat(12, [col-start] 1fr); + grid-gap: 20px; + grid-auto-rows: minmax(24px, auto); + } + + :global(body) { + background-color: whitesmoke; + } +</style> diff --git a/src/pages/a/[id].svelte b/src/pages/a/[id].svelte new file mode 100644 index 0000000..9e6f184 --- /dev/null +++ b/src/pages/a/[id].svelte @@ -0,0 +1,5 @@ +<script> + import Author from '$components/author/author.svelte'; +</script> + +<Author/> diff --git a/src/pages/f/[id].svelte b/src/pages/f/[id].svelte new file mode 100644 index 0000000..0251694 --- /dev/null +++ b/src/pages/f/[id].svelte @@ -0,0 +1,6 @@ +<script> + import Forum from '$components/forum/forum.svelte'; + export let id; +</script> + +<Forum id={id}/> diff --git a/src/pages/g/[id].svelte b/src/pages/g/[id].svelte new file mode 100644 index 0000000..04fda92 --- /dev/null +++ b/src/pages/g/[id].svelte @@ -0,0 +1,6 @@ +<script> + export let id; +</script> + +<h1>Tag Index.</h1> +<p>This component lists topics for tag with id: {id}</p> diff --git a/src/pages/index.svelte b/src/pages/index.svelte new file mode 100644 index 0000000..7000137 --- /dev/null +++ b/src/pages/index.svelte @@ -0,0 +1,6 @@ +<script> + import { _ } from 'svelte-i18n'; +</script> + +<h1>{$_('home.title')}</h1> +<p>{$_('home.content')}</p> diff --git a/src/pages/p/[id].svelte b/src/pages/p/[id].svelte new file mode 100644 index 0000000..9caab6f --- /dev/null +++ b/src/pages/p/[id].svelte @@ -0,0 +1,5 @@ +<script> + import Post from '$components/post/post.svelte'; +</script> + +<Post/> diff --git a/src/pages/t/[id].svelte b/src/pages/t/[id].svelte new file mode 100644 index 0000000..3fd9560 --- /dev/null +++ b/src/pages/t/[id].svelte @@ -0,0 +1,5 @@ +<script> + import Topic from '$components/topic/topic.svelte'; +</script> + +<Topic/> |