summaryrefslogtreecommitdiff
path: root/elm/Lib/Html.elm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-11-04 11:52:45 +0100
committerYorhel <git@yorhel.nl>2019-11-10 12:44:55 +0100
commitde6df4ab815a4f4447122d7f19888afd1b3e50ec (patch)
tree2eb3ce6ba9ebaf0d6c5fa588b7d2e4c4f87bc684 /elm/Lib/Html.elm
parent6821b9ab3f3b24e4d635a0763122d0ed2b1c0b72 (diff)
ulist: Add (nonfunctional) releases + options UI; More consistent naming
Diffstat (limited to 'elm/Lib/Html.elm')
-rw-r--r--elm/Lib/Html.elm10
1 files changed, 10 insertions, 0 deletions
diff --git a/elm/Lib/Html.elm b/elm/Lib/Html.elm
index 770e9142..6e67cefb 100644
--- a/elm/Lib/Html.elm
+++ b/elm/Lib/Html.elm
@@ -6,6 +6,8 @@ import Html.Events exposing (..)
import Json.Decode as JD
import List
import Lib.Api as Api
+import Lib.Util exposing (..)
+import Gen.Types as T
-- onClick with stopPropagation & preventDefault
@@ -165,3 +167,11 @@ formField lbl cont =
txt -> genlbl (String.concat txt)
, td (class "field" :: if lbl == "none" then [ colspan 2 ] else []) cont
]
+
+
+
+langIcon : String -> Html m
+langIcon l = abbr [ class "icons lang", class l, title (Maybe.withDefault "" <| lookup l T.languages) ] [ text " " ]
+
+releaseTypeIcon : String -> Html m
+releaseTypeIcon t = abbr [ class ("icons rt"++t), title (Maybe.withDefault "" <| lookup t T.releaseTypes) ] [ text " " ]