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

feat: placed only one CTA on home page #417

Merged
merged 3 commits into from
Mar 3, 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
26 changes: 20 additions & 6 deletions apps/host/src/components/modules/home/hero/hero.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,31 @@

.heroImage {
width: min(80vh, 80vw);
aspect-ratio: calc(1120/736);
aspect-ratio: calc(1120 / 736);
}
}

.link a {
display: inline-block;
padding: 1rem;
margin: 0.5rem 0;
font-weight: 400;
color: white;
background-color: rgba(31, 6, 255, 68.7%);
font-weight: 600;
letter-spacing: 0.3rem;
color: black;
background-color: white;
border: 0.19rem solid rgba(31, 6, 255, 0.687);
border-radius: 8px;
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 12%);
&:hover {
box-shadow: 0 0 20px rgba(0, 0, 0, 0.34);
}
}

.heroTechImg {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
}
@media screen and (width >= 768px) {
.hero {
flex-direction: row;
Expand All @@ -43,7 +53,11 @@
margin-bottom: 3rem;
}
}

.heroTechImg {
display: flex;
justify-content: start;
gap: 10px;
}
.figure .heroImage {
width: min(60vh, 60vw);
}
Expand Down
42 changes: 31 additions & 11 deletions apps/host/src/components/modules/home/hero/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
import { coverTransparent } from '@fmc/assets/images';
import { coverTransparent, jsImg, reactImg, vueImg, angularImg } from '@fmc/assets/images';
import styles from './hero.module.scss';
import { HashLink } from 'react-router-hash-link';

function Hero() {
const allImg = [
{
title: 'JS',
imgSrc: jsImg,
},
{
title: 'react',
imgSrc: reactImg,
},
{
title: 'vue',
imgSrc: vueImg,
},
{
title: 'angular',
imgSrc: angularImg,
},
];
return (
<main className={styles.hero}>
<div>
Expand All @@ -13,16 +30,19 @@ function Hero() {
<p>by solving the collection of challenges from Frontend Mini Challenges</p>

<h3 className={styles.link}>
<HashLink to="javascript">JS Mini Challenges</HashLink>
</h3>

<h3 className={styles.link}>
<HashLink to="react">React Mini Challenges</HashLink>
</h3>

<h3 className={styles.link}>
<HashLink to="vue">Vue Mini Challenges</HashLink>
<HashLink to="javascript">Get Started</HashLink>
</h3>
<div className={styles.heroTechImg}>
{allImg.map((item) => (
<img
key={item.title}
src={item.imgSrc}
width={35}
height={35}
alt={`${item.title}-img`}
/>
))}
</div>
</div>

<figure className={styles.figure}>
Expand Down