worldwide todo list: global map (List/Map toggle, clustered category pins, Global strip, pick on map, location_precision, tasks.geojson)
Deploy production / deploy (push) Successful in 1m13s
Deploy production / deploy (push) Successful in 1m13s
This commit is contained in:
1 parent
21b10ea894
commit
9d79dfb43a
15 files changed
+42669
-13
No files matched your search
@@ -18,18 +18,20 @@ export const load: PageServerLoad = async ({ url, parent }) => {
|
||||
const status = STATUSES.includes(first('status')) ? first('status') : 'todo';
|
||||
const sort = (SORTS as string[]).includes(first('sort')) ? (first('sort') as Sort) : 'updated';
|
||||
const q = first('q').slice(0, 100);
|
||||
const view = first('view') === 'map' ? 'map' : 'list';
|
||||
const filter = { scale, category, status, q };
|
||||
const [list, totals] = await Promise.all([listTasks(filter, sort, 500), counts(filter)]);
|
||||
return {
|
||||
filter,
|
||||
sort,
|
||||
view,
|
||||
tasks: list.tasks,
|
||||
counts: totals,
|
||||
seo: {
|
||||
title: 'The worldwide todo list',
|
||||
description:
|
||||
'A public todo list of real, sourced problems, from planet-scale to a single street. Anyone can suggest additions, edits and removals.',
|
||||
index: !scale && !category && status === 'todo' && !q && sort === 'updated'
|
||||
index: !scale && !category && status === 'todo' && !q && sort === 'updated' && view === 'list'
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user