File tree Expand file tree Collapse file tree 6 files changed +385
-354
lines changed Expand file tree Collapse file tree 6 files changed +385
-354
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,12 @@ main = run $ withJS $ startComponent app
5656#ifndef WASM
5757 { styles =
5858 [ Href " /assets/styles.css"
59+ , Href " https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css"
5960 ]
6061 , scripts =
61- [ Src " https://cdn.jsdelivr.net/npm/basecoat-css@0.3.5/dist/js/basecoat.min.js"
62+ [ Src " https://cdn.jsdelivr.net/npm/basecoat-css@0.3.6/dist/js/basecoat.min.js"
63+ , Src " https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"
64+ , Src " https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/haskell.min.js"
6265 , Script
6366 " " "
6467 (() => {
@@ -109,6 +112,10 @@ app = component emptyModel update_ homeView
109112 dispatchEvent (Event event)
110113 ToggleDarkMode ->
111114 io_ toggleDarkMode
115+ Highlight domRef -> io_ $ void $ do
116+ consoleLog " I'm in here highlighting stuff"
117+ hljs <- global ! (" hljs" :: MisoString )
118+ hljs # (" highlightElement" :: MisoString ) $ [domRef]
112119 ChangeTheme theme -> do
113120 io_ $ do
114121 void $ eval (" " "
@@ -295,7 +302,6 @@ topSection = div_
295302 ]
296303 ]
297304 ]
298-
299305-----------------------------------------------------------------------------
300306mainContent :: View Model Action
301307mainContent = div_
You can’t perform that action at this time.
0 commit comments