Skip to content

Commit

Permalink
Fix base path
Browse files Browse the repository at this point in the history
  • Loading branch information
preiter93 committed Dec 7, 2024
1 parent 6a63d45 commit 283e502
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/buttons/CancelButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @typedef Props
* @property {string} margin
* @property {string} [margin]
* @property {function():void} onclick
*/
/** @type {Props} */
Expand Down
8 changes: 3 additions & 5 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { fade } from "svelte/transition";
import { onMount } from "svelte";
import { DarkIcon, LightIcon } from "$lib/components/icons";
import {base } from '$app/paths';
let { children } = $props();
Expand Down Expand Up @@ -31,12 +32,9 @@
});
const sections = [
{ name: '⏱ Timers', href: '/time-tracker/' },
{ name: '✔ Todos', href: '/time-tracker/todos' }
{ name: '⏱ Timers', href: `${base}/` },
{ name: '✔ Todos', href: `${base}/todos` }
];
const basePath = 'time-tracker';
$effect(() => console.log("base path" + basePath));
</script>
<div class="header">
Expand Down
3 changes: 1 addition & 2 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,7 @@
display: block;
}
.total-time {
font-size: 1em;
margin-right: 10px;
margin: 0 10px 0 0;
}
.fixed-width {
display: inline-block;
Expand Down
16 changes: 10 additions & 6 deletions src/routes/todos/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,12 @@
use:blurOnEscape
bind:value={item.content}
/>
<CancelButton
onclick={() => deleteTodo(item.id)}
margin="0 0 0 0"
/>
<CancelButton onclick={() => deleteTodo(item.id)} />
</div>
{/each}
<AddButton onclick={createTodo} text="Add todo" />
<div class="todo-add">
<AddButton onclick={createTodo} text="Add todo" />
</div>
</div>
<style>
Expand All @@ -146,4 +144,10 @@
width: 50%;
min-width: 200px;
}
.todo-add {
display: flex;
align-items: center;
justify-content: space-between;
height: 100%;
}
</style>

0 comments on commit 283e502

Please sign in to comment.