Scheduled announcement banners#157
Merged
Merged
Conversation
Adds nullable TitleEn/Fr and SubtitleEn/Fr columns so banners can render a rich Microsoft-style layout (bold headline, uppercase subtitle, body message, solid pill CTA). When the title is empty, the compact centered layout is kept as a fallback. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The banner stack now sticks to the top of the viewport once the scroll threshold is reached, mirroring the navbar behavior. The navbar's pinned position is offset by the banner stack's measured height via a CSS custom property so the two stack cleanly instead of overlapping. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MessageEn/Fr, optionalTitleEn/Fr+SubtitleEn/Fr,Variant,StartDate/EndDate, optional CTA link,Dismissible,Priority,IsEnabled) with full CRUD through the admin panel.MainLayout. Two layouts: a rich Microsoft-style headline + subtitle + body + pill CTA when a title is set, and a compact centered single-line layout when it isn't.--banner-stack-heightCSS custom property is computed at scroll time so the navbar slides in cleanly below the pinned banner instead of overlapping.localStorage(dismissed-banners).Architecture
app.domain/Models/BannerAggregate/Banner.cs+BannerVariantenum +BannerModelview-model.IBannerServicewithGetAllAsync(paged),GetAsync,GetActiveAsync,CreateAsync,UpdateAsync,DeleteAsync.BannerService(validatesEndDate > StartDate, manages cache),BannerConfigurations(indexed onIsEnabled, StartDate, EndDate), two EF migrations.AdminBannersApimounted at/api/admin/banners(cookie auth, admin role).BannerStack.razorinjected at the top ofMainLayout.razor+ JS dismiss handler inwwwroot/js/app.js./admin/banners(index / new /\$id.edit),BannerForm,api/banners.ts, sidebar entry.Test plan
dotnet ef database update --project src/app.infrastructure --startup-project src/app --context AppDbContextnow ∈ [StartDate, EndDate]andIsEnabled = trueappear on the public sitePriority(desc) controls stack orderlocalStorage.removeItem('dismissed-banners'))MessageFr/TitleFr/SubtitleFr/LinkLabelFr🤖 Generated with Claude Code