Use string-extra.ellipsis to truncate descriptions
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
f53b4555cf
commit
468f7e1055
1
elm.json
1
elm.json
|
@ -14,6 +14,7 @@
|
||||||
"elm/regex": "1.0.0",
|
"elm/regex": "1.0.0",
|
||||||
"elm/url": "1.0.0",
|
"elm/url": "1.0.0",
|
||||||
"elm-community/json-extra": "4.3.0",
|
"elm-community/json-extra": "4.3.0",
|
||||||
|
"elm-community/string-extra": "4.0.1",
|
||||||
"pablohirafuji/elm-markdown": "2.0.5"
|
"pablohirafuji/elm-markdown": "2.0.5"
|
||||||
},
|
},
|
||||||
"indirect": {
|
"indirect": {
|
||||||
|
|
|
@ -11,6 +11,7 @@ import Spa.Document exposing (Document)
|
||||||
import Spa.Generated.Route as Route
|
import Spa.Generated.Route as Route
|
||||||
import Spa.Page as Page exposing (Page)
|
import Spa.Page as Page exposing (Page)
|
||||||
import Spa.Url as Url exposing (Url)
|
import Spa.Url as Url exposing (Url)
|
||||||
|
import String.Extra exposing (ellipsis)
|
||||||
import Util exposing (Direction(..), andThen, by)
|
import Util exposing (Direction(..), andThen, by)
|
||||||
|
|
||||||
|
|
||||||
|
@ -183,7 +184,7 @@ viewApp app =
|
||||||
, div [ class "card-body" ]
|
, div [ class "card-body" ]
|
||||||
[ h5 [ class "card-title" ]
|
[ h5 [ class "card-title" ]
|
||||||
[ a [ href app_href ] [ text app.name ] ]
|
[ a [ href app_href ] [ text app.name ] ]
|
||||||
, p [] [ text (withDefault "" app.description) ]
|
, p [] [ text (ellipsis 100 (withDefault "" app.description)) ]
|
||||||
, repository_link
|
, repository_link
|
||||||
, website_link
|
, website_link
|
||||||
, a [ class "card-link", href app_href ]
|
, a [ class "card-link", href app_href ]
|
||||||
|
|
Loading…
Reference in New Issue