module EqualHeightColumnsLayout exposing (..)
import Element exposing (..)
import Element.Border as Border
import Element.Font as Font
import Html exposing (Html)
sampleText =
"""
But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
"""
sampleText2 =
"""
No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.
"""
main : Html msg
main =
let
borderedColumn =
column
[ width fill
, height fill
, scrollbarY
, padding 5
, spacing 5
, Font.size 16
, Border.width 2
, Border.rounded 6
, Border.color color.blue
]
in
layout [ width fill, height fill ] <|
row [ width fill, height fill, padding 50, spacing 10 ]
[ borderedColumn
[ image [ width fill ]
{ src = "https://picsum.photos/200/200?grayscale"
, description = "An image"
}
, image [ width fill ]
{ src = "https://picsum.photos/200/150?grayscale"
, description = "An image"
}
]
, borderedColumn
[ paragraph [] [ text sampleText ] ]
, borderedColumn
[ el [ Font.size 28, height <| px 50 ] <| text "Heading"
, paragraph [] [ text sampleText2 ]
]
]
color =
{ blue = rgb255 0x72 0x9F 0xCF
, darkCharcoal = rgb255 0x2E 0x34 0x36
, lightBlue = rgb255 0xC5 0xE8 0xF7
, lightGrey = rgb255 0xE0 0xE0 0xE0
, white = rgb255 0xFF 0xFF 0xFF
}