diff options
author | Yorhel <git@yorhel.nl> | 2020-12-29 13:10:26 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-12-29 13:10:29 +0100 |
commit | 4c36358dc03f8db5a77f453d7efffa818707a055 (patch) | |
tree | ce1ba214f28a8d452cd8fac34753c9022dd0f072 | |
parent | aa16b0db6774f830e565d893f1546e351dc3a465 (diff) |
AdvSearch: Fix trait id display + make tags/traits clickable
https://vndb.org/t14995.50
-rw-r--r-- | elm/AdvSearch/Tags.elm | 2 | ||||
-rw-r--r-- | elm/AdvSearch/Traits.elm | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/elm/AdvSearch/Tags.elm b/elm/AdvSearch/Tags.elm index 002ca2b7..2ffe1785 100644 --- a/elm/AdvSearch/Tags.elm +++ b/elm/AdvSearch/Tags.elm @@ -101,7 +101,7 @@ view dat model = :: List.map (\i -> (i, String.fromInt (i//5) ++ "." ++ String.fromInt (2*(modBy 5 i)) ++ "+")) (List.range 1 14) ++ [(15, "3.0")] , b [ class "grayedout" ] [ text <| " g" ++ String.fromInt t ++ ": " ] - , Dict.get t dat.tags |> Maybe.map (\e -> e.name) |> Maybe.withDefault "" |> text + , Dict.get t dat.tags |> Maybe.map (\e -> a [ href ("/g" ++ String.fromInt t), target "_blank", style "display" "inline" ] [ text e.name ]) |> Maybe.withDefault (text "") ] ) (Set.toList model.sel.sel) , A.view model.conf model.search [ placeholder "Search..." ] diff --git a/elm/AdvSearch/Traits.elm b/elm/AdvSearch/Traits.elm index df1b282e..712acdff 100644 --- a/elm/AdvSearch/Traits.elm +++ b/elm/AdvSearch/Traits.elm @@ -94,10 +94,10 @@ view dat model = , ul [] <| List.map (\t -> li [ style "overflow" "hidden", style "text-overflow" "ellipsis" ] [ inputButton "X" (Sel (S.Sel t False)) [] - , b [ class "grayedout" ] [ text <| " g" ++ String.fromInt t ++ ": " ] + , b [ class "grayedout" ] [ text <| " i" ++ String.fromInt t ++ ": " ] , Dict.get t dat.traits |> Maybe.map (\e -> span [] [ Maybe.withDefault (text "") <| Maybe.map (\g -> b [ class "grayedout" ] [ text (g ++ " / ") ]) e.group_name - , text e.name ]) |> Maybe.withDefault (text "") + , a [ href ("/i" ++ String.fromInt t), target "_blank", style "display" "inline" ] [ text e.name ] ]) |> Maybe.withDefault (text "") ] ) (Set.toList model.sel.sel) , A.view model.conf model.search [ placeholder "Search..." ] |