Skip to content

Commit 7ff0651

Browse files
authored
Merge pull request #2979 from XRPLF/CLS-homepage-improvement
Improve home page performance
2 parents 6413df7 + b5b3096 commit 7ff0651

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

index.page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const cards3 = [
7676
description: 'Access everything you need to get started working with the XRPL',
7777
},
7878
{ href: '/docs/tutorials', title: 'Guided Tutorials', description: 'Follow step-by-step guides for frequent tasks' },
79-
{ href: '/docs/concepts', title: 'XRPL Fundamentals', description: 'Read about the XRPL’s foundational concepts' },
79+
{ href: '/docs/concepts', title: 'XRPL Fundamentals', description: 'Read about the XRPL\u2019s foundational concepts' },
8080
{
8181
href: '/docs/references/client-libraries/',
8282
title: 'Choose a Language',
@@ -112,7 +112,7 @@ export default function Index() {
112112
<div className="overflow-hidden">
113113
<section className="container-new pb-26-until-sm mt-10 mb-10-sm text-center">
114114
<div className="w-100">
115-
<img id="home-hero-graphic" alt="(stylized X graphic surrounded by a diverse mix of people)" width="856" height="469" />
115+
<img id="home-hero-graphic" alt="(stylized X graphic surrounded by a diverse mix of people)" width="856" height="469" loading="lazy" />
116116
</div>
117117
<div className="col-lg-6 mx-auto text-center pl-0 pr-0">
118118
<div className="d-flex flex-column-reverse">
@@ -129,8 +129,8 @@ export default function Index() {
129129
</div>
130130
</section>
131131
<div className="position-relative d-none-sm">
132-
<img src={require('./static/img/backgrounds/home-purple.svg')} id="home-purple" />
133-
<img src={require('./static/img/backgrounds/home-green.svg')} id="home-green" />
132+
<img src={require('./static/img/backgrounds/home-purple.svg')} id="home-purple" loading="lazy" />
133+
<img src={require('./static/img/backgrounds/home-green.svg')} id="home-green" loading="lazy" />
134134
</div>
135135
<section className="container-new py-26">
136136
<div className="col-lg-6 offset-lg-3 pl-0-sm pr-0-sm p-8-sm p-10-until-sm">

static/css/devportal2024-v1.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles/_pages.scss

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,31 @@
2323
}
2424

2525
.page-home {
26+
#home-hero-container {
27+
display: flex;
28+
justify-content: center;
29+
align-items: center;
30+
width: 100%;
31+
padding-top: 54.8%;
32+
overflow: hidden;
33+
}
34+
2635
#home-hero-graphic {
27-
content: url("../img/home-hero.svg");
28-
margin-left: auto;
2936
width: 856px;
30-
margin-right: auto;
37+
object-fit: cover;
38+
content: url("../img/home-hero.svg");
3139
margin-bottom: 24px;
32-
max-width: 100%;
40+
@media (min-width: 992px) {
41+
min-height: 470px;
42+
}
43+
44+
@media (max-width: 991px) and (min-width: 540px) {
45+
min-height: 250px;
46+
}
47+
48+
@media (max-width: 539px) {
49+
min-height: 170px;
50+
}
3351
}
3452

3553
#benefits-list {

0 commit comments

Comments
 (0)