mirror of
https://github.com/penpot/penpot.git
synced 2025-07-25 15:27:17 +02:00
🎉 Show Penpot color in Safari tab bar
This commit is contained in:
parent
c766e08027
commit
6ad06d9665
7 changed files with 17 additions and 1 deletions
|
@ -43,6 +43,12 @@
|
|||
[^string title]
|
||||
(set! (.-title globals/document) title))
|
||||
|
||||
(defn set-html-theme-color
|
||||
[^string color scheme]
|
||||
(let [meta-node (.querySelector js/document "meta[name='theme-color']")]
|
||||
(.setAttribute meta-node "content" color)
|
||||
(.setAttribute meta-node "media" (str/format "(prefers-color-scheme: %s)" scheme))))
|
||||
|
||||
(defn set-page-style!
|
||||
[styles]
|
||||
(let [node (first (get-elements-by-tag globals/document "head"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue