WIP! A BB-style forum, on the ATmosphere! We're still working... we'll be back soon when we have something to show off!
node typescript hono htmx atproto
4
fork

Configure Feed

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

at user-theme-preferences 50 lines 1.4 kB view raw
1meta { 2 name: Preview Theme 3 type: http 4 seq: 2 5} 6 7get { 8 url: {{web_url}}/settings/preview?lightThemeUri=at://{{forum_did}}/space.atbb.forum.theme/3lbllight 9} 10 11params:query { 12 lightThemeUri: at://{{forum_did}}/space.atbb.forum.theme/3lbllight 13} 14 15assert { 16 res.status: eq 200 17} 18 19docs { 20 HTMX endpoint — returns an HTML fragment with color swatches for the given theme. 21 22 Called automatically by the settings page when the user changes a theme select. 23 Returns a <div id="theme-preview"> fragment that HTMX swaps into the page. 24 25 Accepts exactly one of: 26 - lightThemeUri: AT URI of a light theme 27 - darkThemeUri: AT URI of a dark theme 28 29 The endpoint fetches the theme from the AppView by rkey, extracts these tokens: 30 color-bg, color-surface, color-primary, color-text, color-border 31 32 Returns the fragment: 33 <div id="theme-preview" class="theme-preview"> 34 <span class="theme-preview__name">Theme Name</span> 35 <div class="theme-preview__swatches"> 36 <span class="theme-preview__swatch" style="background:#hex" title="color-bg" /> 37 ... 38 </div> 39 </div> 40 41 Returns empty fragment on any of: 42 - No query param provided 43 - URI fails rkey extraction (malformed) 44 - AppView returns non-ok status (unknown theme) 45 - Network error reaching AppView 46 47 Error codes: 48 - 200: Always — never errors, returns empty fragment on failure 49 Empty fragment: <div id="theme-preview"></div> 50}