fix: move the theme button to settings

There're several other things
1. remove help button because there's one in the right bottom corner.
2. remove config/mobile? check for right sidebar
3. add open collective link
4. adjust left bar width
This commit is contained in:
Tienson Qin
2020-12-18 19:52:31 +08:00
parent a7c7fa51cd
commit 8208b92d60
5 changed files with 33 additions and 29 deletions

View File

@@ -71,11 +71,24 @@
cors-proxy (state/sub [:me :cors_proxy])
logged? (state/logged?)
current-repo (state/get-current-repo)
developer-mode? (state/sub [:ui/developer-mode?])]
developer-mode? (state/sub [:ui/developer-mode?])
theme (state/sub :ui/theme)
dark? (= "dark" theme)
switch-theme (if dark? "white" "dark")]
(rum/with-context [[t] i18n/*tongue-context*]
[:div#settings
[:h1.title (t :settings)]
[:div.mb-1.sm:grid.sm:grid-cols-3.sm:gap-4.sm:items-start.sm:pt-5.pl-1
[:label.block.text-sm.font-medium.leading-5.sm:mt-px.sm:pt-2.opacity-70
{:for "toggle_theme"}
(t :right-side-bar/switch-theme (string/capitalize switch-theme))]
[:div.mt-1.sm:mt-0.sm:col-span-2
[:div.max-w-lg.rounded-md.sm:max-w-xs.pt-2
(ui/toggle dark?
(fn []
(state/set-theme! switch-theme)))]]]
[:div.mb-6.sm:grid.sm:grid-cols-3.sm:gap-4.sm:items-start.sm:pt-5.pl-1
[:label.block.text-sm.font-medium.leading-5.sm:mt-px.sm:pt-2.opacity-70
{:for "preferred_language"}