diff --git a/example/Main.elm b/example/Main.elm index ac65ca30..0cd040c5 100644 --- a/example/Main.elm +++ b/example/Main.elm @@ -5,7 +5,7 @@ import Ast import Ast.Expression exposing (..) import Ast.Statement exposing (..) import Html exposing (Html, p, div, li, ul, pre, textarea, text) -import Html.Attributes exposing (id) +import Html.Attributes exposing (id, class) import Html.Events exposing (..) import Json.Decode as JD import Lint @@ -116,14 +116,23 @@ lint source = view : String -> Html Msg view model = div [ id "wrapper" ] - [ textarea - [ id "left" - , on "input" (JD.map Replace targetValue) + [ div [ id "left" ] + [ p [ class "title" ] [ text "Source code" ] + , textarea + [ id "input" + , on "input" (JD.map Replace targetValue) + ] + [ text model ] + , div [] + [ p [ class "title" ] [ text "Linting errors" ] + , div [ id "lint" ] + [ lint model + ] + ] ] - [ text model ] , div [ id "right" ] - [ p [ id "ast" ] [ tree <| Ast.parse model ] - , p [ id "lint" ] [ lint model ] + [ p [ class "title" ] [ text "AST" ] + , p [ id "ast" ] [ tree <| Ast.parse model ] ] ] diff --git a/example/index.html b/example/index.html index 711255f0..27ce3631 100644 --- a/example/index.html +++ b/example/index.html @@ -1,6 +1,10 @@
+