forked from WeMakeDevs/wemakedevs-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
168 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/ | ||
tasks: | ||
- name: npm | ||
init: npm install | ||
command: npm start | ||
# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/ | ||
ports: | ||
- port: 3000 | ||
onOpen: open-browser | ||
github: | ||
prebuilds: | ||
master: true | ||
branches: true | ||
pullRequests: true | ||
pullRequestsFromForks: true | ||
addCheck: true | ||
addComment: false | ||
addBadge: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM --platform=linux/amd64 node:16-alpine | ||
WORKDIR ./ | ||
COPY . . | ||
EXPOSE 3000 | ||
CMD [ "npm", "start" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: commclassroom-deploy | ||
namespace: default | ||
spec: | ||
## Set to 5 for start of lab | ||
replicas: 5 | ||
selector: | ||
matchLabels: | ||
env: commclassroom | ||
progressDeadlineSeconds: 300 | ||
minReadySeconds: 10 | ||
strategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxUnavailable: 1 | ||
maxSurge: 1 | ||
template: | ||
metadata: | ||
labels: | ||
env: commclassroom | ||
spec: | ||
containers: | ||
- name: commclassroom-ctr | ||
image: kaiwalyakoparkar/commclassroom:1.0 | ||
ports: | ||
- containerPort: 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: commclassroom-pod | ||
namespace: default | ||
labels: | ||
env: commclassroom | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: commclassroom-ctr | ||
imagePullPolicy: Always | ||
image: kaiwalyakoparkar/commclassroom:1.0 | ||
ports: | ||
- containerPort: 3000 | ||
resources: | ||
requests: | ||
memory: "128Mi" | ||
cpu: "500m" | ||
limits: | ||
memory: "512Mi" | ||
cpu: "1000m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: commclassroom | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- port: 9000 | ||
targetPort: 3000 | ||
selector: | ||
env: commclassroom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,38 @@ | ||
import React from 'react' | ||
import React from "react"; | ||
|
||
const CardContent = ({ course = {} }) => { | ||
return ( | ||
<> | ||
<img | ||
className="course_cont_2_card_1" | ||
src={course.image} | ||
alt={course.title} | ||
/> | ||
<p className="course_cont_2_card_1_heading"> {course.title} </p> | ||
<p className="course_cont_2_card_1_para_1">{course.description}</p> | ||
</> | ||
); | ||
}; | ||
|
||
const Card = ({ course = {} }) => { | ||
if (course.link) { | ||
return ( | ||
<a | ||
href={course.link} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="course_cont_2_card" | ||
> | ||
<CardContent course={course} /> | ||
</a> | ||
); | ||
} | ||
|
||
return ( | ||
<div className="course_cont_2_card"> | ||
<img className="course_cont_2_card_1" src={course.image} alt={course.title} /> | ||
<p className="course_cont_2_card_1_heading"> {course.title} </p> | ||
<p className="course_cont_2_card_1_para_1"> | ||
{course.description} | ||
</p> | ||
<CardContent course={course} /> | ||
</div> | ||
) | ||
} | ||
); | ||
}; | ||
|
||
export default Card | ||
export default Card; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,42 @@ | ||
import React from 'react' | ||
import React from "react"; | ||
import { Link } from "react-router-dom"; | ||
|
||
const CardContent = ({ event }) => { | ||
return ( | ||
<> | ||
<img | ||
className="events_cont_2_card_1" | ||
src={event.image} | ||
alt={event.title} | ||
/> | ||
{event.ongoing && ( | ||
<p className="events_cont_2_card_1_head">🟢 On-Going </p> | ||
)} | ||
{!event.ongoing && ( | ||
<p className="events_cont_2_card_1_head1">🔴 Completed </p> | ||
)} | ||
<p className="events_cont_2_card_1_heading"> {event.title} </p> | ||
<p className="events_cont_2_card_1_para_1">{event.description}</p> | ||
<p className="events_cont_2_card_1_date">{event.date}</p> | ||
</> | ||
); | ||
}; | ||
|
||
const Card = ({ event }) => { | ||
if (event.link) { | ||
return ( | ||
<div className="events_cont_2_card"> | ||
<img className="events_cont_2_card_1" src={event.image} alt={event.title} /> | ||
{event.ongoing && <p className="events_cont_2_card_1_head"><span>🟢</span> On-Going </p>} | ||
{!event.ongoing && <p className="events_cont_2_card_1_head1"><span>🔴</span> Completed </p>} | ||
<p className="events_cont_2_card_1_heading"> {event.title} </p> | ||
<p className="events_cont_2_card_1_para_1"> | ||
{event.description} | ||
</p> | ||
<p className="events_cont_2_card_1_date">{event.date}</p> | ||
</div> | ||
) | ||
} | ||
<Link to={event.link} className="events_cont_2_card"> | ||
<CardContent event={event} /> | ||
</Link> | ||
); | ||
} | ||
|
||
return ( | ||
<div className="events_cont_2_card"> | ||
<CardContent event={event} /> | ||
</div> | ||
); | ||
}; | ||
|
||
|
||
export default Card | ||
export default Card; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters