Skip to content

Highlights banners on home page#3175

Merged
tom2drum merged 5 commits intomainfrom
tom2drum/issue-3157
Dec 18, 2025
Merged

Highlights banners on home page#3175
tom2drum merged 5 commits intomainfrom
tom2drum/issue-3157

Conversation

@tom2drum
Copy link
Copy Markdown
Collaborator

Description and Related Issue(s)

Resolves #3157

This PR implements a highlights banners section on the home page that allows showcasing key Blockscout features and products. The feature supports displaying up to 3 banners at a time, with support for banner rotation and pinned banners that always remain visible.

Proposed Changes

  • Added a new Highlights component that displays configurable banners on the home page
  • Implemented banner rotation logic that prioritizes pinned banners and randomly shuffles others
  • Added support for both internal page paths and external redirect URLs
  • Created type definitions and validation schema for the highlights banner configuration
  • Added tests for the Highlights component
  • Updated environment variables documentation

Environment Variables:

  • Added NEXT_PUBLIC_HOMEPAGE_HIGHLIGHTS_CONFIG to configure highlights banners via a JSON file URL. The config supports customizable banners with title, description, colors, backgrounds, side images, and link options. At least 2 banners are required in the config, with up to 3 visible at a time. Additional banners enable random rotation on page load.

Breaking or Incompatible Changes

None. This is a new feature that is opt-in via the environment variable.

Additional Information

The highlights section is only displayed on desktop viewports. On mobile, the section is hidden to maintain a clean layout. The banners support both light and dark color modes with separate styling options for each mode.

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

@tom2drum tom2drum requested a review from isstuev December 12, 2025 18:24
@tom2drum tom2drum merged commit 59b2e93 into main Dec 18, 2025
16 checks passed
@tom2drum tom2drum deleted the tom2drum/issue-3157 branch December 18, 2025 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ENVs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Highlights banners on home page

2 participants