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";
|
2021-05-10 17:37:27 +00:00
|
|
|
import Upload from "./routes/Upload.svelte";
|
2021-05-10 20:25:33 +00:00
|
|
|
import Edit from "./routes/Edit.svelte";
|
2021-05-10 20:34:59 +00:00
|
|
|
import Tags from "./routes/Tags.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="/post/:id" component={Post} />
|
2021-05-10 20:25:33 +00:00
|
|
|
<Route path="/post/edit/:id" component={Edit} />
|
2021-05-10 15:47:35 +00:00
|
|
|
<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 20:34:59 +00:00
|
|
|
<Route path="/tags" component={Tags} />
|
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>
|