From e35436a9bc8b164d6e4112cbe1ac9992ea4b1a73 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 26 Aug 2021 09:55:58 +0200 Subject: [PATCH] Add mailto link to maintainer list (#340) * Add mailto link to maintainer list Signed-off-by: Matthias Beyer * Fix: mailto links do not need // Signed-off-by: Matthias Beyer Co-authored-by: Rok Garbas --- src/Page/Packages.elm | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/Page/Packages.elm b/src/Page/Packages.elm index 8093645..ac83c8a 100644 --- a/src/Page/Packages.elm +++ b/src/Page/Packages.elm @@ -372,16 +372,28 @@ viewResultItem channel showInstallDetails show item = showMaintainer maintainer = li [] - [ a - [ href <| - case maintainer.github of - Just github -> - "https://github.com/" ++ github + [ div [] + [ a + [ href <| + case maintainer.github of + Just github -> + "https://github.com/" ++ github - Nothing -> - "#" + Nothing -> + "#" + ] + [ text <| Maybe.withDefault "" maintainer.name ++ " <" ++ Maybe.withDefault "" maintainer.email ++ ">" ] + , a + [ href <| + case maintainer.email of + Just email -> + "mailto:" ++ email + + Nothing -> + "#" + ] + [ text "(mail)" ] ] - [ text <| Maybe.withDefault "" maintainer.name ++ (Maybe.withDefault "" <| Maybe.map (\email -> " <" ++ email ++ ">") maintainer.email) ] ] showPlatform platform =