{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Study.Courses.English.Vocabulary.Attitudinals.Course (course) where
import Core
import Study.Courses.English.Vocabulary.Attitudinals.Lessons
import Language.Lojban.Dictionaries (englishDictionary)
import Study.Framework.DocumentBuilders (buildDocumentFromMarkdownCode)
import qualified Text.Pandoc as P
import Data.FileEmbed (embedStringFile)
style :: CourseStyle
style :: CourseStyle
style = Maybe String -> Maybe String -> CourseStyle
CourseStyle Maybe String
color1 Maybe String
iconUrl where
color1 :: Maybe String
color1 = String -> Maybe String
forall a. a -> Maybe a
Just
String
"hsl(274, 34%, 30%)"
iconUrl :: Maybe String
iconUrl = String -> Maybe String
forall a. a -> Maybe a
Just
String
"https://image.flaticon.com/icons/svg/187/187134.svg"
longDescription :: P.Pandoc
Right Pandoc
longDescription = Text -> Either PandocError Pandoc
buildDocumentFromMarkdownCode $(embedStringFile "resources/courses/english/vocabulary/attitudinals/description.md")
credits :: P.Pandoc
Right Pandoc
credits = Text -> Either PandocError Pandoc
buildDocumentFromMarkdownCode $(embedStringFile "resources/courses/english/vocabulary/attitudinals/credits.md")
course :: Course
course :: Course
course = Text
-> Text
-> Text
-> Maybe Pandoc
-> Maybe Pandoc
-> CourseStyle
-> Dictionary
-> [Lesson]
-> Course
Course Text
"attitudinals_eng" Text
title Text
shortDescription (Pandoc -> Maybe Pandoc
forall a. a -> Maybe a
Just Pandoc
longDescription) (Pandoc -> Maybe Pandoc
forall a. a -> Maybe a
Just Pandoc
credits) CourseStyle
style Dictionary
englishDictionary [Lesson]
lessons where
title :: Text
title = Text
"Attitudinals (pre-alpha)"
shortDescription :: Text
shortDescription = Text
"This course is still under construction. Please check back later."
lessons :: [Lesson]
lessons = [Lesson
lesson1, Lesson
lesson2, Lesson
lesson3]