fix: fragment links especially the footnotes

This commit is contained in:
Tienson Qin
2021-02-02 20:47:17 +08:00
parent f0f9c1790f
commit 575674919c
8 changed files with 27 additions and 24 deletions

View File

@@ -129,9 +129,10 @@
:block
(let [block-uuid (uuid (:block/uuid data))
page (:page/name (:block/page (db/entity [:block/uuid block-uuid])))
path (str "/page/" (util/encode-str page) "#ls-block-" (:block/uuid data))]
(route/redirect-with-fragment! path))
page (:page/name (:block/page (db/entity [:block/uuid block-uuid])))]
(route/redirect! {:to :page
:path-params {:name page}
:query-params {:anchor (str "ls-block-" (:block/uuid data))}}))
nil))
:on-shift-chosen (fn [{:keys [type data]}]
(case type