2024-12-24 03:08:39 -06:00
|
|
|
module Config.Style.Images exposing (..)
|
|
|
|
|
|
|
|
import Config.Helpers.ImageFolders exposing (..)
|
|
|
|
import Config.Style.Colour exposing (colourTheme)
|
|
|
|
import Element as E exposing (..)
|
|
|
|
import Element.Background as B exposing (color)
|
|
|
|
import Element.Border as D
|
|
|
|
exposing
|
|
|
|
( color
|
|
|
|
, rounded
|
|
|
|
, width
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
imageSquareMaker : Device -> String -> Bool -> String -> Element msg
|
|
|
|
imageSquareMaker device imagePath isLeft size =
|
|
|
|
E.image
|
|
|
|
[ D.rounded 10
|
|
|
|
, clip
|
|
|
|
, E.width <| px (imageSizer size)
|
|
|
|
, E.height <| px (imageSizer size)
|
|
|
|
]
|
|
|
|
{ src = imagePath
|
|
|
|
, description = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
imageSizer : String -> Int
|
|
|
|
imageSizer size =
|
|
|
|
case size of
|
|
|
|
"Fatty" ->
|
|
|
|
80
|
|
|
|
|
|
|
|
"Big" ->
|
|
|
|
65
|
|
|
|
|
|
|
|
"Medium" ->
|
|
|
|
45
|
|
|
|
|
2024-12-24 03:51:55 -06:00
|
|
|
"Smallish" ->
|
2024-12-24 03:08:39 -06:00
|
|
|
35
|
2024-12-24 03:51:55 -06:00
|
|
|
|
|
|
|
_ ->
|
|
|
|
28
|