mirror of https://github.com/logseq/logseq
parent
0d6856d234
commit
89c807c2a7
|
@ -327,7 +327,10 @@
|
|||
[:p
|
||||
[:code.mr-2 "Embed page:"]
|
||||
(page-cp config {:page/name page-name})]
|
||||
(when (not= (string/lower-case current-page) page-name)
|
||||
(when (or
|
||||
(not current-page)
|
||||
(and current-page
|
||||
(not= (string/lower-case current-page) page-name)))
|
||||
(blocks-container blocks (assoc config
|
||||
:embed? true
|
||||
:ref? false)))]))
|
||||
|
|
|
@ -81,8 +81,9 @@
|
|||
|
||||
(defn scroll-and-highlight!
|
||||
[state]
|
||||
(when-let [fragment (util/get-fragment)]
|
||||
(highlight-element! fragment))
|
||||
(if-let [fragment (util/get-fragment)]
|
||||
(highlight-element! fragment)
|
||||
(util/scroll-to-top))
|
||||
state)
|
||||
|
||||
(defn add-style-if-exists!
|
||||
|
|
|
@ -322,9 +322,10 @@
|
|||
|
||||
(defn scroll-to
|
||||
[pos]
|
||||
(.scroll (gdom/getElement "main-content")
|
||||
#js {:top pos
|
||||
:behavior "smooth"}))
|
||||
(when-let [main-content (gdom/getElement "main-content")]
|
||||
(.scroll main-content
|
||||
#js {:top pos
|
||||
:behavior "smooth"})))
|
||||
|
||||
(defn scroll-to-top
|
||||
[]
|
||||
|
|
Loading…
Reference in New Issue