Skip to content
This repository was archived by the owner on Oct 2, 2025. It is now read-only.

Commit c69c39a

Browse files
features images turned to links
1 parent 7bc6924 commit c69c39a

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

src/pages/Feature.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,33 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
55
// styles
66
import styles from './styles.module.css';
77

8-
const Feature = ({ imageUrl, title, description, centered = true, as: Typography = 'h3' }) => {
8+
const Feature = ({
9+
imageUrl,
10+
title,
11+
description,
12+
centered = true,
13+
as: Typography = 'h3',
14+
path,
15+
}) => {
916
const imgUrl = useBaseUrl(imageUrl);
1017

11-
return (
18+
const renderContent = () => (
1219
<div className={clsx('col', styles.feature, centered && 'text--center')}>
1320
{imgUrl && <img src={imgUrl} alt={title} />}
1421
{title && <Typography>{title}</Typography>}
1522
{description && <p>{description}</p>}
1623
</div>
1724
);
25+
26+
if (path) {
27+
return (
28+
<a className={styles.link} href={path}>
29+
{renderContent()}
30+
</a>
31+
);
32+
}
33+
34+
return renderContent();
1835
};
1936

2037
export default Feature;

src/pages/Features.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,21 @@ const featuresConfig = [
5959
imageUrl: 'img/android-sdk.png',
6060
description:
6161
'Using our native Android SDK you have a simple interface to our core functionalities allowing you to build Android apps with authentication, in-app payments and access entitlement flows.',
62+
path: 'docs/androidsdk',
6263
},
6364
{
6465
title: 'iOS SDK',
6566
imageUrl: 'img/ios-sdk.png',
6667
description:
6768
'Build iOS apps that have authentication, in-app payments and access entitlement flows. Our iOS SDK can be used for easy integration with the InPlayer system.',
69+
path: 'docs/iossdk',
6870
},
6971
{
7072
title: 'JavaScript SDK',
7173
imageUrl: 'img/js-sdk.png',
7274
description:
7375
'Our JavaScript SDK is equipped with all methods our paywall app is using, allowing you to customize the end-user journey as you wish.',
76+
path: 'docs/jssdk',
7477
},
7578
],
7679
[
@@ -79,17 +82,20 @@ const featuresConfig = [
7982
imageUrl: 'img/paywall-app.png',
8083
description:
8184
'Our plug-and-play embeddable application that provides a sleek user experience of authentication, payment and access entitlement.',
85+
path: 'docs/paywall3',
8286
},
8387
{
8488
title: 'REST API',
8589
imageUrl: 'img/rest-api.png',
8690
description: 'Complete reference documentation to the InPlayer REST API',
91+
path: 'api',
8792
},
8893
{
8994
title: 'Webhooks',
9095
imageUrl: 'img/webhooks.png',
9196
description:
9297
'InPlayer sends webhooks to notify you when an event happens in your merchant account (e.g. a new account registered to watch your content).',
98+
path: 'docs/webhooks',
9399
},
94100
],
95101
];

src/pages/styles.module.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* CSS files with the .module.css suffix will be treated as CSS modules
55
* and scoped locally.
66
*/
7-
section {
7+
section {
88
padding: 72px 0;
99
}
1010

@@ -106,6 +106,16 @@
106106
display: flex;
107107
}
108108

109+
.link {
110+
width: 50rem;
111+
color: #000;
112+
}
113+
114+
.link:hover {
115+
text-decoration: none;
116+
color: #000;
117+
}
118+
109119
@media only screen and (max-width: 768px) {
110120
.hero {
111121
padding-left: 20px;
@@ -134,4 +144,4 @@
134144
.indexCtasGitHubButton {
135145
display: none;
136146
}
137-
}
147+
}

0 commit comments

Comments
 (0)