From 2f32da5812583c6675bdc9ff88a3a3d5cefbb82f Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 25 Jul 2020 15:40:24 -0700 Subject: hero: rename Assets -> Pack and lint fixes --- Hero/Host.hs | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'Hero/Host.hs') diff --git a/Hero/Host.hs b/Hero/Host.hs index 267d475..285861d 100644 --- a/Hero/Host.hs +++ b/Hero/Host.hs @@ -1,15 +1,10 @@ {-# LANGUAGE DataKinds #-} -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PolyKinds #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} @@ -61,11 +56,11 @@ import qualified Data.Acid.Abstract as Acid import qualified Data.Aeson as Aeson import Data.Text (Text) import qualified Data.Text.Lazy as Lazy -import qualified Hero.Assets as Assets import Hero.Core import qualified Hero.Keep as Keep import qualified Hero.Look as Look import qualified Hero.Look.Typography as Typography +import qualified Hero.Pack as Pack import qualified Lucid as L import Lucid.Base import Miso @@ -243,9 +238,9 @@ authHandler :: ) authHandler cookieSettings jwtSettings loginForm = case loginForm of - (LoginForm "ben@bsima.me" "test") -> do + (LoginForm "ben@bsima.me" "test") -> applyCreds $ User "ben@bsima.me" "ben" [] - (LoginForm "mcovino@heroprojects.io" "test") -> do + (LoginForm "mcovino@heroprojects.io" "test") -> applyCreds $ User "mcovino@heroprojects.io" "mike" [] _ -> throwError err401 where @@ -295,7 +290,7 @@ instance L.ToHtml a => L.ToHtml (Templated a) where [ L.rel_ "apple-touch-icon", L.sizes_ "180x180", L.href_ $ - Assets.cdnEdge + Pack.cdnEdge <> "/old-assets/images/favicons/apple-touch-icon.png" ] L.link_ @@ -303,7 +298,7 @@ instance L.ToHtml a => L.ToHtml (Templated a) where L.type_ "image/png", L.sizes_ "32x32", L.href_ $ - Assets.cdnEdge + Pack.cdnEdge <> "/old-assets/images/favicons/favicon-32x32.png" ] L.link_ @@ -311,19 +306,19 @@ instance L.ToHtml a => L.ToHtml (Templated a) where L.type_ "image/png", L.sizes_ "16x16", L.href_ $ - Assets.cdnEdge + Pack.cdnEdge <> "/old-assets/images/favicons/favicon-16x16.png" ] L.link_ [ L.rel_ "manifest", L.href_ $ - Assets.cdnEdge + Pack.cdnEdge <> "/old-assets/images/favicons/manifest.json" ] L.link_ [ L.rel_ "mask-icon", L.href_ $ - Assets.cdnEdge + Pack.cdnEdge <> "/old-assets/images/favicons/safari-pinned-tab.svg" ] L.meta_ [L.charset_ "utf-8"] -- cgit v1.2.3