You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+60Lines changed: 60 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,66 @@ The project uses Tailwind CSS with a custom configuration:
102
102
- Configure Tailwind in `tailwind.config.js`
103
103
- Custom classes can be added to `assets/css/`
104
104
105
+
### Banner System
106
+
107
+
The website includes a flexible banner system for announcements and surveys. The banner system is integrated into the header component (`components/header.html`) and automatically appears on all pages.
108
+
109
+
#### Adding a New Banner
110
+
111
+
1. Edit `components/header.html` and add your banner to the `banners` array in the `bannerSystem()` function:
112
+
```javascript
113
+
{
114
+
id:'unique-banner-id', // Unique identifier for localStorage
115
+
message:'Your announcement', // Main banner text
116
+
link:'https://example.com', // Optional link URL
117
+
linkText:'Learn more →', // Link text
118
+
bgColor:'bg-brand-primary', // Tailwind background class
119
+
icon:'check', // Icon type: 'check' or 'megaphone'
120
+
priority:1// Higher priority shows first
121
+
}
122
+
```
123
+
124
+
2. Available background colors:
125
+
-`bg-brand-primary` - Teal (default MONAI color)
126
+
-`bg-purple-600` - Purple (for surveys/feedback)
127
+
-`bg-blue-600` - Blue
128
+
-`bg-green-600` - Green
129
+
-`bg-red-600` - Red (for urgent announcements)
130
+
131
+
3. Banner features:
132
+
- Only one banner displays at a time (highest priority non-dismissed)
133
+
- Users can dismiss banners (stored in localStorage)
134
+
- Header automatically adjusts position when banner is visible
0 commit comments