View Hooks
Iridium has some basic view hooks dotted throughout the program.
The purpose of view hooks is to allow you to inject your own custom templ components directly into our templates without directly overriding them.
Example
A typical example would be wanting to include a banner at the top of your Iridium application for announcements or critical information
Here is how you'd register a banner for your page that sits above all content:
go
bootstrap.RegisterStaticView(
hooks.RootTop,
templ.ComponentFunc(func(ctx context.Context, w io.Writer) error {
io.WriteString(w, `
<div
id="status-content"
class="top-0 left-0 w-full z-50 bg-red text-destructive-foreground py-2 shadow-md"
>
<div class="mx-auto text-center px-4">
Redundancy Mode
</div>
</div>
`)
return nil
}))You can read more about overriding []