Skip to content

Conversation

@GregWarren14
Copy link
Contributor

Implements Report Summary detail page design with custom banner layout and responsive section navigation.

Reworked how we were structuring this to use layout builder instead of dedicated template. I was having issues getting the jump nav swap to work correctly with just pure css, so this was the solution I opted for. This should include all of the necessary config.

web/modules/custom/ilr/css/report-summary.css

  • Custom styling for Report Summary content type banner and layout
  • 50/50 split banner with dark overlay and image positioning
  • Sidebar card styling with absolute positioning
  • Section navigation styles (mobile dropdown + desktop horizontal layout)
  • Typography, spacing, colors, and responsive breakpoints

web/modules/custom/ilr/ilr.module

  • ilr_preprocess_node(): Attaches report_summary library to Report Summary nodes
  • ilr_preprocess_field(): Overrides PDF link text to "Read the Report"
  • ilr_preprocess_layout(): Adds .cu-banner--report_summary class to banner layouts
  • ilr_preprocess_item_list(): Passes node context to section navigation template for conditional rendering

web/modules/custom/ilr/ilr.libraries.yml

  • Defines report_summary library that bundles CSS and JavaScript
  • Includes report-summary.css for styling
  • Includes section-navigation.js for mobile dropdown functionality
  • Attached to Report Summary nodes via preprocess function

web/modules/custom/ilr/js/section-navigation.js

  • Drupal behavior that handles mobile select dropdown navigation
  • Listens for change events on the select element
  • Navigates to selected section URL when user makes a selection
  • Uses data attributes to prevent duplicate attachment

web/themes/custom/union_marketing/templates/content/item-list--section-navigation.html.twig

  • Template override for section navigation rendering
  • Detects Report Summary pages via node.bundle() check
  • Renders mobile select dropdown (< 1000px) with "JUMP TO:" label
  • Renders desktop horizontal list (≥ 1000px) with uppercase labels and arrows
  • Falls back to Union's default _page-nav.twig for other content types

- Created report_summary content type with all required fields
- Added Report topics vocabulary
- Created field storages: emphasized_title_text, report_pdf, report_topics
- Added field instances: address (state only), authors, published_date, representative_image, sections, report_pdf, report_topics, emphasized_title_text
- Configured Layout Builder display with banner layout including sidebar region
- Updated banner layout to include sidebar region for metadata display
- Updated ilr_section_navigation to support report_summary bundle
- Added layout_builder__layout field for Layout Builder functionality
- Created custom CSS for report_summary banner with 50/50 split layout
- Added dark overlay on left side with content, image on right side
- Styled title with FuturaBT ExtraBlack font at 50px
- Added pill-style topic tags with different mobile/desktop treatments
- Created sidebar card with metadata fields and download button
- Positioned sidebar absolutely on desktop (overlapping image), stacked on mobile
- Added report_summary library to il
- Changed published_date field formatter from datetime_default to datetime_custom with format 'D, m/d/Y'
- Added field preprocess hook to override PDF link text to 'Read the Report' for report_summary bundle
- Removed unnecessary last-child margin-bottom CSS rule from banner sidebar
… pages

- Created custom section navigation CSS for report_summary bundle with gray background and horizontal padding
- Implemented mobile select dropdown (shown below 1000px) with custom styling and down arrow icon
- Added desktop horizontal navigation list (shown at 1000px+) with uppercase links and down arrow icons
- Created JavaScript behavior to handle mobile select dropdown navigation
- Updated item_list preprocess to pass current
- Removed ::before pseudo-element that displayed "REPORT" label above title
- Label was only shown on mobile (max-width: 999px) with Replica Std font
- Cleaned up comment for down arrow styling
…mmary pages

- Removed dark overlay (::before pseudo-element) on mobile
- Changed banner to flex column layout on mobile with auto min-height
- Moved content background color to content wrapper (#222222) with reduced padding
- Stacked media below content on mobile using flexbox order property
- Set media to relative positioning with 400px height on mobile
- Adjusted sidebar positioning: centered horizontally and positioned at 28rem from
@GregWarren14 GregWarren14 requested a review from jeffam January 7, 2026 18:56
@jeffam
Copy link
Contributor

jeffam commented Jan 8, 2026

Thanks, @GregWarren14. This is the result of my first Summary Report node. Do you see similar issues?

Screenshot 2026-01-08 at 11 51 04 AM

Specifically:

  • There's a banner frame that shouldn't be there.
  • Fields in the banner sidebar have their labels. And they're huge!
  • The sidebar and sidebar button have rounded corners that we don't seen in the figma mockup.
  • The topic pills have underlines and are links. At this point, I don't think they should link to anything.
  • The breadcrumbs are too dark.
  • The CSS uses native font-... properties instead of our custom --cu-font-... properties. Also, we nearly always use --cu-ms() values for font sizes rather than pixel values. In most cases, font stuff shouldn't even need to be declared since our default is replica and headings have standard sizes.

@jeffam jeffam force-pushed the feature/report-detail-page-v2 branch from c5ce3ce to 7e05af2 Compare January 9, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants