Tweak links
This commit is contained in:
parent
fee164d3e4
commit
be944ee96a
|
@ -11,7 +11,7 @@ body {
|
|||
object-fit: cover;
|
||||
}
|
||||
|
||||
i.fa, i.fab {
|
||||
i.fas, i.fab {
|
||||
display: inline-block;
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
|
|
|
@ -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) ] []
|
||||
|
|
|
@ -132,19 +132,26 @@ viewApp app =
|
|||
a [ class "card-link", href link ]
|
||||
[
|
||||
i [ class "fab fa-git-alt" ] []
|
||||
, text "Code"
|
||||
, text "code"
|
||||
]
|
||||
Nothing ->
|
||||
text ""
|
||||
app_href = Route.toString <| Route.App_String { app = app.name }
|
||||
in
|
||||
div [ class "col-4 mb-3" ]
|
||||
[ div [ class "card" ]
|
||||
[ img [ class "card-img-top", src icon_url, alt ("icon for " ++ app.name) ] []
|
||||
, div [ class "card-body" ]
|
||||
[ h5 [ class "card-title" ]
|
||||
[ a [ href (Route.toString <| Route.App_String { app = app.name } ) ] [ text app.name ] ]
|
||||
, repository_link
|
||||
]
|
||||
[ a [ href app_href ] [ text app.name ] ]
|
||||
, repository_link
|
||||
, a [ class "card-link", href "http://example.com" ]
|
||||
[ i [ class "fas fa-home" ] []
|
||||
, text "homepage" ]
|
||||
, a [ class "card-link", href app_href ]
|
||||
[ i [ class "fas fa-book" ] []
|
||||
, text "docs" ]
|
||||
]
|
||||
, div [ class "card-footer" ]
|
||||
[ span [ class "card-link badge badge-secondary" ] [ text app.category ]
|
||||
, viewStatusBadge app
|
||||
|
|
Loading…
Reference in New Issue