M src/app.scss => src/app.scss +1 -1
@@ 12,7 12,7 @@
@import '@fortawesome/fontawesome-free/css/all.min.css';
img {
- display: block;
+ display: block;
}
.strikethrough {
M src/lib/components/Nav.svelte => src/lib/components/Nav.svelte +1 -1
@@ 14,7 14,7 @@
<nav class="navbar is-primary is-fixed-top">
<div class="navbar-brand">
- <a class="navbar-item" href="/"><img alt="minb" src="/favicon.png" /></a>
+ <a class="navbar-item" href="/"><img alt="minb" src="/favicon.png" /></a>
<a
href="."
class="navbar-burger"
M src/lib/components/TodoGroupRenderer.svelte => src/lib/components/TodoGroupRenderer.svelte +3 -2
@@ 1,6 1,7 @@
<script lang="ts">
import TodoRenderer from '$lib/components/TodoRenderer.svelte';
import { hillChartColors } from '$lib/utils/const';
+ import { htmlToText } from '$lib/utils/misc';
import { supabase } from '$lib/utils/supabase';
import type { TodoGroup } from '$lib/utils/types';
import { notifier } from '@beyonk/svelte-notifications';
@@ 10,7 11,7 @@
const dispatch = createEventDispatcher();
export let todo_group: TodoGroup;
- $: completed = todo_group.todos.filter((todo) => !todo.completed).length == 0;
+ $: completed = todo_group.todos.filter((todo) => !todo.completed).length == 0 && todo_group.todos.length > 0;
let saveLoading = false;
let deleteLoading = false;
@@ 89,7 90,7 @@
const hillChartData = [
{
id: todo_group.id,
- description: todo_group.title,
+ description: htmlToText(todo_group.title),
x: todo_group.progress,
color: hillChartColors[0],
link: `#todo-group-${todo_group.id}`
A src/lib/utils/misc.ts => src/lib/utils/misc.ts +3 -0
@@ 0,0 1,3 @@
+export const htmlToText = (html: string): string => {
+ return html.replace(/<[^>]*>/g, '');
+};
M src/routes/+page.svelte => src/routes/+page.svelte +1 -1
@@ 6,7 6,7 @@
<h2 class="subtitle is-3 has-text-centered">A minimalist recreation of Basecamp Todos</h2>
<section class="content">
- <img alt="minb" src="/favicon.png" class="mx-auto my-4" />
+ <img alt="minb" src="/favicon.png" class="mx-auto my-4" />
<p>
minb aims to be a Free and Open Source, minimalist recreation of <a
href="https://basecamp.com/features/hill-charts">Basecamp Todos</a
M src/routes/project/[id]/+page.svelte => src/routes/project/[id]/+page.svelte +4 -5
@@ 1,14 1,13 @@
<script lang="ts">
import { goto } from '$app/navigation';
-
import TodoGroupRenderer from '$lib/components/TodoGroupRenderer.svelte';
import { hillChartColors } from '$lib/utils/const';
+ import { htmlToText } from '$lib/utils/misc';
import { supabase } from '$lib/utils/supabase';
- import HillChart from 'hill-chart';
- import { onMount } from 'svelte';
-
import type { Project } from '$lib/utils/types';
import { notifier } from '@beyonk/svelte-notifications';
+ import HillChart from 'hill-chart';
+ import { onMount } from 'svelte';
export let data: {
project: Project;
@@ 95,7 94,7 @@
const hillChartData = data.project.todo_groups?.map((todo_group, i) => {
return {
id: todo_group.id,
- description: todo_group.title,
+ description: htmlToText(todo_group.title),
x: todo_group.progress,
color: hillChartColors[i % hillChartColors.length],
link: `#todo-group-${todo_group.id}`