Enhance: Use separate export.css instead of custom.css for export (#5303)

* Use separate export.css instead of custom.css for export

* use export.css if exists, otherwise custom.css

Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
This commit is contained in:
Alex
2022-05-30 16:39:14 +02:00
committed by GitHub
parent ac1ea69e32
commit b08de902a5
6 changed files with 41 additions and 18 deletions

View File

@@ -151,6 +151,14 @@
:on-click #(js/setTimeout (fn [] (ui-handler/toggle-settings-modal!)))
:-for "customize_css"}))
(defn edit-export-css []
(row-with-button-action
{:left-label (t :settings-page/export-theme)
:button-label (t :settings-page/edit-export-css)
:href (rfe/href :file {:path (config/get-export-css-path)})
:on-click #(js/setTimeout (fn [] (ui-handler/toggle-settings-modal!)))
:-for "customize_css"}))
(defn show-brackets-row [t show-brackets?]
[:div.it.sm:grid.sm:grid-cols-3.sm:gap-4.sm:items-start
[:label.block.text-sm.font-medium.leading-5.opacity-70
@@ -518,6 +526,7 @@
(theme-modes-row t switch-theme system-theme? dark?)
(when current-repo (edit-config-edn))
(when current-repo (edit-custom-css))
(when current-repo (edit-export-css))
(keyboard-shortcuts-row t)]))
(rum/defcs settings-editor < rum/reactive