diff options
author | Ben Sima <ben@bsima.me> | 2019-09-11 19:33:42 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-09-11 19:33:42 -0700 |
commit | 7c6a690ced8baac64e1e9c667bf581801bd0b679 (patch) | |
tree | e2ca477cde042b5da7bbd4acae8af08da8004127 /apex/Ibb.hs | |
parent | 9e566efb242f47b9f4a9bdf4657b920b2ed61217 (diff) |
[ibb] add the git hash to the end of the page
This is for versioning information. I'll need to pretty it up later, but I
wanted something easy to do today.
Diffstat (limited to 'apex/Ibb.hs')
-rw-r--r-- | apex/Ibb.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apex/Ibb.hs b/apex/Ibb.hs index 6d934f9..544761d 100644 --- a/apex/Ibb.hs +++ b/apex/Ibb.hs @@ -1,6 +1,8 @@ -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} +{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeOperators #-} @@ -13,6 +15,7 @@ import qualified Biz.Ibb.Keep as Keep import Data.Maybe (fromMaybe) import Data.Acid (AcidState) import qualified Data.Acid.Abstract as Acid +import GitHash (giHash, tGitInfoCwd) import qualified Lucid as L import Lucid.Base import Miso @@ -48,8 +51,12 @@ instance L.ToHtml a => L.ToHtml (HtmlPage a) where L.head_ $ do L.meta_ [L.charset_ "utf-8"] jsRef "/static/all.js" - L.body_ (L.toHtml x) + L.body_ $ do + page + L.p_ gitCommit where + page = L.toHtml x + gitCommit = L.toHtml $ giHash $$tGitInfoCwd jsRef href = L.with (L.script_ mempty) [ makeAttribute "src" href , makeAttribute "type" "text/javascript" |