Skip to content

Commit c537971

Browse files
authored
Merge pull request #7 from Computer-Science-Club-OCC/minh-nguyen-branch
fix navbar & activity Minh nguyen branch
2 parents e5d2c5f + 91cab1c commit c537971

File tree

9 files changed

+1328
-160
lines changed

9 files changed

+1328
-160
lines changed

package-lock.json

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

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6+
"@emotion/react": "^11.9.3",
7+
"@emotion/styled": "^11.9.3",
8+
"@fortawesome/fontawesome-svg-core": "^6.1.1",
9+
"@fortawesome/free-regular-svg-icons": "^6.1.1",
10+
"@fortawesome/free-solid-svg-icons": "^6.1.1",
11+
"@fortawesome/react-fontawesome": "^0.1.18",
12+
"@mui/icons-material": "^5.8.4",
13+
"@mui/material": "^5.8.5",
14+
"@mui/styled-engine-sc": "^5.8.0",
615
"@testing-library/jest-dom": "^5.16.4",
716
"@testing-library/react": "^13.3.0",
817
"@testing-library/user-event": "^13.5.0",
18+
"babel-plugin-macros": "^3.1.0",
919
"bootstrap": "^5.1.3",
1020
"bootstrap-icons": "^1.8.3",
1121
"node-sass": "^7.0.1",
@@ -14,6 +24,7 @@
1424
"react-dom": "^18.1.0",
1525
"react-router-dom": "^6.3.0",
1626
"react-scripts": "5.0.1",
27+
"styled-components": "^5.3.5",
1728
"web-vitals": "^2.1.4"
1829
},
1930
"scripts": {

src/activity/Activity.js

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Click view detail, box will expand
1616
1717
Line break
1818
19-
Container inlcude:
19+
Container inlcude:
2020
Shadow: Hover expand
2121
Card: Image, title, Url, Description, update (except project)
2222
*/
@@ -25,21 +25,23 @@ Container inlcude:
2525

2626
const Activity = () => {
2727
return (
28-
<div>
29-
<h1>Activity</h1>
30-
<Tab />
28+
<div className="activity-container">
29+
<h1 className="activity-title">Activity</h1>
30+
<Tab className="tab-components"/>
3131
</div>);
3232
};
3333

3434
export default Activity;
3535

3636
function Tab() {
37+
3738
const [tabState, setTab] = useState(1)
3839

3940
const toggleTab = (index) => {
4041
setTab(index)
4142
}
4243

44+
4345
return (
4446
<>
4547
<div className='tab-container'>
@@ -53,19 +55,26 @@ function Tab() {
5355
<div className={tabState == 1 ? 'tab-content active-content': 'tab-content'}>
5456
<h2>Title 1</h2>
5557
<img src="#" />
56-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit,
57-
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
58-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
58+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit,
59+
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
60+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
5961
nisi ut aliquip ex ea commodo consequat.</p>
6062
</div>
6163
<div className={tabState == 2 ? 'tab-content active-content': 'tab-content'}>
6264
<h2>Title 2</h2>
6365
<img src="#" />
64-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit,
66+
67+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit,
68+
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
69+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
70+
nisi ut aliquip ex ea commodo consequat.</p>
71+
72+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit,
6573
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
6674
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
67-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
75+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
6876
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
77+
6978
</div>
7079
</div>
7180
</div>

src/activity/activity.css

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,44 @@
1+
.activity-container {
2+
width: 100vw;
3+
}
4+
5+
.tab-components {
6+
display: flex;
7+
flex-direction: row;
8+
justify-content: center;
9+
align-items: center;
10+
}
111
/* TAB BUTTON */
212

313
.tab-container {
4-
overflow: hidden;
5-
height: 100%;
6-
min-width: 600px;
7-
margin: 20px 60px;
8-
display: block;
14+
padding: 0 3rem;
15+
display: flex;
16+
flex-direction: column;
17+
justify-content: center;
18+
align-items: center;
919
}
1020

1121
.tabs {
22+
width: 90%;
1223
display: flex;
13-
flex-direction: row;
1424
justify-content: center;
15-
margin: 1.6rem;
1625
}
1726

1827
.tab-button {
19-
font-size: 20px;
20-
margin-left: 10px;
21-
margin-right: 10px;
22-
padding: 10px 60px;
28+
min-width: 150px;
29+
height: 3rem;
30+
font-size: 1rem;
2331
cursor: pointer;
32+
margin-right: 10px;
2433
outline: 0;
2534
border: 0;
2635
color: #535353;
2736
background-color: #ff9617;
2837
text-decoration: none;
2938
border-bottom: 5px solid black;
30-
border-radius: 8px;
39+
border-radius: 10px;
40+
font-weight: bold;
41+
text-align: center;
3142
}
3243

3344
.tab-button.active {
@@ -51,7 +62,7 @@
5162

5263
.tab-content {
5364
background-color: black;
54-
color: white; /* Will change due to switching tab*/
65+
color: white; /* Will change due to switching tab*/
5566
margin: 1rem;
5667
padding: 30px;
5768
border: 2px white outset;
@@ -62,4 +73,9 @@
6273
display: block;
6374
}
6475

65-
/* Add expand for news */
76+
/* Add expand for news */
77+
78+
/* tab-container */
79+
.activity-title {
80+
color: white;
81+
}

src/app.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
html, body {
2-
height: 100%;
2+
height: 100vh;
3+
width: 100vw;
34
margin: 0;
45
padding: 0;
56
background-color: #212121;
@@ -45,4 +46,4 @@ a {
4546

4647
#active {
4748
background-color: #b26910;
48-
}
49+
}

src/navbar/HeaderBar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import './header_bar.css'
3+
import NavigationBar from './NavigationBar'
34

45
const HeaderBar = () => {
56
return (
@@ -14,4 +15,4 @@ const HeaderBar = () => {
1415
)
1516
}
1617

17-
export default HeaderBar;
18+
export default HeaderBar;

0 commit comments

Comments
 (0)