Skip to content

Commit b5fa367

Browse files
authored
Redesign: Match homepage to Figma design and apply theme site-wide (#68)
* redesign: match homepage to Figma design and apply theme site-wide - Update brand color from green to teal (#2ca4ab) with full light/dark palette - Add Inter font via Google Fonts for clean modern typography - Redesign homepage hero: light gray background, centered title/subtitle, 3 buttons - Replace SVG feature cards with 3 API cards (Content, OAuth2/OIDC, User-related) - Clean up navbar: shorter title, remove emoji prefixes, teal pill Request Access btn - Streamline footer to 3 columns matching Figma (API Docs, Community, More) - Apply new design tokens across request-access, request-scopes, and modal pages - Add reusable CSS variables for surfaces, borders, shadows, and radii - No functionality changes styling and presentation only * fix: keep Request Access visible on mobile homepage Removes the media query that hid the navbar Request Access button on mobile homepage. The old inline fallback button was removed in the redesign, so this rule left mobile users with no path to /request-access. * fix: remove duplicate site title in browser tab Layout no longer passes title=siteConfig.title on the homepage, so Docusaurus shows just the site title instead of repeating it twice. * feat: mobile Request Access as top hero button, Quick Start becomes outlined On mobile homepage: Request Access appears as the primary teal button at the top of the hero, Quick Start Guide swaps to outlined style, and Request Access is hidden from the hamburger menu to avoid duplication. * fix: address PR review use design tokens and fix footer link paths - Dark mode navbar: use var(--qf-surface-page) and var(--qf-border-card) instead of hardcoded colors - Hover backgrounds: use var(--ifm-color-emphasis-100) for theme-aware hover states - Border-radius: use var(--ifm-global-radius) instead of hardcoded 8px - Footer links: add leading / to OAuth2 and User-related API paths * Update homepage branding and developer benefits wording * Style Request Access menu item for sidebar in mobile and homepage
1 parent 4a145d0 commit b5fa367

10 files changed

Lines changed: 580 additions & 298 deletions

File tree

‎docusaurus.config.js‎

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const darkCodeTheme = require("prism-react-renderer/themes/dracula");
66

77
/** @type {import('@docusaurus/types').Config} */
88
const config = {
9-
title: "QuranFoundation API Documentation Portal",
10-
tagline: "Build Quran-related apps in no time!",
9+
title: "Quran Foundation Documentation Portal",
10+
tagline: "Our API documentation is clear, concise, easy to understand and will help you create innovative and engaging Quran-related apps.",
1111
// Set the production url of your site here
1212
url: "https://api-docs.quran.foundation",
1313
baseUrl: "/",
@@ -175,19 +175,19 @@ const config = {
175175
// Replace with your project's social card
176176
// image: 'img/docusaurus-social-card.jpg',
177177
navbar: {
178-
title: "QuranFoundation API Docs portal",
178+
title: "Quran Foundation API Docs",
179179
items: [
180180
{
181181
type: "doc",
182182
docId: "quickstart/index", // Points to your /docs/quickstart/index.md
183183
position: "left",
184-
label: "🚀 Quick Start",
184+
label: "Quick Start",
185185
},
186186
{
187187
type: "doc",
188188
docId: "updates/index",
189189
position: "left",
190-
label: "📢 Updates",
190+
label: "Updates",
191191
},
192192

193193
{
@@ -266,20 +266,16 @@ const config = {
266266
to: "/docs/category/content-apis",
267267
},
268268
{
269-
label: "Search APIs",
270-
to: "/docs/search_apis_versioned/quran-foundation-search-api",
271-
},
272-
{
273-
label: "JavaScript SDK",
274-
to: "/docs/sdk/javascript",
269+
label: "OAuth2 / OIDC APIs",
270+
to: "/docs/category/oauth2_apis",
275271
},
276272
{
277273
label: "User-related APIs",
278-
to: "docs/category/user-related-apis",
274+
to: "/docs/category/user-related-apis",
279275
},
280276
{
281-
label: "OAuth2 APIs",
282-
to: "docs/category/oauth2_apis",
277+
label: "Search APIs",
278+
to: "/docs/search_apis_versioned/quran-foundation-search-api",
283279
},
284280
],
285281
},
@@ -299,29 +295,12 @@ const config = {
299295
label: "Donate",
300296
to: "https://donate.quran.foundation",
301297
},
302-
{
303-
label: "Updates",
304-
to: "/docs/updates",
305-
},
306298
{
307299
label: "GitHub",
308300
href: "https://github.com/quran",
309301
},
310302
],
311303
},
312-
{
313-
title: "Legal",
314-
items: [
315-
{
316-
label: "Developer Terms of Service",
317-
to: "/legal/developer-terms",
318-
},
319-
{
320-
label: "Developer Privacy Policy Requirements",
321-
to: "/legal/developer-privacy",
322-
},
323-
],
324-
},
325304
],
326305
},
327306
prism: {

‎src/components/DeveloperModals/DeveloperBenefitsModal.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const benefitPoints: React.ReactNode[] = [
1717
target="_blank"
1818
rel="noopener noreferrer"
1919
>
20-
Quran App Portal
20+
Connected Quran Apps
2121
</Link>
2222
.
2323
</>,

‎src/components/DeveloperModals/DeveloperModal.module.css‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
justify-content: center;
88
z-index: 999;
99
padding: 1rem;
10+
backdrop-filter: blur(2px);
1011
}
1112

1213
.modalCard {
13-
background: #ffffff;
14-
color: #0f172a;
15-
border-radius: 14px;
14+
background: var(--qf-surface-card);
15+
color: var(--qf-text-primary);
16+
border-radius: var(--qf-radius-xl);
1617
max-width: 780px;
1718
width: min(90vw, 780px);
18-
box-shadow: 0 18px 38px rgba(0, 0, 0, 0.14);
19+
box-shadow: var(--qf-shadow-lg);
1920
padding: 1.6rem 1.5rem 2.4rem;
2021
animation: popIn 160ms ease;
2122
max-height: calc(100vh - 2rem);
@@ -41,9 +42,14 @@
4142
border: none;
4243
font-size: 1.5rem;
4344
cursor: pointer;
44-
color: #0f172a;
45+
color: var(--qf-text-muted);
4546
line-height: 1;
4647
padding: 0.25rem 0.5rem;
48+
transition: color 150ms ease;
49+
}
50+
51+
.closeButton:hover {
52+
color: var(--qf-text-primary);
4753
}
4854

4955
.modalList {

‎src/components/HomepageFeatures/index.tsx‎

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,49 @@
1-
import React from 'react';
2-
import clsx from 'clsx';
3-
import styles from './styles.module.css';
1+
import React from "react";
2+
import Link from "@docusaurus/Link";
3+
import styles from "./styles.module.css";
44

5-
type FeatureItem = {
5+
type ApiCard = {
66
title: string;
7-
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
8-
description: JSX.Element;
7+
icon: string;
8+
description: string;
9+
link: string;
910
};
1011

11-
const FeatureList: FeatureItem[] = [
12+
const ApiCards: ApiCard[] = [
1213
{
13-
title: 'Easy-to-use API documentation',
14-
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
15-
description: (
16-
<>
17-
Our API documentation is clear, concise, easy to understand and will help you create innovative and engaging Quran-related apps.
18-
</>
19-
),
14+
title: "Content APIs",
15+
icon: "📖",
16+
description:
17+
"Access Quranic chapters, verses, translations, audio files, and search through comprehensive endpoints designed for seamless app integration.",
18+
link: "/docs/category/content-apis",
2019
},
2120
{
22-
title: 'Try our APIs right from the browser',
23-
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
24-
description: (
25-
<>
26-
We provide the ability to try our APIs right from the browser. Try first and integrate into your app later.
27-
</>
28-
),
21+
title: "OAuth2 / OIDC APIs",
22+
icon: "🔐",
23+
description:
24+
"Implement secure user authentication using industry-standard OAuth2 and OpenID Connect flows. Manage tokens, authorization, and identity.",
25+
link: "/docs/category/oauth2_apis",
2926
},
3027
{
31-
title: 'Integration code examples',
32-
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
33-
description: (
34-
<>
35-
Each API comes with integration examples in popular programming languages, such as Java, Python, and JavaScript. Build your app in no time!
36-
</>
37-
),
28+
title: "User-related APIs",
29+
icon: "👤",
30+
description:
31+
"Manage user data including bookmarks, reading sessions, preferences, goals, notes, and collections. Build personalized Quran experiences.",
32+
link: "/docs/category/user-related-apis",
3833
},
3934
];
4035

41-
function Feature({title, Svg, description}: FeatureItem) {
36+
function ApiCardItem({ title, icon, description, link }: ApiCard) {
4237
return (
43-
<div className={clsx('col col--4')}>
44-
<div className="text--center">
45-
<Svg className={styles.featureSvg} role="img" />
46-
</div>
47-
<div className="text--center padding-horiz--md">
48-
<h3>{title}</h3>
49-
<p>{description}</p>
38+
<div className={styles.card}>
39+
<div className={styles.cardHeader}>
40+
<span className={styles.cardIcon}>{icon}</span>
41+
<h3 className={styles.cardTitle}>{title}</h3>
5042
</div>
43+
<p className={styles.cardDescription}>{description}</p>
44+
<Link className={styles.cardLink} to={link}>
45+
See docs →
46+
</Link>
5147
</div>
5248
);
5349
}
@@ -56,9 +52,15 @@ export default function HomepageFeatures(): JSX.Element {
5652
return (
5753
<section className={styles.features}>
5854
<div className="container">
59-
<div className="row">
60-
{FeatureList.map((props, idx) => (
61-
<Feature key={idx} {...props} />
55+
<div className={styles.sectionHeader}>
56+
<h2 className={styles.sectionTitle}>Get started with our APIs:</h2>
57+
<Link className={styles.sectionLink} to="/docs/category/content-apis">
58+
See API References
59+
</Link>
60+
</div>
61+
<div className={styles.cardGrid}>
62+
{ApiCards.map((card) => (
63+
<ApiCardItem key={card.title} {...card} />
6264
))}
6365
</div>
6466
</div>
Lines changed: 117 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,123 @@
1+
/**
2+
* HomepageFeatures – API card grid styles.
3+
*/
4+
15
.features {
6+
padding: 3rem 0 4rem;
7+
}
8+
9+
/* ── Section header ── */
10+
.sectionHeader {
11+
display: flex;
12+
justify-content: space-between;
13+
align-items: baseline;
14+
margin-bottom: 1.5rem;
15+
flex-wrap: wrap;
16+
gap: 0.5rem;
17+
}
18+
19+
.sectionTitle {
20+
font-size: 1.25rem;
21+
font-weight: 700;
22+
color: var(--qf-text-primary);
23+
margin: 0;
24+
}
25+
26+
.sectionLink {
27+
font-size: 0.9rem;
28+
font-weight: 500;
29+
color: var(--ifm-color-primary);
30+
text-decoration: underline;
31+
text-underline-offset: 2px;
32+
}
33+
34+
.sectionLink:hover {
35+
color: var(--ifm-color-primary-dark);
36+
}
37+
38+
/* ── Card grid ── */
39+
.cardGrid {
40+
display: grid;
41+
grid-template-columns: repeat(3, 1fr);
42+
gap: 1.25rem;
43+
}
44+
45+
/* ── Individual card ── */
46+
.card {
47+
background: var(--qf-surface-card);
48+
border: 1px solid var(--qf-border-card);
49+
border-radius: var(--qf-radius-lg);
50+
padding: 1.5rem;
51+
display: flex;
52+
flex-direction: column;
53+
transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
54+
}
55+
56+
.card:hover {
57+
border-color: var(--ifm-color-primary);
58+
box-shadow: var(--qf-shadow-md);
59+
transform: translateY(-2px);
60+
}
61+
62+
.cardHeader {
263
display: flex;
364
align-items: center;
4-
padding: 2rem 0;
5-
width: 100%;
65+
gap: 0.6rem;
66+
margin-bottom: 0.75rem;
67+
}
68+
69+
.cardIcon {
70+
font-size: 1.5rem;
71+
line-height: 1;
72+
}
73+
74+
.cardTitle {
75+
font-size: 1.1rem;
76+
font-weight: 700;
77+
color: var(--qf-text-primary);
78+
margin: 0;
79+
}
80+
81+
.cardDescription {
82+
font-size: 0.9rem;
83+
color: var(--qf-text-secondary);
84+
line-height: 1.6;
85+
flex: 1;
86+
margin: 0 0 1rem;
87+
}
88+
89+
.cardLink {
90+
font-size: 0.9rem;
91+
font-weight: 600;
92+
color: var(--ifm-color-primary);
93+
text-decoration: none;
94+
transition: color 150ms ease;
95+
}
96+
97+
.cardLink:hover {
98+
color: var(--ifm-color-primary-dark);
99+
text-decoration: underline;
100+
}
101+
102+
/* ── Responsive ── */
103+
@media screen and (max-width: 768px) {
104+
.features {
105+
padding: 2rem 0 3rem;
106+
}
107+
108+
.cardGrid {
109+
grid-template-columns: 1fr;
110+
gap: 1rem;
111+
}
112+
113+
.sectionHeader {
114+
flex-direction: column;
115+
gap: 0.25rem;
116+
}
6117
}
7118

8-
.featureSvg {
9-
height: 200px;
10-
width: 200px;
119+
@media screen and (min-width: 769px) and (max-width: 996px) {
120+
.cardGrid {
121+
grid-template-columns: repeat(2, 1fr);
122+
}
11123
}

0 commit comments

Comments
 (0)