|
@@ -9,8 +9,6 @@ import Web.Routes
|
|
|
import qualified IHP.FrameworkConfig as FrameworkConfig
|
|
|
import Config ()
|
|
|
|
|
|
-type Html = HtmlWithContext ViewContext
|
|
|
-
|
|
|
defaultLayout :: Html -> Html
|
|
|
defaultLayout inner = H.docTypeHtml ! A.lang "en" $ [hsx|
|
|
|
<head>
|
|
@@ -29,18 +27,20 @@ defaultLayout inner = H.docTypeHtml ! A.lang "en" $ [hsx|
|
|
|
</body>
|
|
|
|]
|
|
|
|
|
|
+stylesheets :: Html
|
|
|
stylesheets = do
|
|
|
- when (isDevelopment FrameworkConfig.environment) [hsx|
|
|
|
+ when isDevelopment [hsx|
|
|
|
<link rel="stylesheet" href="/vendor/bootstrap.min.css"/>
|
|
|
<link rel="stylesheet" href="/vendor/flatpickr.min.css"/>
|
|
|
<link rel="stylesheet" href="/app.css"/>
|
|
|
|]
|
|
|
- when (isProduction FrameworkConfig.environment) [hsx|
|
|
|
+ when isProduction [hsx|
|
|
|
<link rel="stylesheet" href="/prod.css"/>
|
|
|
|]
|
|
|
|
|
|
+scripts :: Html
|
|
|
scripts = do
|
|
|
- when (isDevelopment FrameworkConfig.environment) [hsx|
|
|
|
+ when isDevelopment [hsx|
|
|
|
<script id="livereload-script" src="/livereload.js"></script>
|
|
|
<script src="/vendor/jquery-3.2.1.slim.min.js"></script>
|
|
|
<script src="/vendor/timeago.js"></script>
|
|
@@ -50,11 +50,11 @@ scripts = do
|
|
|
<script src="/helpers.js"></script>
|
|
|
<script src="/vendor/morphdom-umd.min.js"></script>
|
|
|
|]
|
|
|
- when (isProduction FrameworkConfig.environment) [hsx|
|
|
|
+ when isProduction [hsx|
|
|
|
<script src="/prod.js"></script>
|
|
|
|]
|
|
|
|
|
|
-
|
|
|
+metaTags :: Html
|
|
|
metaTags = [hsx|
|
|
|
<meta charset="utf-8"/>
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|