mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
feat: refactored and added some stuff
This commit is contained in:
parent
7b8faede8d
commit
9f1a7fe872
17 changed files with 798 additions and 707 deletions
607
Navbar.elm
607
Navbar.elm
|
@ -1,607 +0,0 @@
|
||||||
module Layouts.Navbar exposing (Model, Msg, Props, layout)
|
|
||||||
|
|
||||||
import Config.Data.Identity exposing (..)
|
|
||||||
import Config.Helpers.Format
|
|
||||||
exposing
|
|
||||||
( paragraphFontSize
|
|
||||||
, paragraphSpacing
|
|
||||||
)
|
|
||||||
import Config.Style.Colour exposing (colourTheme)
|
|
||||||
import Config.Style.Fonts exposing (spartanFont)
|
|
||||||
import Config.Style.Glow exposing (glowDeepDarkGreyNavbar)
|
|
||||||
import Config.Style.Icons.Icons
|
|
||||||
exposing
|
|
||||||
( contact
|
|
||||||
, debate
|
|
||||||
, discord
|
|
||||||
, donate
|
|
||||||
, gitlab
|
|
||||||
, home
|
|
||||||
, hyperBlog
|
|
||||||
, interviews
|
|
||||||
, mastodon
|
|
||||||
, nutriDex
|
|
||||||
, services
|
|
||||||
, twitter
|
|
||||||
, upRootLarge
|
|
||||||
, upRootMedium
|
|
||||||
, upRootSmall
|
|
||||||
)
|
|
||||||
import Config.Style.Transitions
|
|
||||||
exposing
|
|
||||||
( hoverFontLightOrange
|
|
||||||
, transitionStyleMedium
|
|
||||||
)
|
|
||||||
import Effect exposing (Effect)
|
|
||||||
import Element as E exposing (..)
|
|
||||||
import Element.Background as B
|
|
||||||
import Element.Border as D
|
|
||||||
import Element.Events as Events
|
|
||||||
import Element.Font as F
|
|
||||||
import Element.Region exposing (description)
|
|
||||||
import Html exposing (Html)
|
|
||||||
import Html.Attributes as H
|
|
||||||
exposing
|
|
||||||
( class
|
|
||||||
, style
|
|
||||||
)
|
|
||||||
import Layout exposing (Layout)
|
|
||||||
import Route exposing (Route)
|
|
||||||
import Route.Path as Path
|
|
||||||
import Shared
|
|
||||||
import View exposing (View)
|
|
||||||
|
|
||||||
|
|
||||||
type alias Props =
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
layout : Props -> Shared.Model -> Route () -> Layout () Model Msg contentMsg
|
|
||||||
layout props shared route =
|
|
||||||
Layout.new
|
|
||||||
{ init = init
|
|
||||||
, update = update
|
|
||||||
, view =
|
|
||||||
\layoutArgs ->
|
|
||||||
view route
|
|
||||||
shared
|
|
||||||
{ props = props
|
|
||||||
, content = layoutArgs.content
|
|
||||||
, model = layoutArgs.model
|
|
||||||
, toContentMsg = layoutArgs.toContentMsg
|
|
||||||
}
|
|
||||||
, subscriptions = subscriptions
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- MODEL
|
|
||||||
|
|
||||||
|
|
||||||
type alias Model =
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
init : () -> ( Model, Effect Msg )
|
|
||||||
init _ =
|
|
||||||
( {}
|
|
||||||
, Effect.none
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- UPDATE
|
|
||||||
|
|
||||||
|
|
||||||
type Msg
|
|
||||||
= ReplaceMe
|
|
||||||
|
|
||||||
|
|
||||||
update : Msg -> Model -> ( Model, Effect Msg )
|
|
||||||
update msg model =
|
|
||||||
case msg of
|
|
||||||
ReplaceMe ->
|
|
||||||
( model
|
|
||||||
, Effect.none
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
subscriptions : Model -> Sub Msg
|
|
||||||
subscriptions model =
|
|
||||||
Sub.none
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- VIEW
|
|
||||||
|
|
||||||
|
|
||||||
view :
|
|
||||||
Route ()
|
|
||||||
-> Shared.Model
|
|
||||||
->
|
|
||||||
{ content : View contentMsg
|
|
||||||
, model : Model
|
|
||||||
, toContentMsg : Msg -> contentMsg
|
|
||||||
, props : Props
|
|
||||||
}
|
|
||||||
-> View contentMsg
|
|
||||||
view route shared { content, model, toContentMsg, props } =
|
|
||||||
{ title = "uRN :: " ++ content.title
|
|
||||||
, attributes = [ F.family [ spartanFont ] ]
|
|
||||||
, element = navbarContainer route shared.device content.element
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
navbarContainer : Route () -> Device -> Element msg -> Element msg
|
|
||||||
navbarContainer route device content =
|
|
||||||
row
|
|
||||||
[ E.width fill
|
|
||||||
, height fill
|
|
||||||
, B.color colourTheme.backgroundDarkGrey
|
|
||||||
, E.height E.fill
|
|
||||||
]
|
|
||||||
[ column
|
|
||||||
[ htmlAttribute (H.style "position" "fixed")
|
|
||||||
, htmlAttribute (H.style "left" "0")
|
|
||||||
, htmlAttribute (H.style "top" "0")
|
|
||||||
, htmlAttribute (H.style "height" "100vh")
|
|
||||||
, htmlAttribute (H.style "z-index" "10")
|
|
||||||
, htmlAttribute (H.style "transform-style" "preserve-3d")
|
|
||||||
, D.widthEach { top = 0, bottom = 0, left = 0, right = 3 }
|
|
||||||
, D.color colourTheme.textDarkOrange
|
|
||||||
, B.color colourTheme.backgroundDarkGrey
|
|
||||||
, glowDeepDarkGreyNavbar
|
|
||||||
, spacing 3
|
|
||||||
]
|
|
||||||
(case ( device.class, device.orientation ) of
|
|
||||||
( Phone, Portrait ) ->
|
|
||||||
[ mobileIconMaker, mobileNavbar, mobileFooterIcons ]
|
|
||||||
|
|
||||||
( Phone, Landscape ) ->
|
|
||||||
[ mobileIconMaker, mobileNavbar, mobileFooterIcons ]
|
|
||||||
|
|
||||||
( Tablet, Portrait ) ->
|
|
||||||
[ mobileIconMaker, mobileNavbar, mobileFooterIcons ]
|
|
||||||
|
|
||||||
_ ->
|
|
||||||
[ desktopIconMaker, desktopNavbar route, desktopFooterIcons ]
|
|
||||||
)
|
|
||||||
, el
|
|
||||||
[ E.width fill
|
|
||||||
, height fill
|
|
||||||
, paddingEach
|
|
||||||
{ top = 0
|
|
||||||
, right = 0
|
|
||||||
, bottom = 0
|
|
||||||
, left =
|
|
||||||
case ( device.class, device.orientation ) of
|
|
||||||
( Phone, _ ) ->
|
|
||||||
mobileBarWidth
|
|
||||||
|
|
||||||
( Tablet, Portrait ) ->
|
|
||||||
mobileBarWidth
|
|
||||||
|
|
||||||
_ ->
|
|
||||||
desktopBarWidth
|
|
||||||
}
|
|
||||||
]
|
|
||||||
content
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
desktopBarWidth : Int
|
|
||||||
desktopBarWidth =
|
|
||||||
200
|
|
||||||
|
|
||||||
|
|
||||||
mobileBarWidth : Int
|
|
||||||
mobileBarWidth =
|
|
||||||
50
|
|
||||||
|
|
||||||
|
|
||||||
localhostUrl : String
|
|
||||||
localhostUrl =
|
|
||||||
url
|
|
||||||
|
|
||||||
|
|
||||||
desktopNavbar : Route () -> Element msg
|
|
||||||
desktopNavbar route =
|
|
||||||
column
|
|
||||||
[ alignLeft
|
|
||||||
, height fill
|
|
||||||
, F.color colourTheme.textLightGrey
|
|
||||||
, scrollbarY
|
|
||||||
]
|
|
||||||
[ column
|
|
||||||
[ padding 20, alignTop, alignLeft ]
|
|
||||||
[ column
|
|
||||||
[ F.bold
|
|
||||||
, F.color colourTheme.textLightGrey
|
|
||||||
, F.size 17
|
|
||||||
, spacing 10
|
|
||||||
, paddingEach
|
|
||||||
{ top = 0
|
|
||||||
, right = 0
|
|
||||||
, bottom = 0
|
|
||||||
, left = 10
|
|
||||||
}
|
|
||||||
]
|
|
||||||
(List.map2 (desktopButtonMaker route)
|
|
||||||
pageList
|
|
||||||
iconList
|
|
||||||
)
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
desktopIconMaker : Element msg
|
|
||||||
desktopIconMaker =
|
|
||||||
column
|
|
||||||
[ centerX
|
|
||||||
, E.width <| px desktopBarWidth
|
|
||||||
]
|
|
||||||
[ row
|
|
||||||
[ centerX
|
|
||||||
, spacing 2
|
|
||||||
, E.width <| px 140
|
|
||||||
, centerX
|
|
||||||
, paddingEach
|
|
||||||
{ top = 20
|
|
||||||
, right = 0
|
|
||||||
, bottom = 20
|
|
||||||
, left = 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
[ html upRootMedium
|
|
||||||
]
|
|
||||||
, el
|
|
||||||
[ E.width <| px 140
|
|
||||||
, alignTop
|
|
||||||
, centerX
|
|
||||||
, D.widthEach
|
|
||||||
{ bottom = 1
|
|
||||||
, top = 0
|
|
||||||
, left = 0
|
|
||||||
, right = 0
|
|
||||||
}
|
|
||||||
, D.color colourTheme.textDarkGrey
|
|
||||||
]
|
|
||||||
none
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
mobileIconMaker : Element msg
|
|
||||||
mobileIconMaker =
|
|
||||||
column
|
|
||||||
[ centerX
|
|
||||||
, E.width <| px mobileBarWidth
|
|
||||||
]
|
|
||||||
[ row
|
|
||||||
[ centerX
|
|
||||||
, spacing 2
|
|
||||||
, E.width <| px 35
|
|
||||||
, centerX
|
|
||||||
, paddingEach
|
|
||||||
{ top = 10
|
|
||||||
, right = 0
|
|
||||||
, bottom = 10
|
|
||||||
, left = 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
[ html upRootSmall
|
|
||||||
]
|
|
||||||
, el
|
|
||||||
[ E.width <| px 20
|
|
||||||
, alignTop
|
|
||||||
, centerX
|
|
||||||
, D.widthEach
|
|
||||||
{ bottom = 1
|
|
||||||
, top = 0
|
|
||||||
, left = 0
|
|
||||||
, right = 0
|
|
||||||
}
|
|
||||||
, D.color colourTheme.textDarkGrey
|
|
||||||
]
|
|
||||||
none
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
mobileNavbar : Element msg
|
|
||||||
mobileNavbar =
|
|
||||||
column
|
|
||||||
[ height fill
|
|
||||||
, E.width fill
|
|
||||||
, F.color colourTheme.textLightGrey
|
|
||||||
, scrollbarY
|
|
||||||
]
|
|
||||||
[ column
|
|
||||||
[ padding 5
|
|
||||||
, alignTop
|
|
||||||
, centerX
|
|
||||||
]
|
|
||||||
[ column
|
|
||||||
[ spacing 8
|
|
||||||
, centerX
|
|
||||||
]
|
|
||||||
(List.map2 mobileButtonMaker
|
|
||||||
pageList
|
|
||||||
iconList
|
|
||||||
)
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
desktopBackground : Element msg -> Element msg
|
|
||||||
desktopBackground =
|
|
||||||
el
|
|
||||||
[ E.width fill
|
|
||||||
, height fill
|
|
||||||
, paddingEach
|
|
||||||
{ top = 0
|
|
||||||
, right = 0
|
|
||||||
, bottom = 0
|
|
||||||
, left = desktopBarWidth
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
mobileBackground : Element msg -> Element msg
|
|
||||||
mobileBackground =
|
|
||||||
el
|
|
||||||
[ E.width fill
|
|
||||||
, height fill
|
|
||||||
, paddingEach
|
|
||||||
{ top = 0
|
|
||||||
, right = 0
|
|
||||||
, bottom = 0
|
|
||||||
, left = mobileBarWidth
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
desktopButtonMaker : Route () -> String -> Html msg -> Element msg
|
|
||||||
desktopButtonMaker route name icon =
|
|
||||||
link
|
|
||||||
[ E.width fill ]
|
|
||||||
{ url =
|
|
||||||
if name == "Home" then
|
|
||||||
localhostUrl
|
|
||||||
|
|
||||||
else
|
|
||||||
localhostUrl ++ String.toLower name
|
|
||||||
, label =
|
|
||||||
row
|
|
||||||
[ spacing 0, height <| px 30 ]
|
|
||||||
[ el
|
|
||||||
[ E.width <| px 35
|
|
||||||
, paddingEach
|
|
||||||
{ top = 0
|
|
||||||
, right = 10
|
|
||||||
, bottom = 0
|
|
||||||
, left = 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<|
|
|
||||||
html icon
|
|
||||||
, el
|
|
||||||
((if route.path == Path.Blog then
|
|
||||||
F.color colourTheme.textLightOrange
|
|
||||||
|
|
||||||
else
|
|
||||||
F.color colourTheme.textLightGrey
|
|
||||||
)
|
|
||||||
:: [ transitionStyleMedium
|
|
||||||
, alignBottom
|
|
||||||
]
|
|
||||||
)
|
|
||||||
<|
|
|
||||||
text <|
|
|
||||||
String.toUpper name
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
mobileButtonMaker : String -> Html msg -> Element msg
|
|
||||||
mobileButtonMaker name icon =
|
|
||||||
link
|
|
||||||
[]
|
|
||||||
{ url = localhostUrl ++ String.toLower name
|
|
||||||
, label =
|
|
||||||
row
|
|
||||||
[ spacing 10 ]
|
|
||||||
[ column
|
|
||||||
[ E.width <| px 20
|
|
||||||
]
|
|
||||||
[ html icon
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
iconList : List (Html msg)
|
|
||||||
iconList =
|
|
||||||
[ home
|
|
||||||
, services
|
|
||||||
, hyperBlog
|
|
||||||
, debate
|
|
||||||
, nutriDex
|
|
||||||
, interviews
|
|
||||||
, donate
|
|
||||||
, contact
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
pageList : List String
|
|
||||||
pageList =
|
|
||||||
[ "Home"
|
|
||||||
, "Services"
|
|
||||||
, "HyperBlog"
|
|
||||||
, "Debate"
|
|
||||||
, "NutriDex"
|
|
||||||
, "Interviews"
|
|
||||||
, "Donate"
|
|
||||||
, "Contact"
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
desktopFooterIcons : Element msg
|
|
||||||
desktopFooterIcons =
|
|
||||||
column
|
|
||||||
[ E.width <| px 140
|
|
||||||
, alignTop
|
|
||||||
, centerX
|
|
||||||
, D.widthEach
|
|
||||||
{ bottom = 0
|
|
||||||
, top = 1
|
|
||||||
, left = 0
|
|
||||||
, right = 0
|
|
||||||
}
|
|
||||||
, D.color colourTheme.textDarkGrey
|
|
||||||
]
|
|
||||||
[ row
|
|
||||||
[ alignBottom
|
|
||||||
, E.width fill
|
|
||||||
, centerX
|
|
||||||
]
|
|
||||||
[ row
|
|
||||||
[ centerX
|
|
||||||
, centerY
|
|
||||||
, E.width fill
|
|
||||||
, E.height fill
|
|
||||||
, spacing 20
|
|
||||||
, paddingEach
|
|
||||||
{ top = 25
|
|
||||||
, bottom = 25
|
|
||||||
, left = 0
|
|
||||||
, right = 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
(List.map2
|
|
||||||
desktopFooterImageMaker
|
|
||||||
[ gitlabDetails
|
|
||||||
, twitterDetails
|
|
||||||
, mastodonDetails
|
|
||||||
, discordDetails
|
|
||||||
]
|
|
||||||
footerIconList
|
|
||||||
)
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
mobileFooterIcons : Element msg
|
|
||||||
mobileFooterIcons =
|
|
||||||
column
|
|
||||||
[ E.width <| px 20
|
|
||||||
, alignTop
|
|
||||||
, centerX
|
|
||||||
, D.widthEach
|
|
||||||
{ bottom = 0
|
|
||||||
, top = 1
|
|
||||||
, left = 0
|
|
||||||
, right = 0
|
|
||||||
}
|
|
||||||
, D.color colourTheme.textDarkGrey
|
|
||||||
]
|
|
||||||
[ column
|
|
||||||
[ alignBottom
|
|
||||||
, E.width fill
|
|
||||||
]
|
|
||||||
[ column
|
|
||||||
[ centerX
|
|
||||||
, centerY
|
|
||||||
, E.width fill
|
|
||||||
, E.height fill
|
|
||||||
, spacing 10
|
|
||||||
, paddingEach
|
|
||||||
{ top = 10
|
|
||||||
, bottom = 10
|
|
||||||
, left = 0
|
|
||||||
, right = 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
(List.map2
|
|
||||||
mobileFooterImageMaker
|
|
||||||
[ gitlabDetails
|
|
||||||
, twitterDetails
|
|
||||||
, mastodonDetails
|
|
||||||
, discordDetails
|
|
||||||
]
|
|
||||||
footerIconList
|
|
||||||
)
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
desktopFooterImageMaker :
|
|
||||||
{ name : String
|
|
||||||
, url : String
|
|
||||||
}
|
|
||||||
-> Html msg
|
|
||||||
-> Element msg
|
|
||||||
desktopFooterImageMaker config icon =
|
|
||||||
column [ centerX ]
|
|
||||||
[ newTabLink []
|
|
||||||
{ url = config.url
|
|
||||||
, label =
|
|
||||||
row
|
|
||||||
[ E.width <| px 20 ]
|
|
||||||
[ html icon
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
mobileFooterImageMaker :
|
|
||||||
{ name : String
|
|
||||||
, url : String
|
|
||||||
}
|
|
||||||
-> Html msg
|
|
||||||
-> Element msg
|
|
||||||
mobileFooterImageMaker config icon =
|
|
||||||
column [ centerX ]
|
|
||||||
[ newTabLink []
|
|
||||||
{ url = config.url
|
|
||||||
, label =
|
|
||||||
row
|
|
||||||
[ E.width <| px 15 ]
|
|
||||||
[ html icon
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
gitlabDetails : { name : String, url : String }
|
|
||||||
gitlabDetails =
|
|
||||||
{ name = "gitlab"
|
|
||||||
, url = "https://gitlab.com/upRootNutrition/website"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
twitterDetails : { name : String, url : String }
|
|
||||||
twitterDetails =
|
|
||||||
{ name = "twitter"
|
|
||||||
, url = "https://x.com/upRootNutrition"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
mastodonDetails : { name : String, url : String }
|
|
||||||
mastodonDetails =
|
|
||||||
{ name = "mastodon"
|
|
||||||
, url = "https://social.uprootnutrition.com/@nick"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
discordDetails : { name : String, url : String }
|
|
||||||
discordDetails =
|
|
||||||
{ name = "discord"
|
|
||||||
, url = "https://discord.com/invite/YrcEvgRTqy"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
footerIconList =
|
|
||||||
[ gitlab
|
|
||||||
, twitter
|
|
||||||
, mastodon
|
|
||||||
, discord
|
|
||||||
]
|
|
|
@ -33,21 +33,18 @@ bodyFormat =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
chunkMaker : List String -> Element msg
|
chunkMaker : List (Element msg) -> Element msg
|
||||||
chunkMaker items =
|
chunkMaker elements =
|
||||||
column [ alignLeft, spacing 10 ] <|
|
row [ alignLeft, spacing 10 ]
|
||||||
List.map
|
[ paragraph
|
||||||
(\item ->
|
[ F.color colourTheme.textLightGrey
|
||||||
paragraph
|
, paragraphSpacing
|
||||||
[ F.color colourTheme.textLightGrey
|
, paragraphFontSize
|
||||||
, paragraphSpacing
|
, F.alignLeft
|
||||||
, paragraphFontSize
|
, width fill
|
||||||
, F.alignLeft
|
]
|
||||||
, width fill
|
elements
|
||||||
]
|
]
|
||||||
[ text item ]
|
|
||||||
)
|
|
||||||
items
|
|
||||||
|
|
||||||
|
|
||||||
titleMaker : String -> Element msg
|
titleMaker : String -> Element msg
|
||||||
|
@ -160,12 +157,12 @@ bulletPointMaker items =
|
||||||
, F.size 16
|
, F.size 16
|
||||||
, F.alignLeft
|
, F.alignLeft
|
||||||
]
|
]
|
||||||
[ row
|
[ el
|
||||||
[ alignLeft ]
|
[ alignLeft ]
|
||||||
[ paragraph [ alignLeft ]
|
<|
|
||||||
|
paragraph [ alignLeft ]
|
||||||
[ text item
|
[ text item
|
||||||
]
|
]
|
||||||
]
|
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -186,7 +183,11 @@ numberMaker items =
|
||||||
[ width <| px 30
|
[ width <| px 30
|
||||||
, alignTop
|
, alignTop
|
||||||
]
|
]
|
||||||
[ el [ alignRight ] <| text (String.fromInt (index + 1) ++ ". ") ]
|
[ el
|
||||||
|
[ alignRight ]
|
||||||
|
<|
|
||||||
|
text (String.fromInt (index + 1) ++ ". ")
|
||||||
|
]
|
||||||
, column
|
, column
|
||||||
[ spacing 10
|
[ spacing 10
|
||||||
, width fill
|
, width fill
|
||||||
|
@ -197,12 +198,12 @@ numberMaker items =
|
||||||
, F.size 16
|
, F.size 16
|
||||||
, F.alignLeft
|
, F.alignLeft
|
||||||
]
|
]
|
||||||
[ row
|
[ el
|
||||||
[ alignLeft ]
|
[ alignLeft ]
|
||||||
[ paragraph [ alignLeft ]
|
<|
|
||||||
|
paragraph [ alignLeft ]
|
||||||
[ text item
|
[ text item
|
||||||
]
|
]
|
||||||
]
|
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
module Config.Helpers.Format exposing (..)
|
module Config.Helpers.Format exposing (..)
|
||||||
|
|
||||||
|
import Config.Style.Colour exposing (..)
|
||||||
import Element exposing (..)
|
import Element exposing (..)
|
||||||
import Element.Font as F
|
import Element.Font as F
|
||||||
|
|
||||||
|
|
||||||
paragraphFontSize : Attr decorative msg
|
paragraphFontSize : Attr decorative msg
|
||||||
paragraphFontSize =
|
paragraphFontSize =
|
||||||
F.size 16
|
F.size 16
|
||||||
|
@ -11,3 +13,14 @@ paragraphFontSize =
|
||||||
paragraphSpacing : Attribute msg
|
paragraphSpacing : Attribute msg
|
||||||
paragraphSpacing =
|
paragraphSpacing =
|
||||||
spacing 3
|
spacing 3
|
||||||
|
|
||||||
|
|
||||||
|
renderCodeLine : SyntaxColors -> List (Element msg) -> Element msg
|
||||||
|
renderCodeLine colors elements =
|
||||||
|
paragraph
|
||||||
|
[ F.color colors.text
|
||||||
|
, F.alignLeft
|
||||||
|
, F.family
|
||||||
|
[ F.monospace ]
|
||||||
|
]
|
||||||
|
elements
|
||||||
|
|
|
@ -10,7 +10,6 @@ argumentAnimalRights =
|
||||||
, propositionReductio = ""
|
, propositionReductio = ""
|
||||||
, propositionSummary = "I view animal rights as the logical extension of trait-adjusted human rights to non-human animals. As such, if one wants to deny that animals should be given these trait-adjusted rights, they'll have to name a trait that accounts for the differential normative evaluation. Typically this is done by rejecting P3 and saying something retarded."
|
, propositionSummary = "I view animal rights as the logical extension of trait-adjusted human rights to non-human animals. As such, if one wants to deny that animals should be given these trait-adjusted rights, they'll have to name a trait that accounts for the differential normative evaluation. Typically this is done by rejecting P3 and saying something retarded."
|
||||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5~3Qx)),(~3Pa~5~7t(Rta~5(Rth~5~3Ph))),(~3~7t(Rta~5(Rth~5~3Ph))),(Pa)|=(~3Qa)"
|
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5~3Qx)),(~3Pa~5~7t(Rta~5(Rth~5~3Ph))),(~3~7t(Rta~5(Rth~5~3Ph))),(Pa)|=(~3Qa)"
|
||||||
|
|
||||||
, argumentCertainty = 10
|
, argumentCertainty = 10
|
||||||
, argumentImage = "animalrights"
|
, argumentImage = "animalrights"
|
||||||
, argumentHashtags = []
|
, argumentHashtags = []
|
||||||
|
@ -19,9 +18,9 @@ argumentAnimalRights =
|
||||||
, definiens = "(x) has moral worth"
|
, definiens = "(x) has moral worth"
|
||||||
}
|
}
|
||||||
, { definiendum = "Q(x)"
|
, { definiendum = "Q(x)"
|
||||||
, definiens = "we should exploit (x) to any greater degree than we would tolerate for humans"
|
, definiens = "we should exploit (x) to any greater degree than we would tolerate for trait-adjusted humans"
|
||||||
}
|
}
|
||||||
, { definiendum = "R(t,x)"
|
, { definiendum = "R(t,x)"
|
||||||
, definiens = "there exists a (t) that is absent in (x)"
|
, definiens = "there exists a (t) that is absent in (x)"
|
||||||
}
|
}
|
||||||
, { definiendum = "x"
|
, { definiendum = "x"
|
||||||
|
@ -39,17 +38,17 @@ argumentAnimalRights =
|
||||||
]
|
]
|
||||||
, argumentFormalization =
|
, argumentFormalization =
|
||||||
[ { premises =
|
[ { premises =
|
||||||
[ { premise = "For all things, if a being has moral worth, then we should not exploit it to any greater degree than we would tolerate for humans."
|
[ { premise = "For all things, if a being has moral worth, then we should not exploit it to any greater degree than we would tolerate for trait-adjusted humans."
|
||||||
, notation = "∀x(Px→¬Qx)"
|
, notation = "∀x(Px→¬Qx)"
|
||||||
}
|
}
|
||||||
, { premise = "If animals don’t have moral worth, then there exists a trait that is absent in animals such that if it were absent in humans, humans wouldn’t have moral worth."
|
, { premise = "If animals don’t have moral worth, then there exists a trait that is absent in animals such that if it were absent in humans, humans wouldn’t have moral worth."
|
||||||
, notation = "¬Pa→∃t(Rta→(Rth→¬Ph))"
|
, notation = "¬Pa→∃t(Rta→(Rth→¬Ph))"
|
||||||
}
|
}
|
||||||
, { premise = "There doesn’t exist a trait that is absent in animals such that if it were absent in humans, humans wouldn’t have moral worth"
|
, { premise = "There doesn’t exist a trait that is absent in animals such that if it were absent in humans, humans wouldn’t have moral worth."
|
||||||
, notation = "¬∃t(Rta→(Rth→¬Ph))"
|
, notation = "¬∃t(Rta→(Rth→¬Ph))"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
, conclusion = "Therefore, we should not exploit animals to any greater degree than we would tolerate for humans."
|
, conclusion = "Therefore, we should not exploit animals to any greater degree than we would tolerate for trait-adjusted humans."
|
||||||
, conclusionNotation = "¬Qa"
|
, conclusionNotation = "¬Qa"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -15,7 +15,7 @@ import Element.Border as D
|
||||||
import Element.Font as F
|
import Element.Font as F
|
||||||
|
|
||||||
|
|
||||||
serviceMaker : Service -> Element msg
|
serviceMaker : Service msg -> Element msg
|
||||||
serviceMaker service =
|
serviceMaker service =
|
||||||
row
|
row
|
||||||
topLevelBox
|
topLevelBox
|
||||||
|
@ -36,7 +36,7 @@ serviceMaker service =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
serviceMakerMobile : Service -> Element msg
|
serviceMakerMobile : Service msg -> Element msg
|
||||||
serviceMakerMobile service =
|
serviceMakerMobile service =
|
||||||
row
|
row
|
||||||
topLevelBox
|
topLevelBox
|
||||||
|
@ -57,7 +57,7 @@ serviceMakerMobile service =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
serviceImage : Service -> { src : String, description : String }
|
serviceImage : Service msg -> { src : String, description : String }
|
||||||
serviceImage service =
|
serviceImage service =
|
||||||
{ src = "services/" ++ service.serviceImage ++ ".png"
|
{ src = "services/" ++ service.serviceImage ++ ".png"
|
||||||
, description = service.serviceName
|
, description = service.serviceName
|
||||||
|
@ -68,7 +68,7 @@ serviceWidth =
|
||||||
width <| px 45
|
width <| px 45
|
||||||
|
|
||||||
|
|
||||||
rateMaker : Service -> Element msg
|
rateMaker : Service msg -> Element msg
|
||||||
rateMaker service =
|
rateMaker service =
|
||||||
row
|
row
|
||||||
([ F.color colourTheme.textLightGrey
|
([ F.color colourTheme.textLightGrey
|
||||||
|
@ -98,7 +98,7 @@ rateMaker service =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
descriptionMaker : Service -> Element msg
|
descriptionMaker : Service msg -> Element msg
|
||||||
descriptionMaker service =
|
descriptionMaker service =
|
||||||
row
|
row
|
||||||
[ F.color colourTheme.textLightGrey
|
[ F.color colourTheme.textLightGrey
|
||||||
|
@ -115,7 +115,7 @@ descriptionMaker service =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
offeringMaker : Service -> Element msg
|
offeringMaker : Service msg -> Element msg
|
||||||
offeringMaker service =
|
offeringMaker service =
|
||||||
column
|
column
|
||||||
[ spacing 8
|
[ spacing 8
|
||||||
|
|
|
@ -2,10 +2,11 @@ module Config.Pages.Services.Services.DebateAnalysis exposing (..)
|
||||||
|
|
||||||
import Config.Helpers.Converters exposing (formatName)
|
import Config.Helpers.Converters exposing (formatName)
|
||||||
import Config.Pages.Services.Types exposing (..)
|
import Config.Pages.Services.Types exposing (..)
|
||||||
|
import Element as E exposing (..)
|
||||||
import Route.Path as Path
|
import Route.Path as Path
|
||||||
|
|
||||||
|
|
||||||
servicesDebateAnalysis : Service
|
servicesDebateAnalysis : Service msg
|
||||||
servicesDebateAnalysis =
|
servicesDebateAnalysis =
|
||||||
let
|
let
|
||||||
name : String
|
name : String
|
||||||
|
@ -36,8 +37,11 @@ servicesDebateAnalysis =
|
||||||
, title10 = ""
|
, title10 = ""
|
||||||
}
|
}
|
||||||
, articleParagraph =
|
, articleParagraph =
|
||||||
[ "The Debate Analysis services offers personalized feedback to help you improve your debate skills. I work with clients by reviewing their pre-recorded debates, providing detailed critiques, and offering practical advice tailored to their style. Through this process, you'll gain valuable insights into areas of improvement, from your argument structure to your delivery and confidence."
|
{ paragraph1 = [ text "The Debate Analysis services offers personalized feedback to help you improve your debate skills. I work with clients by reviewing their pre-recorded debates, providing detailed critiques, and offering practical advice tailored to their style. Through this process, you'll gain valuable insights into areas of improvement, from your argument structure to your delivery and confidence." ]
|
||||||
]
|
, paragraph2 = []
|
||||||
|
, paragraph3 = []
|
||||||
|
, paragraph4 = []
|
||||||
|
}
|
||||||
, articleListEntries =
|
, articleListEntries =
|
||||||
{ list1 =
|
{ list1 =
|
||||||
[ "Have your own debates analyzed for constructive feedback. This allows you to receive targeted guidance on how to improve your debating technique and strategy."
|
[ "Have your own debates analyzed for constructive feedback. This allows you to receive targeted guidance on how to improve your debating technique and strategy."
|
||||||
|
|
|
@ -2,10 +2,11 @@ module Config.Pages.Services.Services.DebateCoaching exposing (..)
|
||||||
|
|
||||||
import Config.Helpers.Converters exposing (formatName)
|
import Config.Helpers.Converters exposing (formatName)
|
||||||
import Config.Pages.Services.Types exposing (..)
|
import Config.Pages.Services.Types exposing (..)
|
||||||
|
import Element as E exposing (..)
|
||||||
import Route.Path as Path
|
import Route.Path as Path
|
||||||
|
|
||||||
|
|
||||||
servicesDebateCoaching : Service
|
servicesDebateCoaching : Service msg
|
||||||
servicesDebateCoaching =
|
servicesDebateCoaching =
|
||||||
let
|
let
|
||||||
name : String
|
name : String
|
||||||
|
@ -31,13 +32,16 @@ servicesDebateCoaching =
|
||||||
, title5 = "Module 3"
|
, title5 = "Module 3"
|
||||||
, title6 = "Module 4"
|
, title6 = "Module 4"
|
||||||
, title7 = "Module 5"
|
, title7 = "Module 5"
|
||||||
, title8 = ""
|
, title8 = "Optional"
|
||||||
, title9 = ""
|
, title9 = ""
|
||||||
, title10 = ""
|
, title10 = ""
|
||||||
}
|
}
|
||||||
, articleParagraph =
|
, articleParagraph =
|
||||||
[ "This service is designed to help you "
|
{ paragraph1 = [ text "This service is designed to help you gain an understanding of the fundamentals of debate, and the tools used in debate. The service spans five modules, covering fallacious reasoning, epistemology, and propositional logic. You're free to choose which modules you want to cover, based on your current knowledge and interests." ]
|
||||||
]
|
, paragraph2 = [ text "If interested clients choose to text their knowledge and sharpen their skills with mock debates, they may be subject to additional fees, as mock debates often involve the inclusion of skillful third parties against whom clients can spar." ]
|
||||||
|
, paragraph3 = []
|
||||||
|
, paragraph4 = []
|
||||||
|
}
|
||||||
, articleListEntries =
|
, articleListEntries =
|
||||||
{ list1 =
|
{ list1 =
|
||||||
[ "A five-module course covering critical thinking, debate strategy, and propositional logic, designed to strengthen your debating skills."
|
[ "A five-module course covering critical thinking, debate strategy, and propositional logic, designed to strengthen your debating skills."
|
||||||
|
@ -76,7 +80,10 @@ servicesDebateCoaching =
|
||||||
, "Test your knowledge of formal logic."
|
, "Test your knowledge of formal logic."
|
||||||
]
|
]
|
||||||
, list8 =
|
, list8 =
|
||||||
[]
|
[ "Test your knowledge in an optional mock debate."
|
||||||
|
, "Choose between general, empirical, and NTT-style debate."
|
||||||
|
, "Have your performance analyzed in realtime."
|
||||||
|
]
|
||||||
, list9 =
|
, list9 =
|
||||||
[]
|
[]
|
||||||
, list10 =
|
, list10 =
|
||||||
|
|
|
@ -2,11 +2,14 @@ module Config.Pages.Services.Services.ElmBuilds exposing (..)
|
||||||
|
|
||||||
import Config.Helpers.Converters exposing (formatName)
|
import Config.Helpers.Converters exposing (formatName)
|
||||||
import Config.Pages.Services.Types exposing (..)
|
import Config.Pages.Services.Types exposing (..)
|
||||||
import Element exposing (..)
|
import Config.Style.Colour exposing (colourTheme)
|
||||||
|
import Config.Style.Transitions exposing (hoverFontDarkOrange, transitionStyleMedium)
|
||||||
|
import Element as E exposing (..)
|
||||||
|
import Element.Font as F exposing (..)
|
||||||
import Route.Path as Path
|
import Route.Path as Path
|
||||||
|
|
||||||
|
|
||||||
servicesElmBuilds : Service
|
servicesElmBuilds : Service msg
|
||||||
servicesElmBuilds =
|
servicesElmBuilds =
|
||||||
let
|
let
|
||||||
name : String
|
name : String
|
||||||
|
@ -26,8 +29,8 @@ servicesElmBuilds =
|
||||||
, serviceArticle =
|
, serviceArticle =
|
||||||
{ articleTitles =
|
{ articleTitles =
|
||||||
{ title1 = "What You Get"
|
{ title1 = "What You Get"
|
||||||
, title2 = "What We Need"
|
, title2 = "Requirements"
|
||||||
, title3 = ""
|
, title3 = "Example"
|
||||||
, title4 = ""
|
, title4 = ""
|
||||||
, title5 = ""
|
, title5 = ""
|
||||||
, title6 = ""
|
, title6 = ""
|
||||||
|
@ -37,13 +40,34 @@ servicesElmBuilds =
|
||||||
, title10 = ""
|
, title10 = ""
|
||||||
}
|
}
|
||||||
, articleParagraph =
|
, articleParagraph =
|
||||||
[]
|
{ paragraph1 = [ text "The site that you're currently viewing this on was written by me in the Elm programming language. I end , chunkMaker servicesElmBuilds.serviceArticle.articleParagraph.paragraph2e. After a while, I realized that I could create high quality work with it, so I'm offering it as a service." ]
|
||||||
|
, paragraph2 = [ text "Below is an example of a function that I wrote in Elm. In this case, it's the function that is used all over my website to make the strength meters." ]
|
||||||
|
, paragraph3 =
|
||||||
|
[ text "The source code for this website is viewable on "
|
||||||
|
, newTabLink []
|
||||||
|
{ url = "https://gitlab.com/upRootNutrition/website"
|
||||||
|
, label =
|
||||||
|
el
|
||||||
|
[ F.color colourTheme.textLightOrange
|
||||||
|
, hoverFontDarkOrange
|
||||||
|
, transitionStyleMedium
|
||||||
|
]
|
||||||
|
<|
|
||||||
|
text "Gitlab"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
, paragraph4 = []
|
||||||
|
}
|
||||||
, articleListEntries =
|
, articleListEntries =
|
||||||
{ list1 =
|
{ list1 =
|
||||||
[ ""
|
[ "An Elm-based website written to your specifications."
|
||||||
|
, "Two revisions to better meet your needs and vision."
|
||||||
|
, "Six months of free support to correct mistakes."
|
||||||
]
|
]
|
||||||
, list2 =
|
, list2 =
|
||||||
[ ""
|
[ "A clear vision of what you want your site to look like."
|
||||||
|
, "A clear description of your site's pages and structure."
|
||||||
|
, "Any bespoke frontend functionality you want included."
|
||||||
]
|
]
|
||||||
, list3 =
|
, list3 =
|
||||||
[]
|
[]
|
||||||
|
|
|
@ -2,10 +2,14 @@ module Config.Pages.Services.Services.NixBuilds exposing (..)
|
||||||
|
|
||||||
import Config.Helpers.Converters exposing (formatName)
|
import Config.Helpers.Converters exposing (formatName)
|
||||||
import Config.Pages.Services.Types exposing (..)
|
import Config.Pages.Services.Types exposing (..)
|
||||||
|
import Config.Style.Colour exposing (colourTheme)
|
||||||
|
import Config.Style.Transitions exposing (hoverFontDarkOrange, transitionStyleMedium)
|
||||||
|
import Element as E exposing (..)
|
||||||
|
import Element.Font as F exposing (..)
|
||||||
import Route.Path as Path
|
import Route.Path as Path
|
||||||
|
|
||||||
|
|
||||||
servicesNixBuilds : Service
|
servicesNixBuilds : Service msg
|
||||||
servicesNixBuilds =
|
servicesNixBuilds =
|
||||||
let
|
let
|
||||||
name : String
|
name : String
|
||||||
|
@ -25,8 +29,8 @@ servicesNixBuilds =
|
||||||
, serviceArticle =
|
, serviceArticle =
|
||||||
{ articleTitles =
|
{ articleTitles =
|
||||||
{ title1 = "What You Get"
|
{ title1 = "What You Get"
|
||||||
, title2 = "What We Need"
|
, title2 = "Requirements"
|
||||||
, title3 = ""
|
, title3 = "Example"
|
||||||
, title4 = ""
|
, title4 = ""
|
||||||
, title5 = ""
|
, title5 = ""
|
||||||
, title6 = ""
|
, title6 = ""
|
||||||
|
@ -36,13 +40,34 @@ servicesNixBuilds =
|
||||||
, title10 = ""
|
, title10 = ""
|
||||||
}
|
}
|
||||||
, articleParagraph =
|
, articleParagraph =
|
||||||
[]
|
{ paragraph1 = [ text "NixOS has become popular in my community, with many people choosing to explore it over Windows, MacOS, and other Linux distributions. Naturally, as a consequence of this, I receive numerous requests for help regarding the Nix programming language and NixOS system configuration. So, to fast-track newcomers and to make my life a little bit easier for both of us, I'm offering to build custom NixOS configurations for interested clients." ]
|
||||||
|
, paragraph2 = [ text "Below is an example of a nix flake that I wrote. In this case, it's the flake that was used to build the development shell for the production of this very website." ]
|
||||||
|
, paragraph3 =
|
||||||
|
[ text "The source code for this website is viewable on "
|
||||||
|
, newTabLink []
|
||||||
|
{ url = "https://gitlab.com/upRootNutrition/dotfiles"
|
||||||
|
, label =
|
||||||
|
el
|
||||||
|
[ F.color colourTheme.textLightOrange
|
||||||
|
, hoverFontDarkOrange
|
||||||
|
, transitionStyleMedium
|
||||||
|
]
|
||||||
|
<|
|
||||||
|
text "Gitlab"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
, paragraph4 = []
|
||||||
|
}
|
||||||
, articleListEntries =
|
, articleListEntries =
|
||||||
{ list1 =
|
{ list1 =
|
||||||
[ ""
|
[ "A NixOS configuration written to your specifications."
|
||||||
|
, "Two refactors for the purposes of improving readability."
|
||||||
|
, "Instructions for how to use and build upon your configuration."
|
||||||
]
|
]
|
||||||
, list2 =
|
, list2 =
|
||||||
[ ""
|
[ "A comprehensive list of packages you'd like included."
|
||||||
|
, "A list of configuration architecture specifications."
|
||||||
|
, "Any bespoke configuration you want included."
|
||||||
]
|
]
|
||||||
, list3 =
|
, list3 =
|
||||||
[]
|
[]
|
||||||
|
|
|
@ -2,10 +2,11 @@ module Config.Pages.Services.Services.NutritionScience exposing (..)
|
||||||
|
|
||||||
import Config.Helpers.Converters exposing (formatName)
|
import Config.Helpers.Converters exposing (formatName)
|
||||||
import Config.Pages.Services.Types exposing (..)
|
import Config.Pages.Services.Types exposing (..)
|
||||||
|
import Element as E exposing (..)
|
||||||
import Route.Path as Path
|
import Route.Path as Path
|
||||||
|
|
||||||
|
|
||||||
servicesNutritionScience : Service
|
servicesNutritionScience : Service msg
|
||||||
servicesNutritionScience =
|
servicesNutritionScience =
|
||||||
let
|
let
|
||||||
name : String
|
name : String
|
||||||
|
@ -19,13 +20,13 @@ servicesNutritionScience =
|
||||||
, serviceDescription =
|
, serviceDescription =
|
||||||
[ { point = "Participate in a focused, one-hour Q&A session on nutrition science." }
|
[ { point = "Participate in a focused, one-hour Q&A session on nutrition science." }
|
||||||
, { point = "Inquire about methodology, epistemology, and study interpretation." }
|
, { point = "Inquire about methodology, epistemology, and study interpretation." }
|
||||||
, { point = "Gain access to nutrition science interpretation cheat-sheets." }
|
, { point = "Gain access to nutrition science interpretation cheat sheets." }
|
||||||
, { point = "Simplify and streamline the research appraisal process." }
|
, { point = "Simplify and streamline the research appraisal process." }
|
||||||
]
|
]
|
||||||
, serviceArticle =
|
, serviceArticle =
|
||||||
{ articleTitles =
|
{ articleTitles =
|
||||||
{ title1 = "What You Get"
|
{ title1 = "What You Get"
|
||||||
, title2 = "What We Need"
|
, title2 = "Requirements"
|
||||||
, title3 = ""
|
, title3 = ""
|
||||||
, title4 = ""
|
, title4 = ""
|
||||||
, title5 = ""
|
, title5 = ""
|
||||||
|
@ -36,13 +37,19 @@ servicesNutritionScience =
|
||||||
, title10 = ""
|
, title10 = ""
|
||||||
}
|
}
|
||||||
, articleParagraph =
|
, articleParagraph =
|
||||||
[]
|
{ paragraph1 = [ text "This service is designed to help those interested in honing their nutrition science knowledge and boosting their intuition when reading nutrition science literature. Whether the client's goals are to achieve their academic ambitions, satisfy their personal curiosity, or improve their empirical debate chops. The client is free to guide the session in any direction they choose, so long as it is relevant to nutrition science." ]
|
||||||
|
, paragraph2 = []
|
||||||
|
, paragraph3 = []
|
||||||
|
, paragraph4 = []
|
||||||
|
}
|
||||||
, articleListEntries =
|
, articleListEntries =
|
||||||
{ list1 =
|
{ list1 =
|
||||||
[ ""
|
[ "One hour to ask me anything about nutrition science."
|
||||||
|
, "Access to nutrition science evaluation cheat sheets."
|
||||||
|
, "Sharper nutrition science critical appraisal skills."
|
||||||
]
|
]
|
||||||
, list2 =
|
, list2 =
|
||||||
[ ""
|
[ "A list of five clear questions related to nutrition science."
|
||||||
]
|
]
|
||||||
, list3 =
|
, list3 =
|
||||||
[]
|
[]
|
||||||
|
|
|
@ -3,23 +3,31 @@ module Config.Pages.Services.Types exposing (..)
|
||||||
import Element as E exposing (..)
|
import Element as E exposing (..)
|
||||||
|
|
||||||
|
|
||||||
type alias Service =
|
type alias Service msg =
|
||||||
{ serviceImage : String
|
{ serviceImage : String
|
||||||
, serviceLink : String
|
, serviceLink : String
|
||||||
, serviceName : String
|
, serviceName : String
|
||||||
, serviceRate : String
|
, serviceRate : String
|
||||||
, serviceDescription : List Description
|
, serviceDescription : List Description
|
||||||
, serviceArticle : Article
|
, serviceArticle : Article msg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type alias Article =
|
type alias Article msg =
|
||||||
{ articleParagraph : List String
|
{ articleParagraph : Paragraph msg
|
||||||
, articleTitles : Title
|
, articleTitles : Title
|
||||||
, articleListEntries : ArticleList
|
, articleListEntries : ArticleList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
type alias Paragraph msg =
|
||||||
|
{ paragraph1 : List (Element msg)
|
||||||
|
, paragraph2 : List (Element msg)
|
||||||
|
, paragraph3 : List (Element msg)
|
||||||
|
, paragraph4 : List (Element msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
type alias Title =
|
type alias Title =
|
||||||
{ title1 : String
|
{ title1 : String
|
||||||
, title2 : String
|
, title2 : String
|
||||||
|
@ -48,21 +56,6 @@ type alias ArticleList =
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type alias Bulletpoint =
|
|
||||||
{ entry : String
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
type alias Numbered =
|
|
||||||
{ entry : String
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
type alias Highlighted =
|
|
||||||
{ entry : String
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
type alias Description =
|
type alias Description =
|
||||||
{ point : String
|
{ point : String
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,17 @@ type alias Theme =
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
type alias SyntaxColors =
|
||||||
|
{ punctuation : Color
|
||||||
|
, key : Color
|
||||||
|
, string : Color
|
||||||
|
, keyword : Color
|
||||||
|
, operator : Color
|
||||||
|
, background : Color
|
||||||
|
, text : Color
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
colourTheme : Theme
|
colourTheme : Theme
|
||||||
colourTheme =
|
colourTheme =
|
||||||
{ textLightGrey = rgb255 212 212 212
|
{ textLightGrey = rgb255 212 212 212
|
||||||
|
@ -36,3 +47,15 @@ colourTheme =
|
||||||
, debugColour = rgb255 227 28 121
|
, debugColour = rgb255 227 28 121
|
||||||
, transparent = rgba 1 1 1 0
|
, transparent = rgba 1 1 1 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
syntaxTheme : SyntaxColors
|
||||||
|
syntaxTheme =
|
||||||
|
{ punctuation = rgb255 202 158 230
|
||||||
|
, key = rgb255 138 173 244
|
||||||
|
, string = rgb255 166 218 149
|
||||||
|
, keyword = rgb255 245 169 127
|
||||||
|
, operator = rgb255 178 185 194
|
||||||
|
, background = rgb255 36 39 58
|
||||||
|
, text = rgb255 202 211 245
|
||||||
|
}
|
||||||
|
|
|
@ -126,7 +126,9 @@ serviceMaker =
|
||||||
[ cardSubTitleMaker
|
[ cardSubTitleMaker
|
||||||
[ column
|
[ column
|
||||||
bodyFormat
|
bodyFormat
|
||||||
[ chunkMaker servicesDebateAnalysis.serviceArticle.articleParagraph
|
[ chunkMaker servicesDebateAnalysis.serviceArticle.articleParagraph.paragraph1
|
||||||
|
, chunkMaker
|
||||||
|
servicesDebateAnalysis.serviceArticle.articleParagraph.paragraph2
|
||||||
, titleMaker servicesDebateAnalysis.serviceArticle.articleTitles.title1
|
, titleMaker servicesDebateAnalysis.serviceArticle.articleTitles.title1
|
||||||
|
|
||||||
-- , highlightedBlockMaker
|
-- , highlightedBlockMaker
|
||||||
|
|
|
@ -130,7 +130,8 @@ serviceMaker =
|
||||||
[ cardSubTitleMaker
|
[ cardSubTitleMaker
|
||||||
[ column
|
[ column
|
||||||
bodyFormat
|
bodyFormat
|
||||||
[ chunkMaker servicesDebateCoaching.serviceArticle.articleParagraph
|
[ chunkMaker servicesDebateCoaching.serviceArticle.articleParagraph.paragraph1
|
||||||
|
, chunkMaker servicesDebateCoaching.serviceArticle.articleParagraph.paragraph2
|
||||||
, titleMaker servicesDebateCoaching.serviceArticle.articleTitles.title1
|
, titleMaker servicesDebateCoaching.serviceArticle.articleTitles.title1
|
||||||
, numberMaker servicesDebateCoaching.serviceArticle.articleListEntries.list1
|
, numberMaker servicesDebateCoaching.serviceArticle.articleListEntries.list1
|
||||||
, titleMaker servicesDebateCoaching.serviceArticle.articleTitles.title2
|
, titleMaker servicesDebateCoaching.serviceArticle.articleTitles.title2
|
||||||
|
@ -141,6 +142,7 @@ serviceMaker =
|
||||||
, highlightedBlockMaker servicesDebateCoaching.serviceArticle.articleTitles.title5 servicesDebateCoaching.serviceArticle.articleListEntries.list5
|
, highlightedBlockMaker servicesDebateCoaching.serviceArticle.articleTitles.title5 servicesDebateCoaching.serviceArticle.articleListEntries.list5
|
||||||
, highlightedBlockMaker servicesDebateCoaching.serviceArticle.articleTitles.title6 servicesDebateCoaching.serviceArticle.articleListEntries.list6
|
, highlightedBlockMaker servicesDebateCoaching.serviceArticle.articleTitles.title6 servicesDebateCoaching.serviceArticle.articleListEntries.list6
|
||||||
, highlightedBlockMaker servicesDebateCoaching.serviceArticle.articleTitles.title7 servicesDebateCoaching.serviceArticle.articleListEntries.list7
|
, highlightedBlockMaker servicesDebateCoaching.serviceArticle.articleTitles.title7 servicesDebateCoaching.serviceArticle.articleListEntries.list7
|
||||||
|
, highlightedBlockMaker servicesDebateCoaching.serviceArticle.articleTitles.title8 servicesDebateCoaching.serviceArticle.articleListEntries.list8
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
@ -11,7 +11,7 @@ import Config.Helpers.Response
|
||||||
import Config.Helpers.ToolTip exposing (..)
|
import Config.Helpers.ToolTip exposing (..)
|
||||||
import Config.Pages.Headers.Types exposing (..)
|
import Config.Pages.Headers.Types exposing (..)
|
||||||
import Config.Pages.Services.Services.ElmBuilds exposing (servicesElmBuilds)
|
import Config.Pages.Services.Services.ElmBuilds exposing (servicesElmBuilds)
|
||||||
import Config.Style.Colour exposing (colourTheme)
|
import Config.Style.Colour exposing (..)
|
||||||
import Config.Style.Transitions
|
import Config.Style.Transitions
|
||||||
exposing
|
exposing
|
||||||
( hoverFontDarkOrange
|
( hoverFontDarkOrange
|
||||||
|
@ -130,11 +130,15 @@ serviceMaker =
|
||||||
[ cardSubTitleMaker
|
[ cardSubTitleMaker
|
||||||
[ column
|
[ column
|
||||||
bodyFormat
|
bodyFormat
|
||||||
[-- chunkMaker
|
[ chunkMaker servicesElmBuilds.serviceArticle.articleParagraph.paragraph1
|
||||||
-- , titleMaker
|
, chunkMaker servicesElmBuilds.serviceArticle.articleParagraph.paragraph2
|
||||||
-- , highlightedBlockMaker
|
, chunkMaker servicesElmBuilds.serviceArticle.articleParagraph.paragraph3
|
||||||
-- , bulletPointMaker
|
, titleMaker servicesElmBuilds.serviceArticle.articleTitles.title1
|
||||||
-- , numberMaker
|
, numberMaker servicesElmBuilds.serviceArticle.articleListEntries.list1
|
||||||
|
, titleMaker servicesElmBuilds.serviceArticle.articleTitles.title2
|
||||||
|
, bulletPointMaker servicesElmBuilds.serviceArticle.articleListEntries.list2
|
||||||
|
, titleMaker servicesElmBuilds.serviceArticle.articleTitles.title3
|
||||||
|
, elmCodeRenderer
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -142,3 +146,263 @@ serviceMaker =
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
elmCodeRenderer : Element msg
|
||||||
|
elmCodeRenderer =
|
||||||
|
el
|
||||||
|
[ paddingEach
|
||||||
|
{ top = 15
|
||||||
|
, bottom = 15
|
||||||
|
, left = 20
|
||||||
|
, right = 20
|
||||||
|
}
|
||||||
|
, B.color colourTheme.backgroundLightGrey
|
||||||
|
, D.rounded 10
|
||||||
|
, width fill
|
||||||
|
, spacing 8
|
||||||
|
]
|
||||||
|
<|
|
||||||
|
column
|
||||||
|
[ F.size 14
|
||||||
|
, spacing 5
|
||||||
|
, width fill
|
||||||
|
]
|
||||||
|
[ renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 0 0 ]
|
||||||
|
, text "barMaker"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " : "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "("
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "Int"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text " -> "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "String"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text ")"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " -> "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "Int"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text " -> "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "Element"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text " msg"
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 0 0 ]
|
||||||
|
, text "barMaker"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " getToolTip"
|
||||||
|
, text " num"
|
||||||
|
, text " ="
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 16 0 ]
|
||||||
|
, text "el"
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 28 0 ]
|
||||||
|
, text "("
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "["
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " Element"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "height"
|
||||||
|
, text " <| "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "px"
|
||||||
|
, text " 12"
|
||||||
|
|> el [ F.color syntaxTheme.string ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text ","
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " Element"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "width"
|
||||||
|
, text " fill"
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text ","
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " Border"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "rounded"
|
||||||
|
, text " 10"
|
||||||
|
|> el [ F.color syntaxTheme.string ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text ","
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " Border"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "color"
|
||||||
|
, text " colourTheme"
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "textDarkGrey"
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text ","
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " Border"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "width"
|
||||||
|
, text " 2"
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text ","
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " Background"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "gradient"
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 48 0 ]
|
||||||
|
, text "{"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " angle"
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "1.57"
|
||||||
|
|> el [ F.color syntaxTheme.string ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 48 0 ]
|
||||||
|
, text ","
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " steps"
|
||||||
|
, text " = "
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 56 0 ]
|
||||||
|
, text "List"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "concat"
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 62 0 ]
|
||||||
|
, text "[ "
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "List"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "repeat"
|
||||||
|
, text " num "
|
||||||
|
, text "colourTheme"
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "barGreen"
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 62 0 ]
|
||||||
|
, text ", "
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "List"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "repeat"
|
||||||
|
, text " ("
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "10"
|
||||||
|
|> el [ F.color syntaxTheme.string ]
|
||||||
|
, text " - "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "num"
|
||||||
|
, text " )"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " colourTheme"
|
||||||
|
, text "."
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "barRed"
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 62 0 ]
|
||||||
|
, text "]"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 48 0 ]
|
||||||
|
, text "}"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 40 0 ]
|
||||||
|
, text "]"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 48 0 ]
|
||||||
|
, text "++"
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text " [ "
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "tooltip"
|
||||||
|
, text " ("
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "getToolTip"
|
||||||
|
, text " num"
|
||||||
|
, text ")"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text " ]"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 28 0 ]
|
||||||
|
, text ")"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 28 0 ]
|
||||||
|
, text "none"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
|
@ -11,7 +11,7 @@ import Config.Helpers.Response
|
||||||
import Config.Helpers.ToolTip exposing (..)
|
import Config.Helpers.ToolTip exposing (..)
|
||||||
import Config.Pages.Headers.Types exposing (..)
|
import Config.Pages.Headers.Types exposing (..)
|
||||||
import Config.Pages.Services.Services.NixBuilds exposing (servicesNixBuilds)
|
import Config.Pages.Services.Services.NixBuilds exposing (servicesNixBuilds)
|
||||||
import Config.Style.Colour exposing (colourTheme)
|
import Config.Style.Colour exposing (..)
|
||||||
import Config.Style.Transitions
|
import Config.Style.Transitions
|
||||||
exposing
|
exposing
|
||||||
( hoverFontDarkOrange
|
( hoverFontDarkOrange
|
||||||
|
@ -50,7 +50,6 @@ toLayout model =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- INIT
|
-- INIT
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,11 +130,14 @@ serviceMaker =
|
||||||
[ cardSubTitleMaker
|
[ cardSubTitleMaker
|
||||||
[ column
|
[ column
|
||||||
bodyFormat
|
bodyFormat
|
||||||
[-- chunkMaker
|
[ chunkMaker servicesNixBuilds.serviceArticle.articleParagraph.paragraph1
|
||||||
-- , titleMaker
|
, chunkMaker servicesNixBuilds.serviceArticle.articleParagraph.paragraph2
|
||||||
-- , highlightedBlockMaker
|
, titleMaker servicesNixBuilds.serviceArticle.articleTitles.title1
|
||||||
-- , bulletPointMaker
|
, numberMaker servicesNixBuilds.serviceArticle.articleListEntries.list1
|
||||||
-- , numberMaker
|
, titleMaker servicesNixBuilds.serviceArticle.articleTitles.title2
|
||||||
|
, bulletPointMaker servicesNixBuilds.serviceArticle.articleListEntries.list2
|
||||||
|
, titleMaker servicesNixBuilds.serviceArticle.articleTitles.title3
|
||||||
|
, nixCodeRenderer
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -143,3 +145,332 @@ serviceMaker =
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
renderCodeLine : SyntaxColors -> List (Element msg) -> Element msg
|
||||||
|
renderCodeLine colors elements =
|
||||||
|
paragraph
|
||||||
|
[ F.color colors.text
|
||||||
|
, F.alignLeft
|
||||||
|
, F.family
|
||||||
|
[ F.monospace ]
|
||||||
|
]
|
||||||
|
elements
|
||||||
|
|
||||||
|
|
||||||
|
nixCodeRenderer : Element msg
|
||||||
|
nixCodeRenderer =
|
||||||
|
el
|
||||||
|
[ paddingEach
|
||||||
|
{ top = 15
|
||||||
|
, bottom = 15
|
||||||
|
, left = 20
|
||||||
|
, right = 20
|
||||||
|
}
|
||||||
|
, B.color colourTheme.backgroundLightGrey
|
||||||
|
, D.rounded 10
|
||||||
|
, width fill
|
||||||
|
, spacing 8
|
||||||
|
]
|
||||||
|
<|
|
||||||
|
column
|
||||||
|
[ F.size 14
|
||||||
|
, spacing 5
|
||||||
|
, width fill
|
||||||
|
]
|
||||||
|
[ renderCodeLine syntaxTheme
|
||||||
|
[ text "{"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 8 0 ]
|
||||||
|
, text "description"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "\"Elm Environment\""
|
||||||
|
|> el [ F.color syntaxTheme.string ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 8 0 ]
|
||||||
|
, text "inputs"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "{"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 16 0 ]
|
||||||
|
, text "nixpkgs.url"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "\"github:NixOS/nixpkgs/nixos-unstable\""
|
||||||
|
|> el [ F.color syntaxTheme.string ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 16 0 ]
|
||||||
|
, text "nixpkgs-stable.url"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "\"github:NixOS/nixpkgs/nixos-23.11\""
|
||||||
|
|> el [ F.color syntaxTheme.string ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 16 0 ]
|
||||||
|
, text "haskell-flake.url"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "\"github:srid/haskell-flake\""
|
||||||
|
|> el [ F.color syntaxTheme.string ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 8 0 ]
|
||||||
|
, text "}"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text ";"
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 8 0 ]
|
||||||
|
, text "outputs"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "inputs"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text " @ "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "{"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 16 0 ]
|
||||||
|
, text "flake-parts"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text ","
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 16 0 ]
|
||||||
|
, text "self"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text ","
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 16 0 ]
|
||||||
|
, text "..."
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 8 0 ]
|
||||||
|
, text "}"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text ": "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "let"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 16 0 ]
|
||||||
|
, text "system"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "\"x86_64-linux\""
|
||||||
|
|> el [ F.color syntaxTheme.string ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 8 0 ]
|
||||||
|
, text "in"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 16 0 ]
|
||||||
|
, text "flake-parts.lib.mkFlake"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text " { "
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "inherit inputs"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text " } "
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "{"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 24 0 ]
|
||||||
|
, text "imports"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "["
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text "./parts"
|
||||||
|
|> el [ F.color syntaxTheme.string ]
|
||||||
|
, text ","
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text "inputs.haskell-flake.flakeModule"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 24 0 ]
|
||||||
|
, text "]"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 24 0 ]
|
||||||
|
, text "systems"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "[ "
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "system"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text " ]"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 24 0 ]
|
||||||
|
, text "perSystem"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "{ "
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text "pkgs"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text ", ... "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "} "
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text ": "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "{"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text "_module.args.pkgs"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "import"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text " inputs.nixpkgs "
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "{ "
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 40 0 ]
|
||||||
|
, text "inherit system"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text "}"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text "_module.args.pkgs-stable"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text " = "
|
||||||
|
|> el [ F.color syntaxTheme.operator ]
|
||||||
|
, text "import"
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text " inputs.nixpkgs-stable "
|
||||||
|
|> el [ F.color syntaxTheme.keyword ]
|
||||||
|
, text "{ "
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 40 0 ]
|
||||||
|
, text "inherit system"
|
||||||
|
|> el [ F.color syntaxTheme.key ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 32 0 ]
|
||||||
|
, text "}"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 24 0 ]
|
||||||
|
, text "}"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text ""
|
||||||
|
|> el [ paddingXY 16 0 ]
|
||||||
|
, text "}"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
, text ";"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
, renderCodeLine syntaxTheme
|
||||||
|
[ text "}"
|
||||||
|
|> el [ F.color syntaxTheme.punctuation ]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
|
@ -130,11 +130,14 @@ serviceMaker =
|
||||||
[ cardSubTitleMaker
|
[ cardSubTitleMaker
|
||||||
[ column
|
[ column
|
||||||
bodyFormat
|
bodyFormat
|
||||||
[-- chunkMaker
|
[ chunkMaker servicesNutritionScience.serviceArticle.articleParagraph.paragraph1
|
||||||
-- , titleMaker
|
, chunkMaker servicesNutritionScience.serviceArticle.articleParagraph.paragraph2
|
||||||
-- , highlightedBlockMaker
|
, titleMaker servicesNutritionScience.serviceArticle.articleTitles.title1
|
||||||
-- , bulletPointMaker
|
|
||||||
-- , numberMaker
|
-- , highlightedBlockMaker
|
||||||
|
, numberMaker servicesNutritionScience.serviceArticle.articleListEntries.list1
|
||||||
|
, titleMaker servicesNutritionScience.serviceArticle.articleTitles.title2
|
||||||
|
, bulletPointMaker servicesNutritionScience.serviceArticle.articleListEntries.list2
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue