packages feed

tintin 1.7.1 → 1.8.0

raw patch · 4 files changed

+24/−20 lines, 4 files

Files

src/Tintin/ConfigurationLoading.hs view
@@ -54,15 +54,14 @@         tintinLogo      = tintinFile |> getFieldValue "logo"       when (isNothing projectName) (Errors.showAndDie ["Project must have a name. Please set it in package.yaml or *.cabal."])       when (isNothing projectSynopsis) (Errors.showAndDie ["Project must have a synopsis. Please set it in package.yaml or *.cabal."])-      when (isNothing projectGithub) (Errors.showAndDie ["Project must be hosted in a Github repository. Please set it in package.yaml or *.cabal."])       when (isNothing tintinColor)         (Errors.showAndDie ["Tintin usually generates a .tintin.yml file with a color configuration. Maybe you don't have enough permissions?\                            \\n\nTry creating .tintin.yml and adding color:blue to it."])       return Project.Info         { name = Unsafe.fromJust projectName         , synopsis = Unsafe.fromJust projectSynopsis-        , githubLink = parseGithubUrl $ Unsafe.fromJust projectGithub-        , githubAuthor = Unsafe.fromJust projectAuthor+        , githubLink = parseGithubUrl <$> projectGithub+        , githubAuthor = projectAuthor         , color = makeColor $ Unsafe.fromJust tintinColor         , logoUrl = tintinLogo         , pages = pages
src/Tintin/Domain/Project.hs view
@@ -30,8 +30,8 @@   { name         :: Text   , synopsis     :: Text   , color        :: Color-  , githubLink   :: Text-  , githubAuthor :: Text+  , githubLink   :: Maybe Text+  , githubAuthor :: Maybe Text   , logoUrl      :: Maybe Text   , pages        :: [Page]   }
src/Tintin/Html/Templating.hs view
@@ -2,6 +2,7 @@  import Lucid +import Data.Maybe import Tintin.Core require Tintin.Html.Style require Tintin.Domain.Project@@ -115,21 +116,23 @@             let (page:_) = filter (\x -> "index.html" /= Project.filename x ) (Project.pages info)             li_ [class_ ""] $               a_ [class_ "", href_ (Project.filename page)] "Docs"-        div_ [class_ ""]$-          ul_ [class_ ""] $-            li_ [class_ ""] $-              a_ [class_ "", href_ $ "https://github.com/" <> Project.githubLink info] "View on GitHub"+        whenJust (Project.githubLink info) $ \ghlink ->+          div_ [class_ ""] $+            ul_ [class_ ""] $+              li_ [class_ ""] $+                a_ [class_ "", href_ $ "https://github.com/" <> ghlink] "View on GitHub"    footer =     footer_ [ class_ "tintin-bg-darkgrey tintin-fg-white"] $       div_ [class_ "container"] $         div_ [class_ "row"] $ do           div_ [class_ "col"] $-            p_ [class_ "tintin-fg-lightgrey"] $ do+            p_ [class_ "tintin-fg-lightgrey"] $+              when (isJust $ Project.githubLink info) $ do               "Developed by "-              a_ [ href_ $ "https://github.com/" <> Project.githubAuthor info+              a_ [ href_ $ "https://github.com/" <> (fromJust $ Project.githubAuthor info)                  , class_ $ "tintin-fg-" <> bgColorOf info-                 ] (toHtml $ Project.githubAuthor info)+                 ] (toHtml $ fromJust $ Project.githubAuthor info)           div_ [class_ "col", style_ ""] $ do             siteGenerated @@ -152,9 +155,10 @@     meta_ [ name_ "twitter:description"           , content_ synopsis           ]-    meta_ [ name_ "twitter:creator"-          , content_ githubAuthor-          ]+    whenJust githubAuthor $ \author ->+      meta_ [ name_ "twitter:creator"+            , content_ author+            ]     meta_ [ name_ "twitter:image"           , content_ ("https://s3-eu-west-1.amazonaws.com/worldwideapps/assets/tintin-" <> (Text.toLower $ show color) <> ".png") @@ -169,9 +173,10 @@     meta_ [ itemprop_ "og:title"           , content_ (name <> " - " <> title)           ]-    meta_ [ itemprop_ "og:url"-          , content_ githubLink-          ]+    whenJust githubLink $ \ghlink ->+      meta_ [ itemprop_ "og:url"+            , content_ ghlink+            ]     meta_ [ itemprop_ "og:image"           , content_  ("https://s3-eu-west-1.amazonaws.com/worldwideapps/assets/tintin-" <> (Text.toLower $ show color) <> ".png") 
tintin.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: fc18b705429def3304a05fcd22f329bdea7372204e25c4d8b35edec8c3583591+-- hash: b3692d295c2965f34521bb49cc143434b43e61fef217860c4836606544e5fca6  name:           tintin-version:        1.7.1+version:        1.8.0 synopsis:       A softer alternative to Haddock description:    Please see the website <https://theam.github.io/tintin> category:       Documentation