2021-05-09 15:07:23 +00:00
|
|
|
<script>
|
|
|
|
import { Router, Link, Route } from "svelte-routing";
|
2021-05-10 15:47:35 +00:00
|
|
|
|
|
|
|
import Navbar from "./Navbar.svelte";
|
|
|
|
|
2021-05-09 15:07:23 +00:00
|
|
|
import Home from "./routes/Home.svelte";
|
|
|
|
import Posts from "./routes/Posts.svelte";
|
|
|
|
import Post from "./routes/Post.svelte";
|
|
|
|
import Login from "./routes/Login.svelte";
|
|
|
|
import Logout from "./routes/Logout.svelte";
|
|
|
|
import Tag from "./routes/Tag.svelte";
|
2021-05-10 17:37:27 +00:00
|
|
|
import Upload from "./routes/Upload.svelte";
|
2021-05-09 15:07:23 +00:00
|
|
|
|
|
|
|
export let url = "";
|
|
|
|
let baseURL = window.BASE_URL;
|
|
|
|
</script>
|
|
|
|
|
2021-05-10 15:47:35 +00:00
|
|
|
<Router {url}>
|
|
|
|
<Navbar />
|
|
|
|
<div>
|
|
|
|
<Route path="/" component={Home} />
|
|
|
|
<Route path="/posts" component={Posts} />
|
|
|
|
<Route path="/tag/:id" component={Tag} />
|
|
|
|
<Route path="/post/:id" component={Post} />
|
|
|
|
<Route path="/auth/login" component={Login} />
|
|
|
|
<Route path="/auth/logout" component={Logout} />
|
2021-05-10 17:37:27 +00:00
|
|
|
<Route path="/upload" component={Upload} />
|
2021-05-10 15:47:35 +00:00
|
|
|
</div>
|
|
|
|
</Router>
|
2021-05-10 17:37:27 +00:00
|
|
|
|
|
|
|
<style global lang="scss">
|
|
|
|
@import "./main.scss";
|
|
|
|
|
|
|
|
#tags .svelte-tags-input-tag {
|
|
|
|
background: $primary;
|
|
|
|
color: $text-invert;
|
|
|
|
}
|
|
|
|
|
|
|
|
#tags .svelte-tags-input-layout {
|
|
|
|
@extend .input;
|
|
|
|
height: inherit;
|
|
|
|
|
|
|
|
& .svelte-tags-input {
|
|
|
|
margin-top: 0 !important;
|
|
|
|
font-size: 13.3333px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|