mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-15 20:15:12 -05:00
feat: added article
This commit is contained in:
parent
931ef1b06b
commit
cf9caa1a66
1 changed files with 26 additions and 14 deletions
|
@ -38,10 +38,19 @@ articleImage pic =
|
|||
, width fill
|
||||
]
|
||||
<|
|
||||
image
|
||||
[ width fill
|
||||
column
|
||||
[ E.paddingEach
|
||||
{ top = 20
|
||||
, bottom = 20
|
||||
, left = 20
|
||||
, right = 20
|
||||
}
|
||||
]
|
||||
[ image
|
||||
[ width fill
|
||||
]
|
||||
{ src = "/blog/" ++ pic ++ ".png", description = "" }
|
||||
]
|
||||
{ src = "/blog/" ++ pic ++ ".png", description = "" }
|
||||
|
||||
|
||||
renderDeviceMarkdown : String -> Element msg
|
||||
|
@ -51,13 +60,7 @@ renderDeviceMarkdown markdown =
|
|||
column
|
||||
[ width fill
|
||||
, centerX
|
||||
, spacing 8
|
||||
, paddingEach
|
||||
{ top = 10
|
||||
, bottom = 0
|
||||
, left = 0
|
||||
, right = 0
|
||||
}
|
||||
, spacing 10
|
||||
]
|
||||
renderedMarkdown
|
||||
|
||||
|
@ -138,14 +141,23 @@ elmUiRenderer =
|
|||
]
|
||||
|
||||
Nothing ->
|
||||
el [] <|
|
||||
el
|
||||
[ width fill ]
|
||||
<|
|
||||
column
|
||||
[ width fill
|
||||
, E.centerX
|
||||
[ E.centerX
|
||||
, E.centerY
|
||||
, width fill
|
||||
, E.paddingEach
|
||||
{ top = 0
|
||||
, bottom = 10
|
||||
, left = 10
|
||||
, right = 10
|
||||
}
|
||||
]
|
||||
[ E.image
|
||||
[ E.centerX
|
||||
, width <| px 600
|
||||
, width (fill |> maximum 600)
|
||||
]
|
||||
{ src = image.src
|
||||
, description = image.alt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue