yesod-alerts: Alert messages for the Yesod framework

[ bsd3, library, web ] [ Propose Tags ] [ Report a vulnerability ]

Use the "alerts" package with the Yesod framework


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.1.3.0
Dependencies alerts (>=0.1.0.0 && <0.2.0.0), base (>=4.7 && <5), blaze-html, blaze-markup, safe (>=0.3.14 && <0.4), text (>=0.11 && <2.0), yesod-core (>=1.4.32) [details]
License BSD-3-Clause
Copyright 2017 Daniel Campoverde
Author Daniel Campoverde
Maintainer alx@sillybytes.net
Category Web
Home page https://github.com/alx741/yesod-alerts#readme
Source repo head: git clone https://github.com/alx741/yesod-alerts
Uploaded by alx741 at 2019-06-28T18:17:30Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2493 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2019-06-28 [all 1 reports]

Readme for yesod-alerts-0.1.3.0

[back to package description]

yesod-alerts

Alert messages for the Yesod framework

Setup

Modify your definition of defaultLayout in Foundation.hs:

defaultLayout widget = do
    ...
    alerts  <- getAlerts
    ...

Then Include a renderer in default-layout.hamlet

...
#{renderAlertsBootstrap3 alerts}
...
^{widget}
...

Usage

Set alerts from your handlers

getHomeR :: Handler Html
getHomeR = do
    ...
    setAlert (Alert Error "oops")
    setSuccessAlert "Yay!"
    ...
    defautlLayout $ do
        $(widgetFile "homepage")

Renderers

  • Bootstrap v3
  • Bootstrap v4
  • Foundation v5