Usage
{{< banner text = "Important announcement" [header = "Notice"] [src = "/images/icon.png"] [class = "ui warning message"] [srcClass = "ui mini image"] >}}Creates full-width banner messages with optional images and custom styling
Description
Creates a prominent full-width banner for important announcements, notifications, or highlighted content. Perfect for alerts, promotions, or key information that needs user attention.
Parameters
indicates required parameter
text =
"string"REQUIRED
Main banner content (processed as safe HTML)
header =
"string"
Optional header text displayed before the main content
src =
"string"
Path to image to display in the banner
class =
"string"ui message
CSS classes for the banner container
srcClass =
"string"ui mini image
CSS classes for the image element
srcLink =
"string"
URL to wrap around the image (makes image clickable)
alt =
"string"
Alt text for the image
Examples
Basic announcement banner using hw shortcode
{{<hw t="banner" text="Welcome to our new website! We've redesigned everything for a better user experience.">}}Use hw shortcode with standard text parameter for simple announcements
Warning banner with header and custom styling
{{<hw t="banner"
header="System Maintenance"
text="Scheduled maintenance will occur from 2:00 AM to 4:00 AM EST. Services may be temporarily unavailable."
class="ui warning message">}}Use header parameter and custom classes for different message types
Promotional banner with image and link
{{<hw t="banner"
header="New Feature Release"
text="Introducing our advanced analytics dashboard with real-time insights and custom reporting."
src="/images/analytics-icon.png"
srcLink="/features/analytics"
alt="Analytics dashboard icon"
class="ui positive message">}}Combine image, link, and styling for engaging promotional banners
Error banner with critical information
{{<hw t="banner"
header="Service Alert"
text="We are currently experiencing issues with our payment processing system. {{<hw t=\"include\" from=\"status-updates.md\">}}"
src="/images/alert-icon.svg"
class="ui negative message"
srcClass="ui tiny image">}}Include dynamic content and use semantic styling for alerts
Information banner with rich HTML content
{{<hw t="banner"
header="Documentation Update"
text="<strong>New tutorials available!</strong> Check out our <a href='/tutorials'>getting started guides</a> and <a href='/api-docs'>API documentation</a>."
class="ui info message">}}HTML content is processed safely for rich formatting options
Event banner with structured content
{{<hw t="banner"
header="🎉 Conference 2024"
text="Join us for our annual developer conference! <br><strong>Date:</strong> March 15-17, 2024 <br><strong>Location:</strong> San Francisco, CA <br><a href='/conference/register'>Register now</a> for early bird pricing!"
src="/images/conference-logo.png"
srcLink="/conference"
class="ui purple message">}}Structure complex information with HTML formatting and emojis
Additional Information