on master help sign in
* fix for script position
09ac4efVincent Ambo
elm/Elm.cabal+2−2
@@ -1,6 +1,6 @@
1
1
2Name: Elm
2Name: Elm
3−Version: 0.1.2
3+Version: 0.1.2.1
4Synopsis: The Elm language module.
4Synopsis: The Elm language module.
5Description: Elm aims to make client-side web-development more pleasant.
5Description: Elm aims to make client-side web-development more pleasant.
6 It is a statically/strongly typed, functional reactive
6 It is a statically/strongly typed, functional reactive
@@ -31,7 +31,7 @@ source-repository head
31Library
31Library
32 exposed-modules: Language.Elm,
32 exposed-modules: Language.Elm,
33 Language.Elm.Quasi
33 Language.Elm.Quasi
34− ghc-options: -O2 -Wall
34+ ghc-options: -O2
35 Hs-Source-Dirs: src, src/Parse, src/Types
35 Hs-Source-Dirs: src, src/Parse, src/Types
36 other-modules: Ast,
36 other-modules: Ast,
37 CompileToJS,
37 CompileToJS,
elm/src/GenerateHtml.hs+7−2
@@ -1,5 +1,5 @@
1{-# LANGUAGE OverloadedStrings #-}
1{-# LANGUAGE OverloadedStrings #-}
2−module GenerateHtml (generateHtml, body, css) where
2+module GenerateHtml (generateHtml, body, css, widgetBody) where
3
3
4import Text.Blaze (preEscapedToMarkup)
4import Text.Blaze (preEscapedToMarkup)
5import Text.Blaze.Html (Html)
5import Text.Blaze.Html (Html)
@@ -51,4 +51,9 @@ body noscript = do
51 H.div ! A.id "widthChecker" ! A.style "width:100%; height:1px; position:absolute; top:-1px;" $ ""
51 H.div ! A.id "widthChecker" ! A.style "width:100%; height:1px; position:absolute; top:-1px;" $ ""
52 H.span ! A.id "content" $ ""
52 H.span ! A.id "content" $ ""
53 H.script ! A.type_ "text/javascript" $ "Dispatcher.initialize()"
53 H.script ! A.type_ "text/javascript" $ "Dispatcher.initialize()"
54− H.noscript $ preEscapedToMarkup noscript
54+ H.noscript $ preEscapedToMarkup noscript
55+
56+widgetBody noscript = do
57+ H.div ! A.id "widthChecker" ! A.style "width:100%; height:1px; position:absolute; top:-1px;" $ ""
58+ H.span ! A.id "content" $ ""
59+ H.noscript $ preEscapedToMarkup noscript
elm/src/Language/Elm.hs+1−1
@@ -70,4 +70,4 @@ toPartsHelper :: String -> (Html, Html, String)
70toPartsHelper source = (html, css, js)
70toPartsHelper source = (html, css, js)
71 where expr = initialize source
71 where expr = initialize source
72 js = compileToJS expr
72 js = compileToJS expr
73− html = body $ either id extract expr
73+ html = widgetBody $ either id extract expr