fix reset theme button

This commit is contained in:
Will Hanlen 2024-08-13 16:29:29 -05:00
parent 8947623c63
commit cee776daca
4 changed files with 30 additions and 18 deletions

View File

@ -31,15 +31,15 @@
=/ inner=pith:neo
(pave:neo pax:(parse-url-frfr:serv request.req))
::
:: handle the /sky route
:: redirect /sky to the mast renderer
?: =(%sky (snag 0 inner))
:_ sig/!>(~)
:~ :* (welp here.bowl [[%ta eyre-id] ~])
%make
%sky-ui
`[%eyre-task !>(task)]
(~(gas by *crew:neo) src/#/[p/our.bowl]/sky ~)
==
=/ =pith:neo #/[p/our.bowl]/$/eyre
=/ loc (crip "/mast/mast-sky-ui/{(scow %p our.bowl)}/sky")
:~
[pith %poke eyre-sign/!>([eyre-id %head 307 ['Location' loc]~])]
[pith %poke eyre-sign/!>([eyre-id %data ~])]
[pith %poke eyre-sign/!>([eyre-id %done ~])]
==
::
:: handle everything under /blue

View File

@ -35,6 +35,10 @@
=/ rod `(pole @tas)`path.eve
=/ dst=pith:neo p:(~(got by deps.bowl) %src)
?+ rod ~|(missing-event-handler-for/path.eve !!)
::
[%click %default-theme ~]
:_ pail
~(default-theme-cards render bowl)
::
[%change %theme ~]
=/ dat ~(. by data.eve)
@ -76,7 +80,7 @@
;+ form-theme
;+ notifications
==
++ wer
++ dst
^- pith:neo
p:(~(got by deps.bowl) %src)
++ lor
@ -130,7 +134,21 @@
jon
pave:neo
:~
[:(welp wer #/strategy here) %make %order `order/!>(strats) ~]
[:(welp dst #/strategy here) %make %order `order/!>(strats) ~]
==
::
++ default-theme-cards
^- (list card:neo)
::
%- zing
^- (list (list card:neo))
%+ turn (dap /theme)
|= [rel=pith:neo =idea:neo]
=/ p :(welp dst #/theme rel)
~& del-theme/p
:~
[p %cull ~]
[p %tomb ~]
==
::
++ theme-rules
@ -170,7 +188,6 @@
^- manx
;input
=event "/change/theme"
=debounce "0.4"
=data-name (trip name)
=data-unit (trip nit)
=autocomplete "off"
@ -311,7 +328,8 @@
==
==
;button.p2.br1.bd1.b1
=onclick "document.documentElement.style = ''"
=event "/click/default-theme"
=js-on-event "document.documentElement.style = ''"
; Reset to default
==
==

View File

@ -44,15 +44,9 @@
!>
~
::
=/ =pith:neo #/[p/our.bowl]/$/eyre
=/ =binding:eyre [~ ~[%neo %sky]]
=/ =req:eyre:neo [%connect binding here.bowl]
::
:: return cards
:~
[~[p/our.bowl %home] %make %home ~ ~]
::
:: bind static assets
[here.bowl %poke bind-static-assets/!>(~)]
==
--

View File

@ -2,7 +2,7 @@
info+'Shrubbery namespace browser.'
color+0xdd.dddd
image+'https://storage.googleapis.com/tlon-prod-memex-assets/simsur-ronbet/2024.6.19..16.56.27..5ced.9168.72b0.20c4-sky-icon.png'
site+/neo/sky
site+/sky
version+[0 0 1]
website+'https://github.com/urbit/shrub'
license+'MIT'