Skip to content

Commit

Permalink
Expose all Html imports by default
Browse files Browse the repository at this point in the history
  • Loading branch information
tesk9 committed Feb 24, 2019
1 parent 031b08d commit 9cd8c9c
Show file tree
Hide file tree
Showing 9 changed files with 318 additions and 318 deletions.
26 changes: 13 additions & 13 deletions HelloWorld.elm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module HelloWorld exposing (Model, Msg(..), init, main, update, view)

import Browser
import Html
import Html.Attributes
import Html.Events
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)



Expand Down Expand Up @@ -55,18 +55,18 @@ update msg model =
-- VIEW


view : Model -> Html.Html Msg
view : Model -> Html Msg
view model =
Html.div
[ Html.Attributes.class "skeleton-elm-project" ]
[ Html.node "link"
[ Html.Attributes.rel "stylesheet"
, Html.Attributes.href "stylesheets/main.css"
div
[ class "skeleton-elm-project" ]
[ node "link"
[ rel "stylesheet"
, href "stylesheets/main.css"
]
[]
, Html.div
[ Html.Attributes.class "waves-effect waves-light btn-large"
, Html.Events.onClick ChangeText
, div
[ class "waves-effect waves-light btn-large"
, onClick ChangeText
]
[ Html.text model.buttonLabel ]
[ text model.buttonLabel ]
]
46 changes: 23 additions & 23 deletions Part1.elm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module Part1 exposing (Model, Msg(..), init, main, update, view)

import Browser
import Html
import Html.Attributes
import Html.Events
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)



Expand Down Expand Up @@ -52,33 +52,33 @@ update msg model =
-- VIEW


view : Model -> Html.Html Msg
view : Model -> Html Msg
view model =
Html.div
div
[]
[ Html.node "link"
[ Html.Attributes.rel "stylesheet"
, Html.Attributes.href "stylesheets/main.css"
[ node "link"
[ rel "stylesheet"
, href "stylesheets/main.css"
]
[]
, Html.nav
, nav
[]
[ Html.div
[ Html.Attributes.class "nav-wrapper light-blue lighten-2" ]
[ Html.div
[ Html.Attributes.class "brand-logo center" ]
[ Html.text "Elmoji Translator" ]
[ div
[ class "nav-wrapper light-blue lighten-2" ]
[ div
[ class "brand-logo center" ]
[ text "Elmoji Translator" ]
]
]
, Html.section
[ Html.Attributes.class "container" ]
[ Html.div
[ Html.Attributes.class "input-field" ]
[ Html.input
[ Html.Attributes.type_ "text"
, Html.Attributes.class "center"
, Html.Attributes.placeholder "Let's Translate!"
, Html.Events.onInput SetCurrentText
, section
[ class "container" ]
[ div
[ class "input-field" ]
[ input
[ type_ "text"
, class "center"
, placeholder "Let's Translate!"
, onInput SetCurrentText
]
[]
]
Expand Down
52 changes: 26 additions & 26 deletions Part2.elm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module Part2 exposing (Model, Msg(..), init, main, update, view)

import Browser
import Html
import Html.Attributes
import Html.Events
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)



Expand Down Expand Up @@ -51,38 +51,38 @@ update msg model =
-- VIEW


view : Model -> Html.Html Msg
view : Model -> Html Msg
view model =
Html.div
div
[]
[ Html.node "link"
[ Html.Attributes.rel "stylesheet"
, Html.Attributes.href "stylesheets/main.css"
[ node "link"
[ rel "stylesheet"
, href "stylesheets/main.css"
]
[]
, Html.nav
, nav
[]
[ Html.div
[ Html.Attributes.class "nav-wrapper light-blue lighten-2" ]
[ Html.div
[ Html.Attributes.class "brand-logo center" ]
[ Html.text "Elmoji Translator" ]
[ div
[ class "nav-wrapper light-blue lighten-2" ]
[ div
[ class "brand-logo center" ]
[ text "Elmoji Translator" ]
]
]
, Html.section
[ Html.Attributes.class "container" ]
[ Html.div
[ Html.Attributes.class "input-field" ]
[ Html.input
[ Html.Attributes.type_ "text"
, Html.Attributes.class "center"
, Html.Attributes.placeholder "Let's Translate!"
, Html.Events.onInput SetCurrentText
, section
[ class "container" ]
[ div
[ class "input-field" ]
[ input
[ type_ "text"
, class "center"
, placeholder "Let's Translate!"
, onInput SetCurrentText
]
[]
]
, Html.p
[ Html.Attributes.class "center output-text emoji-size" ]
[ Html.text model.currentText ]
, p
[ class "center output-text emoji-size" ]
[ text model.currentText ]
]
]
52 changes: 26 additions & 26 deletions Part3.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module Part3 exposing (Model, Msg(..), defaultKey, init, main, translateText, up

import Browser
import EmojiConverter
import Html
import Html.Attributes
import Html.Events
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Regex


Expand Down Expand Up @@ -58,39 +58,39 @@ update msg model =
-- VIEW


view : Model -> Html.Html Msg
view : Model -> Html Msg
view model =
Html.div
div
[]
[ Html.node "link"
[ Html.Attributes.rel "stylesheet"
, Html.Attributes.href "stylesheets/main.css"
[ node "link"
[ rel "stylesheet"
, href "stylesheets/main.css"
]
[]
, Html.nav
, nav
[]
[ Html.div
[ Html.Attributes.class "nav-wrapper light-blue lighten-2" ]
[ Html.div
[ Html.Attributes.class "brand-logo center" ]
[ Html.text "Elmoji Translator" ]
[ div
[ class "nav-wrapper light-blue lighten-2" ]
[ div
[ class "brand-logo center" ]
[ text "Elmoji Translator" ]
]
]
, Html.section
[ Html.Attributes.class "container" ]
[ Html.div
[ Html.Attributes.class "input-field" ]
[ Html.input
[ Html.Attributes.type_ "text"
, Html.Attributes.class "center"
, Html.Attributes.placeholder "Let's Translate!"
, Html.Events.onInput SetCurrentText
, section
[ class "container" ]
[ div
[ class "input-field" ]
[ input
[ type_ "text"
, class "center"
, placeholder "Let's Translate!"
, onInput SetCurrentText
]
[]
]
, Html.p
[ Html.Attributes.class "center output-text emoji-size" ]
[ Html.text (translateText model) ]
, p
[ class "center output-text emoji-size" ]
[ text (translateText model) ]
]
]

Expand Down
72 changes: 36 additions & 36 deletions Part4.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module Part4 exposing (Model, Msg(..), defaultKey, init, main, translateText, up

import Browser
import EmojiConverter
import Html
import Html.Attributes
import Html.Events
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)



Expand Down Expand Up @@ -62,55 +62,55 @@ update msg model =
-- VIEW


view : Model -> Html.Html Msg
view : Model -> Html Msg
view model =
Html.div
div
[]
[ Html.node "link"
[ Html.Attributes.rel "stylesheet"
, Html.Attributes.href "stylesheets/main.css"
[ node "link"
[ rel "stylesheet"
, href "stylesheets/main.css"
]
[]
, Html.nav
, nav
[]
[ Html.div
[ Html.Attributes.class "nav-wrapper light-blue lighten-2" ]
[ Html.div
[ Html.Attributes.class "brand-logo center" ]
[ Html.text "Elmoji Translator" ]
[ div
[ class "nav-wrapper light-blue lighten-2" ]
[ div
[ class "brand-logo center" ]
[ text "Elmoji Translator" ]
]
]
, Html.section
[ Html.Attributes.class "container" ]
[ Html.div
[ Html.Attributes.class "input-field" ]
[ Html.input
[ Html.Attributes.type_ "text"
, Html.Attributes.class "center"
, Html.Attributes.placeholder "Let's Translate!"
, Html.Events.onInput SetCurrentText
, section
[ class "container" ]
[ div
[ class "input-field" ]
[ input
[ type_ "text"
, class "center"
, placeholder "Let's Translate!"
, onInput SetCurrentText
]
[]
]
, Html.div
[ Html.Attributes.class "switch center" ]
[ Html.label
, div
[ class "switch center" ]
[ label
[]
[ Html.text "Translate Text"
, Html.input
[ Html.Attributes.type_ "checkbox"
, Html.Events.onClick ToggleDirection
[ text "Translate Text"
, input
[ type_ "checkbox"
, onClick ToggleDirection
]
[]
, Html.span
[ Html.Attributes.class "lever" ]
, span
[ class "lever" ]
[]
, Html.text "Translate Emoji"
, text "Translate Emoji"
]
]
, Html.p
[ Html.Attributes.class "center output-text emoji-size" ]
[ Html.text (translateText model) ]
, p
[ class "center output-text emoji-size" ]
[ text (translateText model) ]
]
]

Expand Down
Loading

0 comments on commit 9cd8c9c

Please sign in to comment.