Alerts

The global alert

This is setup in your hugo.toml configuration file. Multiple banners will be displayed for however many [[params.alphaAlert]] blocks you configure.

[params]
  isAlpha = true
[[params.alphaAlert]]
  alertType = "danger"
  alertTitle = "Special Banner add-on included"
  alertMessage = "This theme is a work in progress!"
  alertIconClass = "fa-solid fa-camera-retro"

For alertType options include:

  • info (blue)
  • success (green)
  • warning (yellow)
  • danger (red)
  • dark (dark)

It defaults to dark.

For alertIconClass any fontawesome-free icon class will work.

From the content directory, called as a shortcode.

All of the params are optional, but if neither alertTitle or alertMessage are passed they will not render. The alertIconClass must be a valid fontawesome icon class.

{{< alert-wrapper 
  alertType="info" 
  alertTitle="will" 
  alertMessage="robinson" 
  alertIconClass="fa-solid fa-snowflake"
>}}

Alert shortcode examples:

Info:

Uses fa-solid fa-snowflake.

Success:

Uses fa-solid fa-bicycle.

Warning:

Uses fa-solid fa-bath.

Danger:

Uses fa-solid fa-dumpster-fire.

Neutral:

Does not pass alertIconClass, defaults to info icon. Does not pass alertType, defaults to gray.

Published: (Last Modified: )
4fcb792 / History / Blame