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 Activity Agenda Page for the Community Portal #3085

Open
wants to merge 1 commit into
base: development
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
Binary file added src/assets/images/yoga-img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions src/components/CommunityPortal/Activities/ActivityAgenda.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

.container {
display: flex;
justify-content: space-between;
padding: 20px;
}

.image img {
max-width: 100%;
height: auto;
border-radius: 8px;
}

.content {
flex: 1;
padding-left: 50px;
}

.content h1 {
font-size: 2rem;
margin-bottom: 15px;
}

.content p {
font-size: 1rem;
line-height: 1.6;
}

@media (max-width: 768px) {
.container {
flex-direction: column;
}

.content {
padding-left: 0px;
text-align: center;
}

.image img {
margin-bottom: 20px;
}
}

@media (max-width: 480px) {
.content h1 {
font-size: 1.5rem;
}

.content p {
font-size: 0.9rem;
}
}

37 changes: 37 additions & 0 deletions src/components/CommunityPortal/Activities/ActivityAgenda.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import './ActivityAgenda.css';
import ActivityImg from '../../../assets/images/yoga-img.png';

function ActivityAgenda() {
// Data
const eventData = {
activityName: 'Yoga Session',
description:
"Our Yoga Session is designed to provide a peaceful and invigorating experience for people of all fitness levels. Whether you are a beginner or a seasoned practitioner, this class will guide you through a series of asanas (poses) that will improve flexibility, strength, and mindfulness. Led by **Jane Doe**, a certified yoga instructor with over 10 years of experience, the session focuses on mindfulness, breath control (pranayama), and body awareness. Jane's teaching style emphasizes proper alignment, modifications for different skill levels, and creating an inclusive, welcoming space for all participants. The class begins with a gentle warm-up to prepare the body, followed by breathwork exercises to calm the mind and enhance focus. The main flow consists of standing poses, seated stretches, and core work, with variations offered to accommodate everyone. As the session progresses, you'll experience a cool-down phase with restorative stretches and a guided relaxation to release any tension. The class concludes with a brief meditation or mindfulness practice to help you center yourself and leave with a sense of calm. To make the most of your experience, please bring a yoga mat, comfortable clothing, a water bottle, a towel, and any optional props such as yoga blocks or straps. You can expect a calming, positive environment with soothing music, and the instructor will provide adjustments as needed to help you get the most out of your practice. Yoga offers numerous benefits, including improved flexibility, increased strength, reduced stress, enhanced mental focus, and better energy levels. This session is perfect for anyone looking to deepen their practice, relieve stress, or simply enjoy a calming and rejuvenating experience. Join us for this transformative yoga class — we look forward to seeing you on the mat!",
schedule: [
{ time: '9:00 to 10:00', activity: 'Morning Meditation' },
{ time: '10:00 to 11:00', activity: 'Sun Salutation' },
{ time: '11:00 to 12:00', activity: 'Stretching and Breathing Exercises' },
],
image: ActivityImg,
};

return (
<div className="container">
<div className="image">
<img src={eventData.image} alt="Activity" />
</div>
<div className="content">
<h1>{eventData.activityName}</h1>
<p>{eventData.description}</p>
<h1>Schedule of the day</h1>
{eventData.schedule.map(item => (
<p key={`${item.time}-${item.activity}`}>
{item.time} - {item.activity}
</p>
))}
</div>
</div>
);
}

export default ActivityAgenda;
6 changes: 2 additions & 4 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ import CPDashboard from './components/CommunityPortal';
import ActivityList from './components/CommunityPortal/Activities/ActivityList';
// import AddActivities from './components/CommunityPortal/Activities/AddActivities';
// import ActvityDetailPage from './components/CommunityPortal/Activities/ActivityDetailPage';


import ActivityAgenda from './components/CommunityPortal/Activities/ActivityAgenda';


// eslint-disable-next-line import/order, import/no-unresolved
Expand Down Expand Up @@ -357,13 +356,12 @@ export default (
component={InventoryTypesList}
/>


{/* Community Portal Routes */}
<CPProtectedRoute path="/communityportal" exact component={CPDashboard} />
<Route path="/communityportal/login" component={CPLogin} />
<CPProtectedRoute path="/communityportal/Activities" exact component={ActivityList} />
{/* <BMProtectedRoute path="/bmdashboard/tools/add" exact component={AddTool} /> */}

<CPProtectedRoute path="/communityportal/ActivityAgenda" exact component={ActivityAgenda} />

{/* Temporary route to redirect all subdirectories to login if unauthenticated */}
{/* <BMProtectedRoute path="/bmdashboard/:path" component={BMDashboard} /> */}
Expand Down
Loading