worldwide todo list: public todo list of 68 real, sourced problems (planet to street) at /projects/worldwide-todo. worldtodo schema (categories, tasks, change_requests), idempotent seed on deploy, public add/edit/delete requests with Turnstile + salted daily-rotating IP-hash rate limit, owner-only review queue (approve, edit & approve, reject) with live updates over /ws/worldtodo(-owner), JSON API, detail pages with OSM map and history; listed in projects, header, /start and sitemap
Some checks failed
Deploy production / deploy (push) Failing after 9s
Some checks failed
Deploy production / deploy (push) Failing after 9s
This commit is contained in:
41
src/lib/worldtodo/IconTile.svelte
Normal file
41
src/lib/worldtodo/IconTile.svelte
Normal file
@@ -0,0 +1,41 @@
|
||||
<script lang="ts">
|
||||
import type { Component } from 'svelte';
|
||||
|
||||
// A small coloured square with a white icon (decorative; always next to a text label).
|
||||
let {
|
||||
icon: Icon,
|
||||
background,
|
||||
size = 'md'
|
||||
}: {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
icon: Component<any>;
|
||||
background: string;
|
||||
size?: 'sm' | 'md' | 'lg';
|
||||
} = $props();
|
||||
const px = $derived(size === 'lg' ? 22 : size === 'sm' ? 12 : 15);
|
||||
</script>
|
||||
|
||||
<span class="tile {size}" style:background aria-hidden="true"><Icon size={px} /></span>
|
||||
|
||||
<style>
|
||||
.tile {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
color: #fff;
|
||||
border-radius: 0.5rem;
|
||||
width: 1.85rem;
|
||||
height: 1.85rem;
|
||||
}
|
||||
.sm {
|
||||
width: 1.3rem;
|
||||
height: 1.3rem;
|
||||
border-radius: 999px;
|
||||
}
|
||||
.lg {
|
||||
width: 2.75rem;
|
||||
height: 2.75rem;
|
||||
border-radius: 0.8rem;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user