Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block.text in a single line #180

Open
staeter opened this issue Jun 3, 2020 · 0 comments
Open

Block.text in a single line #180

staeter opened this issue Jun 3, 2020 · 0 comments

Comments

@staeter
Copy link

staeter commented Jun 3, 2020

I use Block.text as presented in here but the text do not align.

capture

viewUserDetails : UserDetails -> Html Msg
viewUserDetails ud =
  Card.config [ Card.attrs [ style "width" "47em" ] ]
    |> Card.header
        [ class "text-center" ]
        [ viewCarousel ud.pictures ud.carouselState InputUserDetailsSelectImage
        , h3 [ Spacing.mt2 ] [ Html.text ud.pseudo ]
        ]
    |> Card.block []
        [ Block.titleH4 [] [ Html.text (ud.first_name ++ " " ++ ud.last_name) ]
        , Block.titleH6 [] [ Html.text (ud.birth) ]
        , Block.titleH6 [] [ Html.text ((orientationToString ud.orientation) ++ " " ++ (genderToString ud.gender)) ]
        , Block.text [] [ Html.text ud.biography ]
        , Block.text [] [ Html.text <|
                            case ud.last_log of
                              Now -> "Is logged in"
                              AWhileAgo date -> "Last log : " ++ date
                        ]
        , Block.text [] [ Html.text ("Popularity score: " ++ String.fromInt ud.popularity_score) ]
        , Block.custom <|
            viewLikeButton ud.id ud.liked
        , Block.custom <|
            viewAngryButton "block" (Block ud.id)
        , Block.custom <|
            viewAngryButton "reprt" (Report ud.id)
        ]
    |> Card.view

Other elements of the page like the header aren't using elm-bootstrap package. It may have to do with that.

The whole code is available here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant