-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathHome.js
More file actions
46 lines (40 loc) · 2.32 KB
/
Copy pathHome.js
File metadata and controls
46 lines (40 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React from 'react';
import { Link } from 'react-router-dom';
const Home = () => {
const loggedIn = !!localStorage.getItem('userInfo');
return (
<div>
{/* HERO */}
<div style={{ backgroundColor: 'var(--udemy-purple)', color: 'white', padding: '80px 20px', textAlign: 'center' }}>
<h1 style={{ fontFamily: 'Merriweather, serif', fontSize: '3rem', margin: 0 }}>Learn Anytime, Anywhere</h1>
<p style={{ fontSize: '1.15rem', marginTop: 12 }}>Interactive courses, live study rooms and collaborative whiteboards.</p>
{!loggedIn && (
<div style={{ marginTop: 24 }}>
<Link to="/register"><button className="btn-signup" style={{ marginRight: 12 }}>Get Started</button></Link>
<Link to="/login"><button className="btn-login">Log in</button></Link>
</div>
)}
</div>
{/* FEATURES */}
<div className="page-container">
<h2 className="section-title">Everything You Need to Study Smarter</h2>
<div className="grid-container">
<FeatureCard emoji="📚" title="Premium Courses" desc="Top-tier video lectures and notes." link="/courses"/>
<FeatureCard emoji="🎥" title="Video Study Rooms" desc="Study live with peers and mentors." link="/study"/>
<FeatureCard emoji="🎨" title="Live Whiteboard" desc="Draw, solve and collaborate in real-time." link="/whiteboard"/>
<FeatureCard emoji="📝" title="Practice Quizzes" desc="Timed quizzes with instant feedback." link="/quizzes"/>
<FeatureCard emoji="📂" title="Resource Library" desc="Share notes and PDFs with the community." link="/resources"/>
</div>
</div>
</div>
);
};
const FeatureCard = ({ emoji, title, desc, link }) => (
<div className="course-card" style={{ padding: 28, borderRadius: 12 }}>
<div style={{ fontSize: 36, marginBottom: 8 }}>{emoji}</div>
<h3 className="card-title">{title}</h3>
<p className="card-author" style={{ marginTop: 8 }}>{desc}</p>
<Link to={link}><button style={{ marginTop: 14 }} className="btn-login">Explore</button></Link>
</div>
);
export default Home;