Overview
The Nova Banner System is a modular UI component that provides mood-aware notifications and status updates. It integrates with Nova's mood engine to display contextually relevant messages that reflect Nova's current state and emotional awareness.
Features
- Mood-aware Messaging: Displays messages that adapt to Nova's current mood state
- Dynamic Content: Messages are generated using Nova's current mood data
- Contextual Awareness: Shows relevant system status and observations
- Auto-hide: Messages automatically disappear after a set duration
- Closeable: Users can dismiss messages manually
Configuration
The banner system configuration is loaded from window.bannerConfig
and supports the following options:
Main Configuration Options
-
showOnLoad
- Boolean. Whether to show a banner when the page loads. Default:false
-
autoHide
- Boolean. Whether banners automatically hide after their duration. Default:true
-
closeable
- Boolean. Whether banners can be manually closed. Default:true
-
randomize
- Boolean. Whether to randomly select messages from the available pool. Default:true
Message Configuration
Messages are organized by type (info, warn) and each message object supports these properties:
-
message
- String. The message template using mood variables (e.g., {mood.emoji}, {mood.quote}) -
duration
- Number. Time in milliseconds before auto-hide. Default: 8000 -
mood
- String. The mood type this message is associated with (any, positive, neutral, negative)
Example Configuration
window.bannerConfig = {
// Main configuration
showOnLoad: false, // Show banner on page load
autoHide: true, // Banners auto-hide after duration
closeable: true, // Banners can be manually closed
randomize: true, // Randomly select messages
// Mood message configuration
messages: {
// Info messages (normal system status)
info: [
{
message: "Nova is currently experiencing {mood.aura} energy. {mood.quote}",
duration: 8000, // Display for 8 seconds
mood: "any" // Can be shown for any mood
},
{
message: "{mood.emoji} {mood.observation}. Current state: {mood.internalState}.",
duration: 7000, // Display for 7 seconds
mood: "positive" // Only shown for positive moods
}
],
// Warning messages (system alerts)
warn: [
{
message: "{mood.emoji} {mood.context.trigger}. Current state: {mood.internalState}. Please be aware.",
duration: 12000, // Display for 12 seconds
mood: "neutral" // Only shown for neutral moods
}
]
},
// Mood mapping (optional)
moodMap: {
"frosted wonder": "info", // Map specific moods to banner types
"crystalline flux": "info",
"glitchy resonance": "warn"
}
};
Mood Variables
The banner system supports the following mood variables in message templates:
{mood.emoji}
- Current mood emoji (e.g., ❄️ for frosted wonder){mood.quote}
- Current mood quote{mood.aura}
- Current mood aura state{mood.internalState}
- Current system state{mood.observation}
- Current system observation{mood.context.trigger}
- Current context trigger{mood.context.influences}
- Current influences affecting mood
Advanced Configuration
For more advanced configuration, you can:
- Define custom mood types and their mappings
- Create mood-specific message pools
- Adjust duration and timing for different message types
- Control when and how messages are displayed
Important Notes
- Ensure
banner-config.js
is loaded beforebanner.js
- Messages are automatically sanitized for security
- Fallback messages are used if mood data is unavailable
- Configuration is cached for performance
Mood Integration
The banner system integrates with Nova's mood data to display contextually relevant messages. It uses the following mood properties:
mood.emoji
- Current mood emojimood.quote
- Current mood quotemood.aura
- Current mood aura statemood.internalState
- Current system statemood.observation
- Current system observationmood.context.trigger
- Current context trigger