summaryrefslogtreecommitdiff
blob: f7bd9e1716b3975b4eadd2ebe9b7e217fa4c8831 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
module Battle.View.Help.Attribute exposing (get_html_contents)

-- Elm -------------------------------------------------------------------------
import Html
import Html.Attributes

-- Battle ----------------------------------------------------------------------
import Battle.Struct.Attributes
import Battle.Lang.English

-- Local Module ----------------------------------------------------------------
import Struct.Event

--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
get_header_html : (
      Battle.Struct.Attributes.Category ->
      String ->
      (Html.Html Struct.Event.Type)
   )
get_header_html cat name =
   (Html.h1
      []
      [
         (Html.div
            [(Html.Attributes.class "help-guide-icon")]
            []
         ),
         (Html.text " "),
         (Html.div
            [
               (Html.Attributes.class "omnimod-icon"),
               (Html.Attributes.class
                  (
                     "omnimod-icon-"
                     ++ (Battle.Struct.Attributes.encode_category cat)
                  )
               )
            ]
            [
            ]
         ),
         (Html.text name)
      ]
   )

--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
get_html_contents : (
      Battle.Struct.Attributes.Category ->
      (List (Html.Html Struct.Event.Type))
   )
get_html_contents cat =
   let
      (name, tooltip) = (Battle.Lang.English.get_attribute_category_help cat)
   in
   [
      (get_header_html cat name),
      tooltip
   ]