Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added home page links #549

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions src/components/HomepageFeatures/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import styles from './styles.module.css';
import UserManualImage from '@site/static/img/playcanvas-user-manual.png';
import TutorialsImage from '@site/static/img/playcanvas-tutorials.png';
import ApiReferenceImage from '@site/static/img/playcanvas-api-reference.png';
import Link from '@docusaurus/Link';

const FeatureList = [
{
title: 'User Manual',
Image: UserManualImage,
Url: './user-manual',
description: (
<>
Learn about every aspect of PlayCanvas, from the basics to advanced.
Expand All @@ -19,6 +21,7 @@ const FeatureList = [
{
title: 'Tutorials',
Image: TutorialsImage,
Url: './tutorials',
description: (
<>
Real world applications of PlayCanvas that make learning both fun and
Expand All @@ -38,16 +41,18 @@ const FeatureList = [
},
];

function Feature({Image, title, description}) {
function Feature({Image, title, description, Url}) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<img src={Image} alt={title} className={styles.featureImg} />
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3">{title}</Heading>
<p>{description}</p>
</div>
<Link to={Url}>
<div className="text--center">
<img src={Image} alt={title} className={styles.featureImg} />
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3">{title}</Heading>
<p>{description}</p>
</div>
</Link>
</div>
);
}
Expand Down
10 changes: 10 additions & 0 deletions src/components/HomepageFeatures/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@
width: 100%;
}

.features a {
color: var(--ifm-navbar-link-color);
}

.features a:hover {
color: var(--ifm-navbar-link-hover-color);
text-decoration: none;
}

.featureImg {
height: 200px;
width: 200px;
border-radius: .5rem;
}