From c6ab2b4b8a2109e0292b0837fea37f04f15c688f Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Sun, 15 Jan 2017 22:57:03 +0100 Subject: [PATCH] Improve example visual (a bit) --- example/Main.elm | 23 ++++++++++++++++------- example/index.html | 12 ++++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) 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 @@ + elm-lint + +