Skip to content

Commit aa57fdf

Browse files
New design for the docs landing page hero section (#11165)
* feat: updating landing page hero section with new design * style updates for hero section * feat: hero section updates based on suggestions * Reduce hero size and image for better UX * Fixed hero image width and alignment display
1 parent eea368f commit aa57fdf

5 files changed

Lines changed: 83 additions & 15 deletions

File tree

assets/scss/_front-page.scss

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,68 @@
22

33
.td-main main.lp {
44
padding: 2rem 2.5rem;
5-
padding-top:5.25rem !important;
5+
padding-top: 0 !important; // top clearance handled by lp-mobile-bar (mobile) and lp-hero (desktop)
6+
7+
@include media-breakpoint-up(md) {
8+
padding-top: 0 !important;
9+
}
610
}
711

812
div.lp-container {
913
padding: 0;
1014
margin: 0;
15+
max-width: none;
1116
}
1217

1318
.lp-row{
1419
margin-bottom: 2rem !important;
1520
}
1621

22+
.lp-hero {
23+
background-color: $dark;
24+
min-height: 350px;
25+
margin-left: -2.5rem;
26+
margin-right: -2.5rem;
27+
padding: 2rem 2.5rem;
28+
29+
@include media-breakpoint-down(md) {
30+
min-height: unset;
31+
}
32+
}
33+
34+
.hero-text {
35+
flex: 0 0 100%;
36+
// Stretch out text once image disappears (smaller viewports)
37+
@include media-breakpoint-up(lg) {
38+
flex: 0 0 auto;
39+
max-width: 60%;
40+
}
41+
}
42+
1743
h1.page-title {
1844
font-weight: $font-weight-normal;
1945
font-size: 2rem;
20-
margin-bottom: 0.75rem;
46+
margin-bottom: 1rem;
2147
}
2248

2349
h5.lp-description {
2450
font-size: 1rem;
2551
font-weight: 400;
52+
line-height: 1.5;
2653
}
2754

2855
.lp-container img {
2956
border-style: none;
57+
max-width: 100%;
58+
height: auto;
59+
}
60+
61+
.lp-container .hero-image img {
62+
height: 220px;
63+
width: auto;
64+
max-width: unset;
65+
flex-shrink: 0;
66+
3067
}
3168

3269
img.card-icon {
@@ -99,3 +136,19 @@ p.rn-date {
99136
font-weight: 400;
100137
margin-bottom: 0rem;
101138
}
139+
140+
// Mobile hamburger bar on landing page — matches hero background
141+
.lp-mobile-bar {
142+
background-color: $dark;
143+
margin-left: -2.5rem;
144+
margin-right: -2.5rem;
145+
padding: 4rem 2.5rem 0.75rem;
146+
color: white;
147+
148+
.btn {
149+
color: white;
150+
font-size: 0.75rem;
151+
font-weight: 400;
152+
margin-bottom: 0rem;
153+
}
154+
}

assets/scss/_variables_project.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ $enable-shadows: true; //TODO: consider removing this duplicate variable from th
1111

1212
$primary: #146FF4; // MX Blue (Blue-7 from PDS) YL - updated the Mendix Blue color to its latest version in MX 10
1313
$primary-light: #47A9FF; // DB - Blue-5 from PDS
14-
$secondary: #0A1325; // Gray-10 from PDS (MxDock color)
14+
$secondary: #0A1324; // Gray-10 from PDS (MxDock color)
1515
$success: #0D990D; // DB - Green-8 from PDS
1616
$info: #146FF4; // MX Blue YL - updated the Mendix Blue color to its latest version in MX 10
1717
$warning: #C97800; // DB - Yellow-8 from PDS
1818
$danger: #D31E23; // DB - Red-7 PDS
1919
$white: #fff; // YL - Override the default color defined in _variables_forward.scss
2020
$light: #99D0FF; // DB - Blue-3 from PDS
21-
$dark: #0A1325; // Gray-10 from PDS (MxDock color)
21+
$dark: #0A1324; // Gray-10 from PDS (MxDock color)
2222
$blue: #146FF4; // YL - Mendix Blue in SP 10; Override the default color defined in _variables_forward.scss
2323
$company-approved: #E0FAE1; // NC - Company approved Marketplace label
2424
$gray-100: #f7f7f7;

layouts/landingpage/landingpage.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,24 @@
1717
<!-- Main page content (everything except the left sidebar, top dock, and footer) -->
1818
<main class="col lp" role="main" style="border-right: none;">
1919
<!-- Olu - Mobile header row: hamburger (mobile only) -->
20-
<div class="d-flex d-md-none align-items-start">
20+
<div class="d-flex d-md-none align-items-start lp-mobile-bar">
2121
<button id="td-mobile-sidebar-btn" class="btn btn-link p-0 me-2 align-items-center" aria-label="Open sidebar">
22-
<span class="fas fa-bars text-dark fs-4 fa-fw" aria-hidden="true"></span>
22+
<span class="fas fa-bars fs-4 fa-fw" aria-hidden="true"></span>
2323
<span class="sr-only">Menu</span>
2424
</button>
2525
</div>
2626
<div class="container lp-container">
2727

2828
<!-- Title, Description, and Illustration -->
29-
<div class="row">
30-
<div class="col-lg-auto d-flex">
31-
<!-- Title and description from https://github.com/mendix/docs/blob/development/content/en/docs/_index.md -->
32-
<div class="flex-grow-1">
33-
<h1 class="page-title">{{ .Page.Title}}</h1>
34-
<h5 class="lp-description">{{ .Page.Description}}</h5>
35-
</div>
36-
<img src="/images/woman-stack-of-books-laptop.svg" alt="" class="d-none d-lg-block ms-4" style="margin-top: -.5rem;">
29+
<div class="lp-hero d-flex align-items-center text-white">
30+
31+
<div class="hero-text">
32+
<h1 class="page-title">{{ .Page.Title }}</h1>
33+
<h5 class="lp-description">{{ .Page.Description }}</h5>
34+
</div>
35+
36+
<div class="hero-image d-none d-lg-block">
37+
<img src="/images/lp-hero-image.svg" alt="Person sitting on a stack of books while using a laptop">
3738
</div>
3839
</div>
3940

layouts/shortcodes/icon.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"blue" "#146ff4"
1414
"gray" "#9ea2a9"
1515
"black" "#000000"
16-
"dark" "#0a1325"
16+
"dark" "#0a1324"
1717
-}}
1818

1919
{{- if ne $color nil -}}

static/images/lp-hero-image.svg

Lines changed: 14 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)