Skip to content

Commit 2ae29f7

Browse files
authored
Add files via upload
1 parent d9a0eb1 commit 2ae29f7

22 files changed

+6672
-654
lines changed

README.md

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
# MH App
2-
A website to help people effectively manage their mental health (not a solution, just a resource :)).
3-
4-
## Pages
5-
* Index: /
6-
* About: /about
7-
* Community: /community
8-
* Therapists: /therapists
9-
* Our Team: /ourteam
10-
11-
## How to Run
12-
Clone source, install node package manager using (nmp install)locally to the folder you are running the project in, run using node server (instructions below)
13-
```
14-
npm install # You only have to run this once or after you pull the repo.
15-
node server.js
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
1611
```
17-
and navigate to https://localhost:3001 to view the development server.
18-
19-
## Software Used
20-
* [Next.js](https://nextjs.org/)
21-
* [Documentation](https://nextjs.org/docs)
22-
* [Tutorial](https://nextjs.org/learn/basics/create-nextjs-app)
23-
* [TailwindCSS](https://tailwindcss.com/)
24-
* [Documentation](https://tailwindcss.com/docs)
12+
13+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14+
15+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
16+
17+
## Learn More
18+
19+
To learn more about Next.js, take a look at the following resources:
20+
21+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
22+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
23+
24+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
25+
26+
## Deploy on Vercel
27+
28+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/import?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
29+
30+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

components/Navbar.jsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import Link from 'next/link';
2+
import { withRouter } from 'next/router';
3+
4+
function Navbar({ router }) {
5+
const navs = [
6+
{ text: 'Home', href: '/' },
7+
{ text: 'About Us', href: '/about' },
8+
{ text: 'Mood Tracker', href: '/moodtracker' },
9+
{ text: 'Community', href: '/community' },
10+
{ text: 'Therapists', href: '/therapists' },
11+
12+
// { text: '', href: '' },
13+
];
14+
15+
return (
16+
<nav className="navbar">
17+
<div className="container">
18+
<Link href="/"><a className="logo">TEMPUS</a></Link>
19+
20+
<ul className="nav-links">
21+
{ navs.map(nav => (
22+
<li><Link href={nav.href}><a className={`nav-item ${ router.pathname == nav.href ? 'active' : '' }`}>{nav.text}</a></Link></li>
23+
)) }
24+
</ul>
25+
</div>
26+
</nav>
27+
);
28+
}
29+
30+
export default withRouter(Navbar);

package-lock.json

Lines changed: 609 additions & 620 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "learn-starter",
2+
"name": "tempus",
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {

pages/_app.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import '../styles/app.scss';
2+
3+
// This default export is required in a new `pages/_app.js` file.
4+
export default function MyApp({ Component, pageProps }) {
5+
return <Component {...pageProps} />
6+
}

pages/about.jsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import Link from 'next/link';
2+
import Navbar from '../components/Navbar';
3+
import Head from 'next/head'
4+
5+
function About() {
6+
return (
7+
<>
8+
<Head>
9+
<title>About Us</title>
10+
</Head>
11+
12+
<Navbar />
13+
14+
<section className="hero">
15+
<div className="container">
16+
<div className="text-wrapper w-full">
17+
<h1 className="title">About Us</h1>
18+
<p className="description">
19+
Tempus. In latin it means Time. As Tempus, we strive to create an healthy ecosystem where it is encouraged to share their experiences and build connections through authenticity.
20+
</p>
21+
</div>
22+
</div>
23+
</section>
24+
</>
25+
);
26+
}
27+
28+
export default About;

pages/chat.jsx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import Link from 'next/link';
2+
import Navbar from '../components/Navbar';
3+
import Head from 'next/head'
4+
5+
function Chat() {
6+
return (
7+
<>
8+
<Head>
9+
<title>Chat</title>
10+
</Head>
11+
12+
<Navbar />
13+
<section className="flex-col mx-auto">
14+
<div className="text-center font-semibold text-4xl mx-auto" style={{border: "1px solid lightblue", borderRadius: "15px", height: "140%", padding:"95px 0 70px 0"}} >
15+
16+
<main class="chat-main" >
17+
<div class="chat-sidebar">
18+
<center><h3><i class="fas fa-comments"></i> Room Name:</h3></center>
19+
<h2 id="room-name" style={{fontWeight: "normal"}}></h2>
20+
<center> <h3><i class="fas fa-users"></i> Users:</h3></center>
21+
<ul id="users" style={{fontWeight: "normal", marginBottom: "100px"}}></ul>
22+
</div>
23+
<div class="chat-messages"></div>
24+
</main>
25+
<div class="chat-form-container">
26+
<form id="chat-form">
27+
<center><input style={{border: "1px solid", borderRadius: "15px", marginLeft: "30px", width: "500px"}}
28+
id="msg"
29+
type="text"
30+
placeholder="Enter Message"
31+
required
32+
autocomplete="off"
33+
/></center> <br></br>
34+
<center> <button class="btn" style={{width: "150px", backgroundColor: "lightblue", borderRadius: "15px", marginLeft: "50px"}}><i class="fas fa-paper-plane"></i> Send</button></center>
35+
</form>
36+
</div>
37+
</div>
38+
39+
<script
40+
src="https://cdnjs.cloudflare.com/ajax/libs/qs/6.9.2/qs.min.js"
41+
integrity="sha256-TDxXjkAUay70ae/QJBEpGKkpVslXaHHayklIVglFRT4="
42+
crossorigin="anonymous"
43+
></script>
44+
<script src="/socket.io/socket.io.js"></script>
45+
<script src="js/main.js"></script>
46+
47+
</section>
48+
</>
49+
);
50+
}
51+
52+
export default Chat;

pages/community.jsx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import Link from 'next/link';
2+
import Navbar from '../components/Navbar';
3+
import Head from 'next/head'
4+
5+
function Community() {
6+
return (
7+
<>
8+
<Head>
9+
<title>About Us</title>
10+
</Head>
11+
12+
<Navbar />
13+
14+
<section className="flex-col mx-auto" style={{marginTop: "75px"}}>
15+
16+
<div className="text-center font-semibold text-4xl mx-auto" style={{border: "1px solid lightblue", borderRadius: "15px", height: "400px", padding:"75px 0 0 0"}}>
17+
<p className="description">
18+
<center>Enter your annoymous username to enter your chatroom. Please be respectful.</center>
19+
</p>
20+
<form action="./chat">
21+
<div class="form-control">
22+
<center> <label for="username" style={{marginTop: "50px"}}>👥 Annoymous Username: </label></center>
23+
<center> <input style={{border: "1px solid", borderRadius: "15px", marginLeft: "30px"}}
24+
type="text"
25+
name="username"
26+
id="username"
27+
placeholder="Enter username..."
28+
required
29+
/></center>
30+
<br></br>
31+
</div>
32+
<div class="form-control">
33+
<center><label for="room"style={{}}>🏡 Choose your Chat Room:</label></center>
34+
<center><select name="room" id="room" style={{border: "1px solid", borderRadius: "15px", marginLeft: "30px", width: "300px"}}>
35+
<option value="friends">Make friends</option>
36+
<option value="vent">Vent</option>
37+
<option value="advice">Advice</option>
38+
<option value="Music">Music</option>
39+
<option value="Gaming">Gaming</option>
40+
</select></center>
41+
</div>
42+
<center> <button type="submit" class="btn" style={{width: "500px", backgroundColor: "lightblue", borderRadius: "15px", marginTop: "50px"}}>Join Chat</button></center>
43+
</form>
44+
</div>
45+
</section>
46+
</>
47+
);
48+
}
49+
50+
export default Community;

pages/index.jsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import Link from 'next/link';
2+
import Navbar from '../components/Navbar';
3+
import Head from 'next/head'
4+
5+
function Home() {
6+
return (
7+
<>
8+
<Head>
9+
<title>Home</title>
10+
</Head>
11+
12+
<Navbar />
13+
14+
<section className="hero">
15+
<div className="container">
16+
<div className="text-wrapper">
17+
<br></br>
18+
<h1 className="title">Hi there,
19+
<br></br>Welcome to Tempus <span class="wave">👋</span>
20+
21+
</h1>
22+
<p className="description">Join our supportive community of anxiety. You are not alone anymore.</p>
23+
24+
<Link href="/about"><a className="cta">Learn More</a></Link>
25+
</div>
26+
27+
28+
</div>
29+
</section>
30+
</>
31+
);
32+
}
33+
34+
export default Home;

pages/moodtracker.jsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import Link from 'next/link';
2+
import Navbar from '../components/Navbar';
3+
import Head from 'next/head'
4+
5+
function MoodTracker() {
6+
return (
7+
<>
8+
<Head>
9+
<title>Mood Tracker</title>
10+
</Head>
11+
12+
<Navbar />
13+
14+
<section className="hero">
15+
<div className="container">
16+
<div className="text-wrapper w-full">
17+
<h1 className="title">Mood Tracker</h1>
18+
<p className="description">
19+
Mood Tracker
20+
</p>
21+
</div>
22+
</div>
23+
</section>
24+
</>
25+
);
26+
}
27+
28+
export default MoodTracker;

pages/therapists.jsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import Link from 'next/link';
2+
import Navbar from '../components/Navbar';
3+
import Head from 'next/head'
4+
5+
function Therapist() {
6+
return (
7+
<>
8+
<Head>
9+
<title>Therpaists</title>
10+
</Head>
11+
12+
<Navbar />
13+
14+
<section className="hero">
15+
<div className="container">
16+
<div className="text-wrapper w-full">
17+
<h1 className="title">Local Therapists</h1>
18+
<p className="description">
19+
HI
20+
</p>
21+
</div>
22+
</div>
23+
</section>
24+
</>
25+
);
26+
}
27+
28+
export default Therapist;

public/chitchat.png

943 KB
Loading

public/chitchat.png:Zone.Identifier

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[ZoneTransfer]
2+
ZoneId=3
3+
ReferrerUrl=https://dribbble.com/
4+
HostUrl=https://cdn.dribbble.com/users/1681550/screenshots/9167842/media/a9ac1255eeb6caec9e7bee153528b612.png

public/img.jpeg

522 KB
Loading

public/img.jpg

66 KB
Loading

public/kajian.jpg

624 KB
Loading

public/kajian.jpg:Zone.Identifier

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[ZoneTransfer]
2+
ZoneId=3
3+
ReferrerUrl=https://dribbble.com/
4+
HostUrl=https://cdn.dribbble.com/users/1681550/screenshots/7334196/media/a2421f9e14c18113f117243cb74c9813.jpg

public/rsz_img.jpg

12.3 KB
Loading

server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const io = socketio(server);
2525
// Set static folder
2626
app.use(express.static(path.join(__dirname, 'pages')));
2727

28-
const botName = 'ChatCord Bot';
28+
const botName = 'Tempus Chat';
2929

3030
// Run when client connects
3131
io.on('connection', socket => {
@@ -35,7 +35,7 @@ io.on('connection', socket => {
3535
socket.join(user.room);
3636

3737
// Welcome current user
38-
socket.emit('message', formatMessage(botName, 'Welcome to ChatCord!'));
38+
socket.emit('message', formatMessage(botName, 'Welcome to Tempus Chat!'));
3939

4040
// Broadcast when a user connects
4141
socket.broadcast
@@ -78,7 +78,7 @@ io.on('connection', socket => {
7878
});
7979
});
8080

81-
const PORT = process.env.PORT || 3001;
81+
const PORT = process.env.PORT || 3000;
8282

8383
nextApp.prepare().then(() => {
8484
app.get('*', (req, res) => {

0 commit comments

Comments
 (0)