purr

password generation and secret sharing
Log | Files | Refs | README | LICENSE

Templates.hs (557B)


      1 {-# LANGUAGE QuasiQuotes     #-}
      2 {-# LANGUAGE TemplateHaskell #-}
      3 
      4 module Feature.Sharing.Templates ( renderPw ) where
      5 
      6 import           Core.Types
      7 
      8 import qualified Data.Text                     as T
      9 import qualified Data.Text.Lazy                as LT
     10 
     11 import           Text.Blaze.Html
     12 import           Text.Blaze.Html.Renderer.Text (renderHtml)
     13 import           Text.Hamlet                   (shamletFile)
     14 
     15 import           Prelude
     16 
     17 renderPw :: String -> Maybe T.Text -> LT.Text
     18 renderPw link password = renderHtml ( $(shamletFile "./views/pw.hamlet") )