mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-08-10 04:14:38 -05:00
feat: added new images
This commit is contained in:
parent
b1a190d9ad
commit
6763b6a860
11 changed files with 332 additions and 157 deletions
|
@ -36,16 +36,14 @@ bodyFormat =
|
|||
|
||||
chunkMaker : List (Element msg) -> Element msg
|
||||
chunkMaker elements =
|
||||
row [ alignLeft, spacing 10 ]
|
||||
[ paragraph
|
||||
[ F.color colourTheme.textLightGrey
|
||||
, paragraphSpacing
|
||||
, paragraphFontSize
|
||||
, F.alignLeft
|
||||
, width fill
|
||||
]
|
||||
elements
|
||||
paragraph
|
||||
[ F.color colourTheme.textLightGrey
|
||||
, paragraphSpacing
|
||||
, paragraphFontSize
|
||||
, F.alignLeft
|
||||
, width fill
|
||||
]
|
||||
elements
|
||||
|
||||
|
||||
titleMaker : String -> Element msg
|
||||
|
|
41
frontend/src/Config/Style/Images.elm
Normal file
41
frontend/src/Config/Style/Images.elm
Normal file
|
@ -0,0 +1,41 @@
|
|||
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
|
||||
|
||||
_ ->
|
||||
35
|
Loading…
Add table
Add a link
Reference in a new issue