[READ-ONLY] Mirror of https://github.com/flo-bit/atmo-tools. atmo.tools
0

Configure Feed

Select the types of activity you want to include in your feed.

add opensearch

Florian (Apr 16, 2026, 1:01 AM +0200) e6602aa3 baeea889

+26 -1
+6
src/app.html
··· 3 3 <head> 4 4 <meta charset="utf-8" /> 5 5 <link rel="icon" href="%sveltekit.assets%/favicon.png" /> 6 + <link 7 + rel="search" 8 + type="application/opensearchdescription+xml" 9 + title="atmo.tools" 10 + href="%sveltekit.assets%/opensearch.xml" 11 + /> 6 12 <meta name="viewport" content="width=device-width, initial-scale=1" /> 7 13 %sveltekit.head% 8 14
static/favicon.png

This is a binary file and will not be displayed.

+9
static/opensearch.xml
··· 1 + <?xml version="1.0" encoding="UTF-8"?> 2 + <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> 3 + <ShortName>atmo.tools</ShortName> 4 + <Description>Search your Bluesky posts, likes, bookmarks and more.</Description> 5 + <InputEncoding>UTF-8</InputEncoding> 6 + <Image width="16" height="16" type="image/png">https://atmo.tools/favicon.png</Image> 7 + <Url type="text/html" method="get" template="https://atmo.tools/search?q={searchTerms}"/> 8 + <Url type="application/opensearchdescription+xml" rel="self" template="https://atmo.tools/opensearch.xml"/> 9 + </OpenSearchDescription>
+11 -1
src/routes/search/Search.svelte
··· 3 3 import { AtprotoHandlePopup } from '@foxui/social'; 4 4 import { onMount } from 'svelte'; 5 5 import { SvelteMap } from 'svelte/reactivity'; 6 + import { page } from '$app/state'; 7 + import { replaceState } from '$app/navigation'; 6 8 import { 7 9 searchState, 8 10 initSources, ··· 35 37 } 36 38 37 39 let input: HTMLInputElement | null = $state(null); 38 - let search = $state(''); 40 + let search = $state(page.url.searchParams.get('q') ?? ''); 39 41 let results: any[] = $state([]); 40 42 let hasMore = $state(false); 41 43 let limit = $state(50); ··· 54 56 function handleSwitchSource(source: SourceType) { 55 57 switchSource(source); 56 58 } 59 + 60 + // Sync search term to URL (?q=...) 61 + $effect(() => { 62 + const url = new URL(page.url); 63 + if (search) url.searchParams.set('q', search); 64 + else url.searchParams.delete('q'); 65 + if (url.search !== page.url.search) replaceState(url, page.state); 66 + }); 57 67 58 68 // Reset limit when search params change 59 69 $effect(() => {