Skip to content

Commit

Permalink
Add comments instead of unused import examples
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricss committed Aug 7, 2019
1 parent b009f39 commit 8f23729
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 27 deletions.
19 changes: 6 additions & 13 deletions src/Data.elm
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
module Data exposing (Package, packageDecoder)

import Json.Decode as Decode
exposing
( Decoder
, decodeString
, float
, int
, list
, nullable
, string
)
import Json.Decode.Pipeline exposing (hardcoded, optional, required)
import Json.Decode as Decode exposing (Decoder, string)
import Json.Decode.Pipeline exposing (required)


type alias Package =
Expand All @@ -23,8 +14,10 @@ type alias Package =

packageDecoder : Decoder Package
packageDecoder =
-- Build JSON decoders using the pipeline (|>) operator.
-- Learn more: https://package.elm-lang.org/packages/NoRedInk/elm-json-decode-pipeline/1.0.0/
-- Build JSON decoders using the pipeline (|>) operator:
-- https://package.elm-lang.org/packages/NoRedInk/elm-json-decode-pipeline/1.0.0/
-- See also bool, float, int, list, nullable, etc. in:
-- https://package.elm-lang.org/packages/elm/json/latest/Json-Decode
Decode.succeed Package
|> required "name" string
|> required "url" string
Expand Down
9 changes: 1 addition & 8 deletions src/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ module Main exposing (main)

import Browser
import Browser.Navigation as Nav
import Css exposing (..)
import Data
import Html
import Html.Styled exposing (..)
import Html.Styled.Attributes exposing (alt, attribute, class, css, disabled, href, src)
import Html.Styled.Attributes exposing (attribute, class, disabled, href)
import Html.Styled.Events exposing (onClick)
import Http
import Markdown
import RemoteData exposing (RemoteData)
import Route exposing (Route(..))
import Url exposing (Url)
Expand Down Expand Up @@ -196,10 +193,6 @@ viewDemo model =

update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
let
noChange =
( model, Cmd.none )
in
case msg of
BrowserChangedUrl url ->
( { model | route = Route.fromUrl url }
Expand Down
3 changes: 1 addition & 2 deletions src/Route.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ module Route exposing
)

import Url
import Url.Parser as Parser exposing ((</>), Parser, int, map, oneOf, s, string, top)
import Url.Parser.Query as Query
import Url.Parser as Parser exposing ((</>), Parser, map, oneOf, s, top)


type Route
Expand Down
7 changes: 3 additions & 4 deletions src/View.elm
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ module View exposing
)

import Css exposing (..)
import Html
import Html.Styled exposing (..)
import Html.Styled.Attributes exposing (alt, attribute, class, css, href, src, target)
import Html.Styled.Attributes exposing (attribute, class, css, href, target)


theme : { headerHeight : Rem }
Expand All @@ -25,8 +24,8 @@ theme =
header : List (Html msg) -> Html msg
header items =
div
[ class "fixed top-0 inset-x-0 bg-white border-b border-gray-300"
, css [ height theme.headerHeight ]
[ class "fixed top-0 inset-x-0 bg-white border-b border-gray-300" -- Tailwind utilities: https://tailwindcss.com
, css [ height theme.headerHeight ] -- elm-css: https://package.elm-lang.org/packages/rtfeldman/elm-css/latest
]
[ div
[ class "container mx-auto h-full"
Expand Down

0 comments on commit 8f23729

Please sign in to comment.