Skip to content

Instantly share code, notes, and snippets.

@paultopia
Last active July 4, 2016 02:39
Show Gist options
  • Save paultopia/f299d3e41ee0a5ada462fbb85c757899 to your computer and use it in GitHub Desktop.
Save paultopia/f299d3e41ee0a5ada462fbb85c757899 to your computer and use it in GitHub Desktop.
(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