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 Testimonials page #579

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
29 changes: 24 additions & 5 deletions client/src/App.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import {
BrowserRouter as Router,
} from 'react-router-dom';
import React from 'react';
import { BrowserRouter as Router, Route, Switch, Link } from 'react-router-dom';
import { UserProvider } from './store/userContext';
import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import Layout from './components/Layout';
import NewWelcome from './pages/newelcome';
import Testimonials from './pages/Testimonials';
import { useState, useEffect } from 'react';
import Preloader from './components/PreLoader';

Expand All @@ -28,7 +29,25 @@ function App() {
<>
<Router>
<UserProvider>
<Layout />
<nav>
<ul>
<li>
<Link to="/newwelcome">Welcome</Link>
</li>
<li>
<Link to="/testimonials">Testimonials</Link>
</li>
</ul>
</nav>

<Switch>
<Route path="/testimonials">
<Testimonials />
</Route>
<Route path="/newwelcome">
<NewWelcome />
</Route>
</Switch>
</UserProvider>
</Router>
<ToastContainer />
Expand All @@ -38,4 +57,4 @@ function App() {
);
}

export default App;
export default App;
78 changes: 78 additions & 0 deletions client/src/pages/Testimonials.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import React from 'react';

const Testimonials = () => {
return (
<div>
<header>
<h1>Testimonials & Reviews</h1>
<p className="subtitle">Enhancing Healthcare Delivery with Medi-Connect</p>
</header>
<div className="container">
<section className="stats">
<div className="stat-item">
<div className="stat-number">50+</div>
<div className="stat-label">Hospitals Onboarded</div>
</div>
<div className="stat-item">
<div className="stat-number">100k+</div>
<div className="stat-label">Patients Served</div>
</div>
<div className="stat-item">
<div className="stat-number">4.8</div>
<div className="stat-label">User Rating</div>
</div>
</section>

<h2>What Our Users Are Saying</h2>
<div className="testimonial-grid">
<div className="testimonial">
<div className="icon-container">
<svg className="icon" viewBox="0 0 24 24">
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
</svg>
</div>
<h3>Dr. Suresh Sharma</h3>
<div className="rating">★★★★★</div>
<p>
"Medi-Connect has revolutionized the way we manage our OPD operations. The queue management system has significantly reduced patient wait times and improved overall efficiency."
</p>
</div>
<div className="testimonial">
<div className="icon-container">
<svg className="icon" viewBox="0 0 24 24">
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
</svg>
</div>
<h3>Nurse Anjali Kapoor</h3>
<div className="rating">★★★★☆</div>
<p>
"The bed availability tracking and emergency allocation features have been a game-changer for us. We can now respond to critical situations much more efficiently."
</p>
</div>
<div className="testimonial">
<div className="icon-container">
<svg className="icon" viewBox="0 0 24 24">
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
</svg>
</div>
<h3>Patient Reena Gupta</h3>
<div className="rating">★★★★★</div>
<p>
"As a patient, I've found Medi-Connect to be incredibly user-friendly. The online appointment booking and real-time queue updates have made my hospital visits much more convenient."
</p>
</div>
</div>

<div className="cta">
<h2>Experience the Difference with Medi-Connect</h2>
<p>Streamline your hospital operations and improve patient care today.</p>
<a href="/pages/medi-connect" className="cta-button">
Learn More ➡
</a>
</div>
</div>
</div>
);
};

export default Testimonials;
242 changes: 242 additions & 0 deletions client/src/pages/newelcome.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
import React, { useEffect, useState } from 'react';

const newelcome = () => {
const [registrationCount, setRegistrationCount] = useState(0);
const [userCount, setUserCount] = useState(0);

useEffect(() => {
const counterInterval = setInterval(incrementCounters, 50);

return () => clearInterval(counterInterval); // Cleanup interval on component unmount
}, []);

const incrementCounters = () => {
setRegistrationCount(prevCount => {
if (prevCount < 500) {
const newCount = prevCount + Math.floor(Math.random() * 10 + 1);
return newCount > 500 ? 500 : newCount;
}
return prevCount;
});

setUserCount(prevCount => {
if (prevCount < 500) {
const newCount = prevCount + Math.floor(Math.random() * 15 + 1);
return newCount > 500 ? 500 : newCount;
}
return prevCount;
});
};

useEffect(() => {
const particleCount = 100;
for (let i = 0; i < particleCount; i++) {
const particle = document.createElement('div');
particle.classList.add('particle');
const size = Math.random() * 10 + 5; // Random size between 5 and 15px
particle.style.width = `${size}px`;
particle.style.height = `${size}px`;
particle.style.backgroundColor = `rgba(255, 255, 255, ${Math.random()})`; // Random opacity
particle.style.top = `${Math.random() * 100}vh`;
particle.style.left = `${Math.random() * 100}vw`;
particle.style.animationDelay = `${Math.random() * 2}s`; // Random animation delay
document.body.appendChild(particle);
}

// Cursor tail effect
const coords = { x: 0, y: 0 };
const circles = document.querySelectorAll(".circle");
const colors = ["#ffb56b", "#fdaf69", "#f89d63", "#f59761", "#ef865e", "#ec805d", "#e36e5c", "#df685c", "#d5585c"];

circles.forEach((circle, index) => {
circle.x = 0;
circle.y = 0;
circle.style.backgroundColor = colors[index % colors.length];
});

window.addEventListener("mousemove", (e) => {
coords.x = e.clientX;
coords.y = e.clientY;
});

const animateCircles = () => {
let x = coords.x;
let y = coords.y;

circles.forEach((circle, index) => {
circle.style.left = x - 12 + "px";
circle.style.top = y - 12 + "px";
circle.style.transform = `scale(${(circles.length - index) / circles.length})`;

circle.x = x;
circle.y = y;

const nextCircle = circles[index + 1] || circles[0];
x += (nextCircle.x - x) * 0.3;
y += (nextCircle.y - y) * 0.3;
});

requestAnimationFrame(animateCircles);
};

animateCircles();
}, []);

return (
<div>
<style>{`
body {
margin: 0;
overflow: hidden;
font-family: 'Roboto', sans-serif;
color: #fff;
}

.background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(45deg, #ff6b6b, #f7b731, #3bde5c);
background-size: 300% 300%;
animation: gradientAnimation 15s ease infinite;
z-index: -1;
}

@keyframes gradientAnimation {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}

.particle {
position: absolute;
border-radius: 50%;
pointer-events: none;
opacity: 0.7;
animation: float 5s infinite ease-in-out;
transition: transform 0.3s ease, background-color 0.3s;
}

.particle:hover {
transform: scale(1.5);
background-color: #ff6b6b;
}

@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}

.welcome-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
text-align: center;
position: relative;
z-index: 1;
}

.welcome-title {
font-size: 4rem;
opacity: 0;
animation: fadeIn 1.5s forwards;
animation-delay: 0.5s;
}

@keyframes fadeIn {
from { opacity: 0; transform: translateY(-30px); }
to { opacity: 1; transform: translateY(0); }
}

.welcome-text {
font-size: 1.5rem;
opacity: 0;
animation: fadeIn 1.5s forwards;
animation-delay: 1.5s;
margin-top: 20px;
}

.btn-start {
margin-top: 20px;
padding: 10px 20px;
font-size: 1.2rem;
border-radius: 5px;
background-color: #3aac53;
color: #fff;
transition: all 0.3s ease;
}

.btn-start:hover {
transform: translateY(-5px);
background-color: #28a745;
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-start:focus {
outline: none;
}

/* Circle styles */
.circle {
height: 24px;
width: 24px;
border-radius: 50%;
background-color: black;
position: fixed;
top: 0;
left: 0;
pointer-events: none;
z-index: 99999999;
transition: transform 0.1s ease-out;
}

.counter-container {
position: absolute;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: center;
background: rgba(0, 0, 0, 0.7);
padding: 10px 20px;
border-radius: 8px;
z-index: 2; /* Ensures counters are on top */
color: #fff;
font-size: 1.2rem;
font-weight: bold;
}

.counter {
margin: 0 15px;
text-align: center;
}
`}</style>

<div className="background"></div>
<div className="welcome-container">
<h1 className="welcome-title">Welcome to Medi-Connect</h1>
<p className="welcome-text">Revolutionizing Healthcare Management</p>
<a href="/pages/Testimonials" className="btn btn-start">
Explore Medi-Connect
</a>
</div>
<div className="counter-container">
<div className="counter">
<div id="registration-count">+{registrationCount}</div>
<p>Hospitals Onboarded</p>
</div>
<div className="counter">
<div id="user-count">+{hospitalCount}</div>
<p>Patients Served</p>
</div>
</div>
</div>
);
};


export default newelcome;