Skip to content

Instantly share code, notes, and snippets.

@vladbatushkov
Created November 13, 2020 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vladbatushkov/bab0d9ad0923a99e8ef661176ea6b7b8 to your computer and use it in GitHub Desktop.
Save vladbatushkov/bab0d9ad0923a99e8ef661176ea6b7b8 to your computer and use it in GitHub Desktop.
eatnoteat view
heroList : Model -> List (Html Msg)
heroList model =
List.map
(\x ->
card [ style "margin-top" "1.5rem" ]
[ cardContent []
[ media [ onClick <| ChangeHero x ]
[ mediaLeft [ style "width" "40%" ]
[ image (OneByOne Unbounded)
[]
[ img [ src x.picture, class "is-rounded" ] []
]
, bestScore x.id model.gameplay SelectHero
]
, mediaContent []
[ title H1 [] [ text x.name ]
, subtitle H2 [] [ text x.desc ]
]
]
]
]
)
[ arnold, chuck, terry ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment