Skip to content

Redesign homepage hero section#173

Open
iammajid wants to merge 7 commits into
developfrom
feature/hero-section-redesign
Open

Redesign homepage hero section#173
iammajid wants to merge 7 commits into
developfrom
feature/hero-section-redesign

Conversation

@iammajid

Copy link
Copy Markdown
Contributor

Reworks the homepage hero into a calmer, two-edition layout (Cryptomator + Hub).

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The home page hero is replaced with a two-panel "hero-split-contrast" layout presenting Cryptomator (for individuals) and Cryptomator Hub (for teams) side by side. A large block of new CSS defines split/aura/panel foundation styles and a full animated scene system with data-flow travelers, glow effects, and keyframes for both scenes — animations are off by default and activated only on hover under prefers-reduced-motion: no-preference. The Tailwind theme gains a --color-tertiary2 token, the --animate-slide animation is removed, and a global prefers-reduced-motion: reduce override is added. Navigation theming switches from IsHome to a darkNav page parameter, baseof.html introduces a flushHero flag for top-padding control, and EN/DE i18n files are updated with new hero copy keys.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • tobihagemann
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Redesign homepage hero section' clearly and specifically describes the main change in the pull request, which is redesigning the homepage hero section with a two-edition layout.
Description check ✅ Passed The description 'Reworks the homepage hero into a calmer, two-edition layout (Cryptomator + Hub)' directly relates to the changeset and accurately describes the primary objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/hero-section-redesign

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
assets/css/custom.css (1)

262-268: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Persistent will-change on idle decorative nodes.

will-change: transform (and transform, opacity) is declared statically on ~9 hero elements (here, plus the travelers, key, auth, anchor icons, hub img). Since animations are disabled until .hero-panel:hover, these elements sit idle most of the time yet keep the browser holding compositor layers, wasting memory on a high-traffic landing page. Consider moving the will-change hints into the prefers-reduced-motion: no-preference hover block alongside the animation-name activations so the promotion is scoped to when motion is actually running.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@assets/css/custom.css` around lines 262 - 268, The `.hero-scene-logo-img`
class has a static `will-change: transform` declaration that keeps the browser
maintaining compositor layers even when animations are idle, wasting memory.
Remove the `will-change: transform` property from the static
`.hero-scene-logo-img` rule and move it into a hover-activated state within a
`prefers-reduced-motion: no-preference` media query block, so the compositor
layer promotion only occurs when the animation is actually running. Apply the
same refactoring pattern to all approximately 9 hero elements mentioned
(travelers, key, auth, anchor icons, hub img, and others) that have static
`will-change` declarations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@assets/css/custom.css`:
- Around line 96-140: The stylelint declaration-empty-line-before rule requires
a blank line between `@apply` at-rules and regular CSS declarations. In the
.hero-split-panels class, add a blank line after the `@apply` statement and before
align-items: stretch. In the .hero-panel class, add a blank line after the
`@apply` statement and before the background property. In the .hero-scene class,
add a blank line after the `@apply` lg:scale-[1.1] statement and before position:
relative. These blank lines separate the at-rule from regular property
declarations as required by the linter.
- Around line 799-811: The stylelint rule `declaration-empty-line-before` is
failing because the `text-wrap: balance;` declarations in the `.font-h1`,
`.font-h2`, and `.font-h3` classes are not preceded by an empty line after the
`@apply` declarations. Add an empty line before each `text-wrap: balance;`
statement in all three font classes to satisfy the stylelint requirement and
pass the static analysis checks.

---

Nitpick comments:
In `@assets/css/custom.css`:
- Around line 262-268: The `.hero-scene-logo-img` class has a static
`will-change: transform` declaration that keeps the browser maintaining
compositor layers even when animations are idle, wasting memory. Remove the
`will-change: transform` property from the static `.hero-scene-logo-img` rule
and move it into a hover-activated state within a `prefers-reduced-motion:
no-preference` media query block, so the compositor layer promotion only occurs
when the animation is actually running. Apply the same refactoring pattern to
all approximately 9 hero elements mentioned (travelers, key, auth, anchor icons,
hub img, and others) that have static `will-change` declarations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0fab1194-0b98-44ba-b876-8857bbedd600

📥 Commits

Reviewing files that changed from the base of the PR and between b08c219 and b338a91.

⛔ Files ignored due to path filters (2)
  • static/img/logo-hub.png is excluded by !**/*.png
  • static/img/logo-hub.svg is excluded by !**/*.svg
📒 Files selected for processing (7)
  • assets/css/custom.css
  • assets/css/main.css
  • i18n/de.yaml
  • i18n/en.yaml
  • layouts/_default/baseof.html
  • layouts/index.html
  • layouts/partials/nav.html

Comment thread assets/css/custom.css
Comment on lines +96 to +140
.hero-split-panels {
@apply container relative grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-12;
align-items: stretch;
}

.hero-panel {
@apply relative flex flex-col items-center text-center p-10 md:p-12 rounded-sm shadow-sm overflow-hidden;
background:
linear-gradient(to bottom, transparent 60%, color-mix(in srgb, var(--accent, transparent) 4%, transparent)),
#fff;
}

.hero-panel-primary { --accent: var(--color-primary); }
.hero-panel-secondary { --accent: var(--color-tertiary2); }

.hero-panel-visual {
@apply flex items-center justify-center mt-6 mb-4 h-[180px];
}

.hero-panel-content {
@apply flex flex-col items-center flex-1;
}

.hero-panel-content h2 {
@apply font-headline font-bold text-xl uppercase tracking-wide mb-1;
}


.hero-panel-content .hero-panel-description {
@apply flex-1 text-balance;
}

.hero-panel-content a.btn {
@apply mt-auto;
}

/* ─────────────────────────────────────────────────────────────
Shared hero scene system — both Cryp and Hub illustrations use
a fixed 320×180 canvas with absolutely positioned anchors so
the two visuals share dimensions, spacing, and easing.
───────────────────────────────────────────────────────────── */

.hero-scene {
@apply lg:scale-[1.1];
position: relative;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Stylelint declaration-empty-line-before errors will fail lint.

Static analysis reports [error] at lines 98, 103-105, and 140: a plain declaration directly following an @apply at-rule needs a preceding empty line. Add a blank line before each.

🎨 Proposed fix
 .hero-split-panels {
   `@apply` container relative grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-12;
+
   align-items: stretch;
 }
 .hero-panel {
   `@apply` relative flex flex-col items-center text-center p-10 md:p-12 rounded-sm shadow-sm overflow-hidden;
+
   background:
     linear-gradient(to bottom, transparent 60%, color-mix(in srgb, var(--accent, transparent) 4%, transparent)),
     `#fff`;
 }
 .hero-scene {
   `@apply` lg:scale-[1.1];
+
   position: relative;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.hero-split-panels {
@apply container relative grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-12;
align-items: stretch;
}
.hero-panel {
@apply relative flex flex-col items-center text-center p-10 md:p-12 rounded-sm shadow-sm overflow-hidden;
background:
linear-gradient(to bottom, transparent 60%, color-mix(in srgb, var(--accent, transparent) 4%, transparent)),
#fff;
}
.hero-panel-primary { --accent: var(--color-primary); }
.hero-panel-secondary { --accent: var(--color-tertiary2); }
.hero-panel-visual {
@apply flex items-center justify-center mt-6 mb-4 h-[180px];
}
.hero-panel-content {
@apply flex flex-col items-center flex-1;
}
.hero-panel-content h2 {
@apply font-headline font-bold text-xl uppercase tracking-wide mb-1;
}
.hero-panel-content .hero-panel-description {
@apply flex-1 text-balance;
}
.hero-panel-content a.btn {
@apply mt-auto;
}
/* ─────────────────────────────────────────────────────────────
Shared hero scene system — both Cryp and Hub illustrations use
a fixed 320×180 canvas with absolutely positioned anchors so
the two visuals share dimensions, spacing, and easing.
───────────────────────────────────────────────────────────── */
.hero-scene {
@apply lg:scale-[1.1];
position: relative;
.hero-split-panels {
`@apply` container relative grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-12;
align-items: stretch;
}
.hero-panel {
`@apply` relative flex flex-col items-center text-center p-10 md:p-12 rounded-sm shadow-sm overflow-hidden;
background:
linear-gradient(to bottom, transparent 60%, color-mix(in srgb, var(--accent, transparent) 4%, transparent)),
`#fff`;
}
.hero-panel-primary { --accent: var(--color-primary); }
.hero-panel-secondary { --accent: var(--color-tertiary2); }
.hero-panel-visual {
`@apply` flex items-center justify-center mt-6 mb-4 h-[180px];
}
.hero-panel-content {
`@apply` flex flex-col items-center flex-1;
}
.hero-panel-content h2 {
`@apply` font-headline font-bold text-xl uppercase tracking-wide mb-1;
}
.hero-panel-content .hero-panel-description {
`@apply` flex-1 text-balance;
}
.hero-panel-content a.btn {
`@apply` mt-auto;
}
/* ─────────────────────────────────────────────────────────────
Shared hero scene system — both Cryp and Hub illustrations use
a fixed 320×180 canvas with absolutely positioned anchors so
the two visuals share dimensions, spacing, and easing.
───────────────────────────────────────────────────────────── */
.hero-scene {
`@apply` lg:scale-[1.1];
position: relative;
🧰 Tools
🪛 Stylelint (17.13.0)

[error] 98-98: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)


[error] 103-105: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)


[error] 140-140: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@assets/css/custom.css` around lines 96 - 140, The stylelint
declaration-empty-line-before rule requires a blank line between `@apply` at-rules
and regular CSS declarations. In the .hero-split-panels class, add a blank line
after the `@apply` statement and before align-items: stretch. In the .hero-panel
class, add a blank line after the `@apply` statement and before the background
property. In the .hero-scene class, add a blank line after the `@apply`
lg:scale-[1.1] statement and before position: relative. These blank lines
separate the at-rule from regular property declarations as required by the
linter.

Source: Linters/SAST tools

Comment thread assets/css/custom.css
Comment on lines 799 to +811
.font-h1 {
@apply font-headline font-medium text-3xl md:text-4xl leading-tight;
text-wrap: balance;
}

.font-h2 {
@apply font-headline font-medium text-xl md:text-2xl leading-snug;
text-wrap: balance;
}

.font-h3 {
@apply font-headline text-lg md:text-xl leading-relaxed;
text-wrap: balance;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Stylelint declaration-empty-line-before errors will fail lint.

Static analysis reports [error] at lines 801, 806, and 811: each text-wrap: balance; follows an @apply rule and needs a preceding empty line.

🎨 Proposed fix
 .font-h1 {
   `@apply` font-headline font-medium text-3xl md:text-4xl leading-tight;
+
   text-wrap: balance;
 }
 
 .font-h2 {
   `@apply` font-headline font-medium text-xl md:text-2xl leading-snug;
+
   text-wrap: balance;
 }
 
 .font-h3 {
   `@apply` font-headline text-lg md:text-xl leading-relaxed;
+
   text-wrap: balance;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.font-h1 {
@apply font-headline font-medium text-3xl md:text-4xl leading-tight;
text-wrap: balance;
}
.font-h2 {
@apply font-headline font-medium text-xl md:text-2xl leading-snug;
text-wrap: balance;
}
.font-h3 {
@apply font-headline text-lg md:text-xl leading-relaxed;
text-wrap: balance;
.font-h1 {
`@apply` font-headline font-medium text-3xl md:text-4xl leading-tight;
text-wrap: balance;
}
.font-h2 {
`@apply` font-headline font-medium text-xl md:text-2xl leading-snug;
text-wrap: balance;
}
.font-h3 {
`@apply` font-headline text-lg md:text-xl leading-relaxed;
text-wrap: balance;
}
🧰 Tools
🪛 Stylelint (17.13.0)

[error] 801-801: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)


[error] 806-806: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)


[error] 811-811: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@assets/css/custom.css` around lines 799 - 811, The stylelint rule
`declaration-empty-line-before` is failing because the `text-wrap: balance;`
declarations in the `.font-h1`, `.font-h2`, and `.font-h3` classes are not
preceded by an empty line after the `@apply` declarations. Add an empty line
before each `text-wrap: balance;` statement in all three font classes to satisfy
the stylelint requirement and pass the static analysis checks.

Source: Linters/SAST tools

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.

1 participant