summaryrefslogtreecommitdiff
path: root/frontend/src/pages/index.js
diff options
context:
space:
mode:
authorxAlpharax <42233094+xAlpharax@users.noreply.github.com>2023-12-10 08:39:32 +0200
committerxAlpharax <42233094+xAlpharax@users.noreply.github.com>2023-12-10 08:39:32 +0200
commit84913b0c5645071615cc113011d5696548905ef9 (patch)
tree2d9781cce31f73cb31d779fdc2f5a5fc9b92c95d /frontend/src/pages/index.js
parentccbbd775a921f92e5472ccf53317d9e31bd9152d (diff)
Merged the front-end and back-end dev environments into master.
Massive W for the team. Full Google Auth + other Prisma quirks and functionalities. Changes to be committed: new file: .gitattributes new file: backend/index.js new file: backend/login_pages/index.js new file: backend/package-lock.json new file: backend/package.json new file: backend/populate_prisma.js new file: backend/prisma/schema.prisma new file: backend/views/pages/auth.ejs new file: backend/views/pages/success.ejs new file: frontend/README.md new file: frontend/package-lock.json new file: frontend/package.json new file: frontend/public/favicon.ico new file: frontend/public/index.html new file: frontend/public/logo192.png new file: frontend/public/logo1922.png new file: frontend/public/logo512.png new file: frontend/public/manifest.json new file: frontend/public/robots.txt new file: frontend/src/App.css new file: frontend/src/App.js new file: frontend/src/App.test.js new file: frontend/src/Footer.css new file: frontend/src/Footer.js new file: frontend/src/components/Navbar.js new file: frontend/src/components/NavbarElements.js new file: frontend/src/components/logo192.png new file: frontend/src/index.css new file: frontend/src/index.js new file: frontend/src/logo.svg new file: frontend/src/pages/about.js new file: frontend/src/pages/contact.css new file: frontend/src/pages/contact.js new file: frontend/src/pages/courses.css new file: frontend/src/pages/courses.js new file: frontend/src/pages/index.css new file: frontend/src/pages/index.js new file: frontend/src/reportWebVitals.js new file: frontend/src/setupTests.js
Diffstat (limited to 'frontend/src/pages/index.js')
-rw-r--r--frontend/src/pages/index.js122
1 files changed, 122 insertions, 0 deletions
diff --git a/frontend/src/pages/index.js b/frontend/src/pages/index.js
new file mode 100644
index 0000000..ac0e470
--- /dev/null
+++ b/frontend/src/pages/index.js
@@ -0,0 +1,122 @@
+// Filename - pages/index.js
+
+import React from "react";
+import './index.css';
+function CourseCard({ imageUrl, title, text }) {
+ return (
+ <div className="col-12 col-md-6 col-lg-3 mb-2 text-dark">
+ <div className="card">
+ <a href="#">
+ <img src={imageUrl} className="card-img-top" alt="..." />
+ </a>
+ <div className="card-body">
+ <h5 className="card-title">{title}</h5>
+ <p className="card-text">{text}</p>
+ <a href="#" className="btn btn-primary background2">
+ Go somewhere
+ </a>
+ </div>
+ </div>
+ </div>
+ );
+}
+function PersonCard({ imageUrl, name, username, socialLinks, websites }) {
+ return (
+ <div className="col-md-12 col-xl-4 mb-3 text-dark">
+ <div className="card" style={{ borderRadius: '15px' }}>
+ <div className="card-body text-center">
+ <div className="mt-3 mb-4">
+ <img src={imageUrl} className="rounded-circle img-fluid" style={{ width: '100px' }} alt="..." />
+ </div>
+ <h4 className="mb-2">{name}</h4>
+ <p className="text-muted mb-4">@{username} | <a href="#!">{websites}</a></p>
+ <div className="mb-4 pb-2">
+ {socialLinks.map((link, index) => (
+ <button key={index} type="button" className="btn btn-outline-primary btn-floating m-2">
+ <i className={`fab ${link.icon} fa-lg`}></i>
+ </button>
+ ))}
+ </div>
+ <button type="button" className="btn btn-primary btn-rounded btn-lg background2">
+ Message now
+ </button>
+ <div className="d-flex justify-content-between text-center mt-5 mb-2">
+ <div>
+ <p className="mb-2 h5">8471</p>
+ <p className="text-muted mb-0">Interactions</p>
+ </div>
+ <div className="px-3">
+ <p className="mb-2 h5">8512</p>
+ <p className="text-muted mb-0">Prepared Students</p>
+ </div>
+ <div>
+ <p className="mb-2 h5">4751</p>
+ <p className="text-muted mb-0">Something</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+}
+
+// Componenta principală
+function Home() {
+ return (
+ <div className="container">
+ <h1>Dashboard</h1>
+ <hr />
+ {/* Cursurile tale */}
+ <div className="container rounded text-white pt-3 pb-3 mb-3 background ">
+ <h2>Your courses</h2>
+ <div className="row d-flex justify-content-center align-items-center h-100">
+ <CourseCard imageUrl="https://cdn.discordapp.com/attachments/1176562447918825482/1183039686940299356/FreeFlowLogo.png?ex=6586e291&is=65746d91&hm=4e80dc68f4bd172af650629d344866400b374ea9a6e844da5d70723e99125f4d&" title="Titlu curs" text="Some quick example text to build on the card title and make up the bulk of the card's content." />
+ <CourseCard imageUrl="https://cdn.discordapp.com/attachments/1176562447918825482/1183039686940299356/FreeFlowLogo.png?ex=6586e291&is=65746d91&hm=4e80dc68f4bd172af650629d344866400b374ea9a6e844da5d70723e99125f4d&" title="Titlu curs" text="Some quick example text to build on the card title and make up the bulk of the card's content." />
+ <CourseCard imageUrl="https://cdn.discordapp.com/attachments/1176562447918825482/1183039686940299356/FreeFlowLogo.png?ex=6586e291&is=65746d91&hm=4e80dc68f4bd172af650629d344866400b374ea9a6e844da5d70723e99125f4d&" title="Titlu curs" text="Some quick example text to build on the card title and make up the bulk of the card's content." />
+ <CourseCard imageUrl="https://cdn.discordapp.com/attachments/1176562447918825482/1183039686940299356/FreeFlowLogo.png?ex=6586e291&is=65746d91&hm=4e80dc68f4bd172af650629d344866400b374ea9a6e844da5d70723e99125f4d&" title="Titlu curs" text="Some quick example text to build on the card title and make up the bulk of the card's content." />
+
+ </div>
+ </div>
+ <div className="container background rounded text-white p-3 mb-3">
+ <h2>Connect with people</h2>
+ <div className="row d-flex justify-content-center align-items-center h-100">
+ <PersonCard
+ imageUrl="https://eitrawmaterials.eu/wp-content/uploads/2016/09/person-icon.png"
+ name="Nume Prenume"
+ username="Username"
+ socialLinks={[
+ { icon: 'fa-facebook-f' },
+ { icon: 'fa-twitter' },
+ { icon: 'fa-skype' },
+ ]}
+ websites={"website.com"}
+ />
+ <PersonCard
+ imageUrl="https://eitrawmaterials.eu/wp-content/uploads/2016/09/person-icon.png"
+ name="Nume Prenume"
+ username="Username"
+ socialLinks={[
+ { icon: 'fa-facebook-f' },
+ { icon: 'fa-twitter' },
+ { icon: 'fa-skype' },
+ ]}
+ websites={"website.com"}
+ />
+ <PersonCard
+ imageUrl="https://eitrawmaterials.eu/wp-content/uploads/2016/09/person-icon.png"
+ name="Nume Prenume"
+ username="Username"
+ socialLinks={[
+ { icon: 'fa-facebook-f' },
+ { icon: 'fa-twitter' },
+ { icon: 'fa-skype' },
+ ]}
+ websites={"website.com"}
+ />
+ </div>
+ </div>
+ </div>
+ );
+}
+
+export default Home;