Tweak links
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
module Pages.App_String exposing (Model, Msg, Params, page)
|
||||
|
||||
import Regex
|
||||
import Html exposing (Html, button, div, h2, h5, img, text, ul, li, a, p, span)
|
||||
import Html exposing (Html, button, div, h2, h5, img, text, ul, li, a, p, span, i)
|
||||
import Html.Attributes exposing (src, style, class, alt, href)
|
||||
import Html.Events exposing (onClick)
|
||||
import Http
|
||||
@ -120,11 +120,22 @@ subscriptions model =
|
||||
|
||||
view : Model -> Document Msg
|
||||
view model =
|
||||
{ title = "abra app"
|
||||
{ title = title model
|
||||
, body = [ body model ]
|
||||
}
|
||||
|
||||
|
||||
title : Model -> String
|
||||
title model =
|
||||
case model.status of
|
||||
Loading ->
|
||||
"loading - abra apps"
|
||||
Failure ->
|
||||
"error - abra apps"
|
||||
Success app ->
|
||||
app.name ++ " - abra apps"
|
||||
|
||||
|
||||
body : Model -> Html Msg
|
||||
body model =
|
||||
div [ class "pt-3" ]
|
||||
@ -177,8 +188,10 @@ viewApp app readme =
|
||||
default_image
|
||||
repository_link =
|
||||
case app.repository of
|
||||
Just i ->
|
||||
a [ class "card-link", href i ] [ text "code" ]
|
||||
Just link ->
|
||||
a [ class "card-link", href link ]
|
||||
[ i [ class "fab fa-git-alt" ] []
|
||||
, text "code" ]
|
||||
Nothing ->
|
||||
text ""
|
||||
in
|
||||
@ -188,7 +201,9 @@ viewApp app readme =
|
||||
[ span [ class "card-link badge badge-secondary" ] [ text app.category ]
|
||||
, viewStatusBadge app
|
||||
, repository_link
|
||||
, a [ class "card-link", href "http://example.com" ] [ text "homepage" ]
|
||||
, a [ class "card-link", href "http://example.com" ]
|
||||
[ i [ class "fas fa-home" ] []
|
||||
, text "homepage" ]
|
||||
-- FIXME: add actual homepage link to apps.json and render here
|
||||
]
|
||||
, img [ class "card-img-top", src icon_url, alt ("icon for " ++ app.name) ] []
|
||||
|
Reference in New Issue
Block a user