Skip to content

Conversation

@naman79820
Copy link

@naman79820 naman79820 commented Nov 30, 2025

This PR fixes the following issues mentioned in #251:

  • Fixed banner illustration alignment and responsiveness between 992px–1200px.
  • Fixed overlapping logo and text in the "Create circuits" CTA section.
  • Updated footer year to 2025 in config.toml.

Changes made in:

  • layouts/index.html
  • assets/scss/templates/_main.scss
  • config.toml

Tested locally using hugo server -D — layout looks consistent across all viewport widths ✅

Before -

Desktop.2025.11.29.-.23.20.25.04.mp4

After -
image

Before -
image

After -
image

Summary by CodeRabbit

  • Chores

    • Updated copyright year to 2025.
  • Style

    • Improved responsive layout for medium-sized screens (992–1200px), optimizing spacing and sizing constraints on banner illustrations and section images.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 30, 2025

Walkthrough

Configuration updates include replacing the paginate key with paperSize and updating the copyright year from 2024 to 2025. Responsive SCSS rules were added for the 992–1200px breakpoint to constrain banner illustration and content image sizing.

Changes

Cohort / File(s) Summary
Configuration updates
config.toml
Replaced configuration key paginate with paperSize (value "5" retained as string); updated copyright year from 2024 to 2025.
Responsive design styles
assets/scss/_mixins.scss
Added two new media query rules under the 992–1199.98px breakpoint: constrained .banner .illustration with max-width: 540px and right: 15px, and capped first image in .section.pt-0 .row.shadow.bg-white.p-5 > div:first-child to width: 180px. Both use !important to enforce sizing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • No business logic changes; alterations are configuration-driven and styling-focused.
  • SCSS additions follow existing patterns and apply straightforward dimensional constraints with no conditional complexity.

Possibly related issues

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: fixing homepage illustration and CTA responsiveness, plus updating the footer year to 2025, which are all present in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 71d64ce and 66aa529.

📒 Files selected for processing (3)
  • assets/scss/templates/_main.scss (1 hunks)
  • config.toml (3 hunks)
  • layouts/index.html (1 hunks)
🔇 Additional comments (10)
assets/scss/templates/_main.scss (3)

48-76: Pagination styles are well-structured with proper interactive states.

The pagination component handles spacing, sizing, and hover/active state styling consistently, with appropriate use of color variables.


7-35: Banner responsive logic aligns with PR objectives.

The .banner section correctly toggles illustrations between desktop and mobile viewports via display: none on desktop breakpoints and conditional .illustration-mobile rendering. Padding tiers at desktop-lg (150px/100px) and desktop (100px/0) address the 992px–1200px viewport squeeze zone mentioned in the PR.


241-249: CTA image squeeze-zone safety cap targets the correct breakpoint.

The media query (min-width: 992px) and (max-width: 1199.98px) directly addresses the stated responsive issue for CTA section overlapping. A max-width: 180px constraint prevents crowding in the 992–1200px range.

Confirm that max-width: 180px is visually adequate to prevent the text-and-logo overlap mentioned in the PR. If the visual result still shows crowding, consider reducing further (e.g., 150px or 160px).

config.toml (3)

7-7: Configuration syntax is correct.

Both pagerSize = 5 and summaryLength = 10 are properly expressed as numeric (not string) values in TOML, which is appropriate for Hugo configuration.

Also applies to: 9-9


67-67: Copyright year updated to 2025.


85-86: Verify css/local.css file exists and is served correctly.

A new CSS plugin entry points to css/local.css, which should contain the styles defined in assets/scss/templates/_main.scss (or be the compiled output from it).

Confirm that the file static/css/local.css exists or is generated as part of the build process. If the CSS is compiled from SCSS, ensure the build pipeline includes the SCSS compilation step for assets/scss/templates/_main.scssstatic/css/local.css.

layouts/index.html (4)

4-16: Banner layout correctly implements responsive image toggling.

The banner uses a desktop illustration positioned absolutely with a separate mobile illustration wrapped in .illustration-mobile. This allows the styles in _main.scss to conditionally show/hide via breakpoints, supporting the stated responsive fix for desktop viewports.


25-28: Blog post rendering with pagination is correctly structured.

Posts are rendered via the "article" partial within the paginated result set. The .Render "article" hook allows reuse of post template logic.


54-90: Pagination logic is comprehensive but uses an unusual active-page detection pattern.

The Scratch-based logic for determining which page numbers to display is well-thought-out for handling lower-limit, middle, and upper-limit page ranges. However, line 84 uses {{ if eq . $paginator }} to detect the active page, which relies on object equality comparison. This may work in Hugo but is unconventional.

Verify that the active page highlighting on line 84 functions correctly by testing pagination across multiple pages locally. If the active state does not highlight properly, replace with the more explicit comparison:

-<li class="page-item{{ if eq . $paginator }} page-item active {{ end }}">
+<li class="page-item{{ if eq .PageNumber $paginator.PageNumber }} active{{ end }}">

111-134: CTA section properly respects config-driven rendering and responsive layout.

The CTA block:

  • Conditionally renders based on .Site.Params.cta.enable
  • Uses responsive columns (col-md-4 image, col-md-8 text)
  • Applies mr-4 margin to image for spacing alignment
  • Includes optional button rendering
  • All content is filtered with markdownify and relURL/absURL as appropriate

The cta-image class integrates with the responsive safety cap defined in _main.scss (max-width: 180px at 992–1200px), addressing the stated overlapping issue.

Copy link
Member

@tachyons tachyons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want theme layout and style override from here as it will make theme upgrade process unnecessarily complex. So make any generic style fixes upstream first.

Eg gethugothemes/northendlab-light-hugo#25

@naman79820 naman79820 force-pushed the fix/blog-responsive-issues-#251 branch from f3dd96f to c8073f8 Compare December 1, 2025 17:48
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
assets/scss/_mixins.scss (2)

152-165: Consolidate duplicate media query blocks and use existing mixin.

The same media query (min-width: 992px) and (max-width: 1199.98px) is defined twice (lines 154 and 161). Consolidate these into a single block. Additionally, a @mixin desktop-lg already exists (line 21–24) for the max-width: 1200px breakpoint; consider using it or creating a reusable mixin for this specific range to improve maintainability.

-/* --- 992–1200px squeeze zone fixes --- */
-@media (min-width: 992px) and (max-width: 1199.98px) {
-  .banner .illustration {
-    max-width: 540px !important;   /* ensure image size sticks */
-    right: 15px !important;        /* prevent overlap */
-  }
-}
-/* In the squeeze band, cap the image and give the text a nudge */
-@media (min-width: 992px) and (max-width: 1199.98px) {
-  .section.pt-0 .row.shadow.bg-white.p-5 > div:first-child img {
-    width: 180px !important;        /* 320–360 works well */
-  }
-}
+/* --- 992–1200px squeeze zone fixes --- */
+@media (min-width: 992px) and (max-width: 1199.98px) {
+  .banner .illustration {
+    max-width: 540px !important;   /* ensure image size sticks */
+    right: 15px !important;        /* prevent overlap */
+  }
+
+  .section.pt-0 .row.shadow.bg-white.p-5 > div:first-child img {
+    width: 180px !important;
+  }
+}

154-165: Reduce selector fragility and reconsider !important usage.

The selector .section.pt-0 .row.shadow.bg-white.p-5 > div:first-child img is tightly coupled to the HTML structure (utility classes and element positions). This makes the CSS brittle; future markup changes could silently break the styling. Consider:

  • Adding a dedicated CSS class to the target element in the HTML template (e.g., .cta-image) and referencing that instead.
  • Reviewing why !important is needed on both blocks; this often signals insufficient specificity in base styles. If the base styles use overqualified selectors or conflicting rules, consider refactoring those rather than layering !important overrides.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f3dd96f and c8073f8.

📒 Files selected for processing (2)
  • assets/scss/_mixins.scss (1 hunks)
  • config.toml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • config.toml
🔇 Additional comments (1)
assets/scss/_mixins.scss (1)

162-164: Clarify image width value and remove contradictory comment.

Line 163 contains a comment stating "320–360 works well" but the actual value applied is 180px. This is contradictory and may indicate a copy-paste error or incomplete refactoring. Verify that 180px is the intended value, and update the comment to reflect the actual constraint.

@naman79820 naman79820 requested a review from tachyons December 1, 2025 17:56
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.

2 participants