Files
ThomasandClaude Opus 5 60531d63b7 [web] Add the Back to School group sale banner to the plans page (#36956)
* [web] Add the Back to School group sale banner to the plans page

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitOrigin-RevId: 596b23006fce7504fcdfd6341cf93429c08acc8b
2026-09-17 12:08:14 +00:00

46 lines
1.4 KiB
Plaintext

//- to be kept in sync with frontend/js/shared/components/notification.tsx
include ./material_symbol
mixin notificationIcon(type)
if type === 'info'
+material-symbol('info')
else if type === 'success'
+material-symbol('check_circle')
else if type === 'error'
+material-symbol('error')
else if type === 'warning'
+material-symbol('warning')
mixin notification(options)
- var {ariaLive, id, type, title, content, action, disclaimer, className, dismissId, dismissCookiePaths, isActionBelowContent} = options ?? {}
- var classNames = `notification notification-type-${type} ${className ? className : ''} ${isActionBelowContent ? 'notification-cta-below-content' : ''}`
if dismissId && dismissedNotifications.includes(dismissId)
//- Notification has been dismissed, do not render
else
div(
aria-live=ariaLive
role='alert'
id=id
class=classNames
data-ol-dismiss-id=dismissId
data-ol-dismiss-cookie-paths=dismissCookiePaths && dismissCookiePaths.join(',')
)
.notification-icon
+notificationIcon(type)
.notification-content-and-cta
.notification-content
if title
p
b #{title}
| !{content}
block
if action
.notification-cta !{action}
if disclaimer
.notification-disclaimer #{disclaimer}
if dismissId
.notification-close-btn
button(aria-label=translate('close') data-ol-dismiss-button)
+material-symbol('close')