mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
feat: added new images
This commit is contained in:
parent
6763b6a860
commit
903c16efed
4 changed files with 79 additions and 86 deletions
|
@ -13,6 +13,7 @@ import Config.Helpers.Format
|
|||
import Config.Helpers.Headers.Helpers exposing (..)
|
||||
import Config.Helpers.Headers.Records exposing (interviewHeader)
|
||||
import Config.Helpers.Headers.Types as R exposing (..)
|
||||
import Config.Helpers.ImageFolders as M exposing (..)
|
||||
import Config.Helpers.Response
|
||||
exposing
|
||||
( pageList
|
||||
|
@ -36,6 +37,7 @@ import Config.Pages.Interviews.Records.SigmaNutritionRadio exposing (sigmaNutrit
|
|||
import Config.Pages.Interviews.Records.StrenuousLifePodcast exposing (strenuousLifePodcast)
|
||||
import Config.Pages.Interviews.Types exposing (..)
|
||||
import Config.Style.Colour exposing (colourTheme)
|
||||
import Config.Style.Images exposing (imageSquareMaker)
|
||||
import Config.Style.Transitions
|
||||
exposing
|
||||
( hoverFontDarkOrange
|
||||
|
@ -143,7 +145,7 @@ interviewList device =
|
|||
[ [ headerMaker (R.Interviews interviewHeader) ]
|
||||
, List.map
|
||||
(\interview ->
|
||||
cardMaker device (C.Interview interview) (contentList interview)
|
||||
cardMaker device (C.Interview interview) (contentList device interview)
|
||||
)
|
||||
[ sigmaNutritionRadio
|
||||
, markBellsPowerProject
|
||||
|
@ -158,10 +160,67 @@ interviewList device =
|
|||
]
|
||||
|
||||
|
||||
contentList : Interview -> List (Element msg)
|
||||
contentList interview =
|
||||
[ appearanceTitle interview
|
||||
, appearanceMaker interview
|
||||
contentList : Device -> Interview -> List (Element msg)
|
||||
contentList device interview =
|
||||
let
|
||||
image : String -> Element msg
|
||||
image size =
|
||||
el
|
||||
[ alignLeft
|
||||
, alignTop
|
||||
, paddingEach
|
||||
{ top = 0
|
||||
, right = 8
|
||||
, bottom = 0
|
||||
, left = 0
|
||||
}
|
||||
]
|
||||
<|
|
||||
imageSquareMaker device (imagePathMaker M.Interviews interview.interviewImage) True size
|
||||
in
|
||||
[ row
|
||||
[ paddingEach
|
||||
{ top = 3
|
||||
, right = 0
|
||||
, bottom = 0
|
||||
, left = 0
|
||||
}
|
||||
]
|
||||
[ case ( device.class, device.orientation ) of
|
||||
( Phone, Portrait ) ->
|
||||
image "Smallish"
|
||||
|
||||
( Tablet, Portrait ) ->
|
||||
image "Smallish"
|
||||
|
||||
_ ->
|
||||
image "Medium"
|
||||
, column
|
||||
[ width fill
|
||||
]
|
||||
[ socialMaker interview
|
||||
, appearanceTitle interview
|
||||
]
|
||||
]
|
||||
, el
|
||||
[ paddingEach
|
||||
{ top = 0
|
||||
, right = 0
|
||||
, bottom = 0
|
||||
, left =
|
||||
case ( device.class, device.orientation ) of
|
||||
( Phone, Portrait ) ->
|
||||
5
|
||||
|
||||
( Tablet, Portrait ) ->
|
||||
5
|
||||
|
||||
_ ->
|
||||
55
|
||||
}
|
||||
]
|
||||
<|
|
||||
appearanceMaker interview
|
||||
]
|
||||
|
||||
|
||||
|
@ -173,8 +232,7 @@ socialMaker interview =
|
|||
, F.bold
|
||||
, headerFontSizeSmall
|
||||
]
|
||||
[ text "Social: "
|
||||
, newTabLink
|
||||
[ newTabLink
|
||||
[ paragraphFontSize
|
||||
, F.color colourTheme.textLightOrange
|
||||
]
|
||||
|
@ -203,7 +261,7 @@ appearanceTitle interview =
|
|||
|
||||
appearanceMaker : Interview -> Element msg
|
||||
appearanceMaker interview =
|
||||
column [ spacing 15, width fill ] <|
|
||||
column [ spacing 10, width fill ] <|
|
||||
List.map2 (\x y -> makeAppearance x y)
|
||||
interview.interviewAppearances
|
||||
(List.range 1 (List.length interview.interviewAppearances))
|
||||
|
@ -218,12 +276,12 @@ makeAppearance appearanceEntry index =
|
|||
<|
|
||||
row
|
||||
[ E.width fill
|
||||
, spacing 5
|
||||
, spacing 3
|
||||
]
|
||||
[ el
|
||||
[ F.color colourTheme.textLightGrey
|
||||
, paragraphSpacing
|
||||
, headerFontSizeSmall
|
||||
, paragraphFontSize
|
||||
, F.bold
|
||||
, alignTop
|
||||
, F.alignRight
|
||||
|
@ -231,8 +289,8 @@ makeAppearance appearanceEntry index =
|
|||
<|
|
||||
text (String.fromInt index ++ ". ")
|
||||
, column
|
||||
[ spacing 8
|
||||
, width fill
|
||||
[ width fill
|
||||
, spacing 3
|
||||
]
|
||||
[ episodeMaker appearanceEntry
|
||||
, experienceMaker appearanceEntry
|
||||
|
@ -383,7 +441,7 @@ subjectMaker appearanceEntry =
|
|||
subjectList : Appearance -> Element msg
|
||||
subjectList appearanceEntry =
|
||||
column
|
||||
[ spacing 8
|
||||
[ spacing 5
|
||||
, width fill
|
||||
, paddingEach
|
||||
{ top = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue