-
-
Save paultopia/f299d3e41ee0a5ada462fbb85c757899 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn footnote [text page] | |
(do | |
(swap! footnote-counter inc) | |
(let [modal-state (atom false)] | |
(fn [text] | |
(let [num @footnote-counter] | |
(listen js/window "keypress" #(handle-footnote-key % num page modal-state)) | |
[:span | |
[footnote-flag num modal-state text] | |
[modal-content text modal-state page]]))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment