Skip to content

Commit 52fa341

Browse files
authored
QF-2598-Dhul-Hijja-homepage-updates (#2418)
* feat: update banner and links to promote Best Days donation campaign * feat: add Dhul-Hijjah best days landing page with styling and OG image support * fix: update QuranReflect post links in the-best-days page * fix: update text for best-day modal link to use plural form * style: update CSS properties and restructure content layout for Dhul-Hijjah page
1 parent 9131c3a commit 52fa341

File tree

8 files changed

+354
-20
lines changed

8 files changed

+354
-20
lines changed

locales/en/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"ayahs": "Ayahs",
9595
"beta": "Beta",
9696
"beyond-ramadan": "Grow Beyond Ramadan!",
97+
"best-days-banner": "Give during the best days!",
9798
"bookmark": "Bookmark",
9899
"bookmarked": "Bookmarked",
99100
"both": "Both",

locales/en/home.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"explore-topics": "Explore Topics",
88
"first-time-reading": "New to the Quran? <link>Start here</link>",
99
"grow-beyond-ramadan": "Grow with us <modalLink>Beyond Ramadan</modalLink>",
10+
"best-day": "Don't miss the rewards of <modalLink>the Best Days!</modalLink>",
1011
"know-someone": "Grow with us this <modalLink>Ramadan</modalLink>",
1112
"learning-plan": "Learning Plans",
1213
"listen-to-radio": "Listen to Quran Radio",

src/components/HomePage/ReadingSection/NewCard/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import IconContainer, { IconSize } from '@/dls/IconContainer/IconContainer';
1111
import Link, { LinkVariant } from '@/dls/Link/Link';
1212
import ArrowIcon from '@/public/icons/arrow.svg';
1313
import { logButtonClick } from '@/utils/eventLogger';
14-
import { getBeyondRamadanNavigationUrl } from '@/utils/navigation';
14+
import { getBestDayNavigationUrl } from '@/utils/navigation';
1515

1616
const ShareQuranModal = dynamic(() => import('./ShareQuranModal'), {
1717
ssr: false,
@@ -32,23 +32,23 @@ const NewCard: React.FC = () => {
3232
<>
3333
<Card
3434
onClick={() => {
35-
logButtonClick('homepage_grow_beyond_ramadan');
35+
logButtonClick('homepage_best_day');
3636
}}
3737
className={styles.firstTimeReadingCard}
38-
link={getBeyondRamadanNavigationUrl()}
38+
link={getBestDayNavigationUrl()}
3939
isNewTab
4040
>
4141
<div className={styles.cardOuterContainer}>
4242
<div className={styles.cardWithIcon}>
43-
<div className={styles.iconContainer}>🚀</div>
43+
<div className={styles.iconContainer}>🕋</div>
4444
<div className={styles.link}>
4545
<Trans
46-
i18nKey="home:grow-beyond-ramadan"
46+
i18nKey="home:best-day"
4747
components={{
4848
modalLink: (
4949
<Link
5050
variant={LinkVariant.Blend}
51-
href={getBeyondRamadanNavigationUrl()}
51+
href={getBestDayNavigationUrl()}
5252
className={styles.linkHref}
5353
onClick={onShareQuranClicked}
5454
isNewTab

src/components/Navbar/Navbar.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Button, { ButtonSize, ButtonType, ButtonShape } from '@/dls/Button/Button
1313
import DiamondIcon from '@/icons/diamond.svg';
1414
import { selectNavbar } from '@/redux/slices/navbar';
1515
import { logButtonClick } from '@/utils/eventLogger';
16-
import { getBeyondRamadanNavigationUrl } from '@/utils/navigation';
16+
import { getDonationUrl } from '@/utils/navigation';
1717

1818
const Navbar = () => {
1919
const { isActive } = useOnboarding();
@@ -27,12 +27,12 @@ const Navbar = () => {
2727
<nav className={classNames(styles.container, { [styles.hiddenNav]: !showNavbar })}>
2828
<Banner
2929
shouldShowPrefixIcon={false}
30-
text={t('beyond-ramadan')}
30+
text={t('best-days-banner')}
3131
ctaButton={
3232
<Button
33-
href={getBeyondRamadanNavigationUrl()}
33+
href={getDonationUrl()}
3434
onClick={() => {
35-
logButtonClick('navbar_beyond_ramadan');
35+
logButtonClick('navbar_best_days');
3636
}}
3737
isNewTab
3838
size={ButtonSize.Small}
@@ -41,7 +41,7 @@ const Navbar = () => {
4141
className={styles.donateButton}
4242
prefix={<DiamondIcon />}
4343
>
44-
{t('learn-more')}
44+
{t('donate')}
4545
</Button>
4646
}
4747
/>

src/lib/og.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export const getPreparingForRamadanOgImageUrl = ({ locale }: BaseOgOptions) =>
2222
export const getBeyondRamadanOgImageUrl = ({ locale }: BaseOgOptions) =>
2323
`${BASE_OG_URL}/api/og/beyond-ramadan?lang=${locale}`;
2424

25+
export const getBestDaysOgImageUrl = ({ locale }: BaseOgOptions) =>
26+
`${BASE_OG_URL}/api/og/the-best-days?lang=${locale}`;
27+
2528
export const getChapterOgImageUrl = ({
2629
chapterId,
2730
locale,

src/pages/contentPage.module.scss

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
@use "src/styles/breakpoints";
1+
@use 'src/styles/breakpoints';
22

33
.contentPage {
44
margin: auto;
55
@include breakpoints.desktop {
6-
width: 65%;
6+
inline-size: 65%;
77
}
88
@include breakpoints.smallerThanDesktop {
9-
width: 90%;
9+
inline-size: 90%;
1010
}
1111
* {
1212
line-height: calc(1.3 * var(--line-height-xlarge));
@@ -70,16 +70,31 @@
7070

7171
.list {
7272
list-style: unset;
73-
padding-inline-start: var(--spacing-mega);
7473
}
7574

76-
.underline {
77-
text-decoration: underline;
75+
.arabic {
76+
text-align: start;
77+
font-size: var(--font-size-normal);
78+
font-style: italic;
79+
direction: rtl;
80+
display: block;
81+
font-family: 'Noto Nastaliq Arabic', 'NotoNastaliq', serif;
82+
word-spacing: 0.1em;
83+
letter-spacing: 0.02em;
84+
padding-block: var(--spacing-xsmall);
7885
}
7986

80-
.subListItem {
81-
list-style-type: circle;
82-
margin-inline-start: var(--spacing-large);
87+
.numberedList {
88+
list-style-type: decimal !important;
89+
list-style-position: outside;
90+
91+
li {
92+
display: list-item;
93+
}
94+
}
95+
96+
.underline {
97+
text-decoration: underline;
8398
}
8499

85100
.ctaContainer {

0 commit comments

Comments
 (0)