diff options
author | Yorhel <git@yorhel.nl> | 2021-04-20 13:20:24 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2021-04-20 13:20:26 +0200 |
commit | 7b350d177c1a3c78527263d87243f27c2586a0f9 (patch) | |
tree | 3b8c29a1cea38b6ecd8e0d3e01608007e0bc0309 /elm/Lib/Html.elm | |
parent | af3f6460654e695098ffd376bbd44899e5675686 (diff) |
Use old-fashioned <img> tags for platform icons
I don't like the platforms listing in CSS much, after all, and I've
never been a big fan of the <abbr> hacks. Been experimenting with sprite
sheets and inline <svg><use..>, but for now I think the simplest
solution of just using <img> tags still seems the best.
Until I change my mind again and can't resist the allure of throwing all
icons in a single nicely compressed file.
Diffstat (limited to 'elm/Lib/Html.elm')
-rw-r--r-- | elm/Lib/Html.elm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/elm/Lib/Html.elm b/elm/Lib/Html.elm index e63bd3d9..fdd2e627 100644 --- a/elm/Lib/Html.elm +++ b/elm/Lib/Html.elm @@ -7,6 +7,7 @@ import Json.Decode as JD import List import Lib.Api as Api import Lib.Util exposing (..) +import Lib.Ffi as Ffi import Gen.Types as T @@ -205,7 +206,7 @@ langIcon : String -> Html m langIcon l = abbr [ class "icons lang", class l, title (Maybe.withDefault "" <| lookup l T.languages) ] [ text " " ] platformIcon : String -> Html m -platformIcon l = abbr [ class "icons plat", class l, title (Maybe.withDefault "" <| lookup l T.platforms) ] [ text " " ] +platformIcon l = img [ class "platicon", src <| Ffi.urlStatic ++ "/f/plat/" ++ l ++ ".svg", title (Maybe.withDefault "" <| lookup l T.platforms) ] [] releaseTypeIcon : String -> Html m releaseTypeIcon t = abbr [ class ("icons rt"++t), title (Maybe.withDefault "" <| lookup t T.releaseTypes) ] [ text " " ] |