Skip to content

Commit 73c2609

Browse files
committed
Merge remote-tracking branch 'origin/dev' into ImageStorage
2 parents 74734c0 + 2cfa798 commit 73c2609

File tree

21 files changed

+333
-171
lines changed

21 files changed

+333
-171
lines changed

frontend/public/cc_logo_white.png

3.16 KB
Loading

frontend/src/Components/Footer/Footer.jsx

Lines changed: 28 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,38 @@ import logo from "../../assets/logo.png";
55
export default function Footer() {
66
return (
77
<footer id="CS-Catalog-footer" className="footer p-4">
8-
<Container fluid style={{ maxWidth: "1000px" }}>
8+
<Container className="footer-container">
99
<Row>
1010
<Col
1111
xs={{ span: 12 }}
1212
lg={{ span: 6 }}
13-
className="d-flex justify-content-center justify-content-lg-start align-items-center p-0"
13+
className="d-flex justify-content-center align-items-center cc-logo-footer"
1414
>
1515
<Image
16-
src={logo}
16+
src={"/logo_white.png"}
1717
id="CS-Catalog-footer-logo"
1818
className="footer-logo"
19-
roundedCircle
2019
/>
21-
<ul
22-
className="footer-socials-list d-flex flex-column align-self-stretch justify-content-evenly m-0"
23-
id="footer-socials-list"
24-
>
25-
<li
26-
className="footer-social-container"
27-
id="discord-social-container"
28-
>
20+
</Col>
21+
<Col
22+
xs={{ span: 12 }}
23+
lg={{ span: 6 }}
24+
className="links-container"
25+
>
26+
<div className="social-icons-container">
27+
<div>
2928
<a className="social-link" target="_blank">
3029
<Discord className="footer-social-icon" />
3130
<span className="footer-social-name">Discord</span>
3231
</a>
33-
</li>
34-
<li
35-
className="footer-social-container"
36-
id="instagram-social-container"
37-
>
32+
</div>
33+
<div>
3834
<a className="social-link" target="_blank">
3935
<Instagram className="footer-social-icon" />
4036
<span className="footer-social-name">Instagram</span>
4137
</a>
42-
</li>
43-
<li
44-
className="footer-social-container"
45-
id="github-social-container"
46-
>
38+
</div>
39+
<div>
4740
<a
4841
className="social-link"
4942
href="https://github.com/cppsea/CS-Catalog"
@@ -52,45 +45,31 @@ export default function Footer() {
5245
<Github className="footer-social-icon" />
5346
<span className="footer-social-name">Github</span>
5447
</a>
55-
</li>
56-
</ul>
57-
</Col>
58-
<Col
59-
xs={{ span: 12 }}
60-
lg={{ span: 6 }}
61-
className="d-flex justify-content-center justify-content-lg-start align-items-center p-0"
62-
>
63-
<h5
64-
className="footer-title flex-column d-flex"
65-
id="CS-Catalog-footer-title"
66-
>
67-
<span>CS</span> <span>CENTRAL</span>
68-
</h5>
69-
<ul
70-
className="footer-more-info-links-container d-flex flex-column align-self-stretch justify-content-evenly m-0"
71-
id="more-info-links-container"
72-
>
73-
<li className="footer-more-info-link-container">
48+
</div>
49+
</div>
50+
<div className="vertical-divider"></div>
51+
<div className="social-icons-container">
52+
<div>
7453
<a className="more-info-link" id="footer-home-link">
7554
Home
7655
</a>
77-
</li>
78-
<li className="footer-more-info-link-container">
56+
</div>
57+
<div>
7958
<a className="more-info-link" id="footer-feedback-link">
8059
Feedback
8160
</a>
82-
</li>
83-
<li className="footer-more-info-link-container">
61+
</div>
62+
<div>
8463
<a className="more-info-link" id="footer-about-link">
8564
About
8665
</a>
87-
</li>
88-
<li className="footer-more-info-link-container">
66+
</div>
67+
<div>
8968
<a className="more-info-link" id="footer-team-link">
9069
Our team
9170
</a>
92-
</li>
93-
</ul>
71+
</div>
72+
</div>
9473
</Col>
9574
</Row>
9675
</Container>

frontend/src/Components/Footer/Footer.scss

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
@import "../../scss/variables.scss";
22

3+
@import "/node_modules/bootstrap/scss/bootstrap-grid.scss";
4+
@import "/node_modules/bootstrap/scss/grid";
5+
@import "/node_modules//bootstrap/scss/mixins";
6+
37
//colors
48
.footer {
59
background: $header-footer-bg;
@@ -11,10 +15,19 @@
1115

1216
/*First half of footer*/
1317
.footer-logo {
14-
background: $primary;
15-
width: 50%;
16-
max-width: 200px;
17-
min-width: 100px;
18+
@include media-breakpoint-down(md) {
19+
height: 4.5rem;
20+
}
21+
22+
@include media-breakpoint-up(md) {
23+
height: 6.5rem;
24+
}
25+
}
26+
27+
.cc-logo-footer {
28+
@include media-breakpoint-up(lg) {
29+
padding-right: 5rem !important;
30+
}
1831
}
1932

2033
/*Social Links*/
@@ -104,3 +117,27 @@
104117
font-size: 0.9rem;
105118
padding-top: 1rem;
106119
}
120+
121+
.footer-container {
122+
width: 50rem !important;
123+
@include media-breakpoint-down(md) {
124+
width: 20rem !important;
125+
}
126+
}
127+
128+
.links-container {
129+
display: flex;
130+
justify-content: space-between;
131+
padding: 0 !important;
132+
133+
@include media-breakpoint-down(lg) {
134+
padding: 20px 0 !important;
135+
justify-content: space-evenly;
136+
}
137+
}
138+
139+
.social-icons-container {
140+
display: flex;
141+
flex-direction: column;
142+
gap: 30px;
143+
}

frontend/src/Components/Header/Header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function Header() {
2929
<Container>
3030
<Stack direction="horizontal" gap={2}>
3131
<Nav.Link href="/">
32-
<Image className="p-1" src={logo} roundedCircle width={100} />
32+
<img className="p-1 cc-logo-header" src={"/cc_logo_white.png"} />
3333
</Nav.Link>
3434
<div className="header-divider"></div>
3535

frontend/src/Components/Header/Header.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,18 @@
5050
height: 0.1em;
5151
background-color: rgb(18, 18, 18);
5252
}
53+
54+
// added on 05/30/2024
55+
.cc-logo-header {
56+
@include media-breakpoint-down(md) {
57+
width: 4rem;
58+
}
59+
60+
@include media-breakpoint-up(md) {
61+
width: 5rem;
62+
}
63+
64+
@include media-breakpoint-up(xxl) {
65+
width: 7rem;
66+
}
67+
}

frontend/src/Components/Home/AppBrand/AppBrand.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ import BrandName from "./BrandName";
44
export default function AppTitle() {
55
return (
66
<>
7-
<div className="outer-app-title-container d-flex align-items-center gap-4">
8-
<div className="title-divider"></div>
9-
<BrandName />
10-
<div className="title-divider"></div>
7+
<div className="cc-logo-container">
8+
<img className="cc-logo-img" />
119
</div>
1210
</>
1311
);

frontend/src/Components/Home/AppBrand/AppBrand.scss

Lines changed: 12 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -9,104 +9,31 @@ $color-mode-type: data;
99

1010
// Dark mode
1111
@include color-mode(dark) {
12-
.big-cs,
13-
.text-between-divider-light,
14-
.central-bottom-title {
15-
color: $primary-text-dark;
16-
}
17-
18-
.horizontal-bar {
19-
background-color: $primary-bg-light;
20-
}
21-
22-
.title-divider {
23-
border-bottom: 1.5px solid $primary-text-dark;
12+
.cc-logo-img {
13+
content: url("logo_white.png");
2414
}
2515
}
2616

2717
// Light mode
2818
@include color-mode(light) {
29-
.big-cs,
30-
.text-between-divider-light,
31-
.central-bottom-title {
32-
color: $primary-text-light;
33-
}
34-
35-
.horizontal-bar {
36-
background-color: $primary-bg-dark;
37-
}
38-
39-
.title-divider {
40-
border-bottom: 1.5px solid $primary-text-light;
19+
.cc-logo-img {
20+
content: url("logo_black.png");
4121
}
4222
}
4323
// --------------- End of Color Modes ----------------------
4424

4525
// Custom stylings
46-
.title-divider {
47-
width: 100%;
48-
user-select: none;
49-
50-
@include media-breakpoint-down(xs) {
51-
margin: 5px 0 5px;
52-
}
53-
}
54-
55-
.text-between-divider-light {
56-
@include media-breakpoint-up(md) {
57-
font-size: 3em;
58-
}
59-
@include media-breakpoint-down(md) {
60-
font-size: 1.5em;
61-
}
62-
}
63-
64-
.app-title-container {
26+
.cc-logo-container {
6527
display: flex;
66-
flex-direction: column;
67-
gap: 0;
68-
}
69-
70-
.big-cs {
71-
font-family: "Fredericka The Great";
28+
justify-content: center;
29+
margin: 30px 0 50px 0;
30+
padding: 15px 0;
7231

73-
@media (min-width: 100px) {
74-
font-size: 3em;
75-
height: 17vh;
76-
}
77-
78-
@media (min-width: 768px) {
79-
font-size: 2.5em;
80-
height: 27vh;
81-
}
82-
83-
@media (min-width: 830px) {
84-
height: 24vh;
85-
}
86-
87-
@media (min-width: 1400px) {
88-
height: 15vh;
89-
}
90-
91-
@media (min-width: 1900px) {
92-
height: 8.5vh;
93-
}
94-
}
95-
96-
.horizontal-bar {
97-
width: 100%;
98-
height: 2px;
99-
}
100-
101-
.central-bottom-title {
102-
font-family: "Alumni_Sans";
103-
text-transform: uppercase;
104-
105-
@media (min-width: 100px) {
106-
font-size: 1.8em;
32+
@include media-breakpoint-down(md) {
33+
height: 8rem;
10734
}
10835

109-
@media (min-width: 768px) {
110-
font-size: 1.3em;
36+
@include media-breakpoint-up(xxl) {
37+
height: 15rem;
11138
}
11239
}

frontend/src/Components/Home/RecentArticles/RecentArticleItem/RecentArticleItem.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ export default function RecentArticleItem({
2626
<div className="d-flex gap-3 justify-content-between w-100">
2727
<div>
2828
{toBeBookmarked ? (
29-
<Bookmark
29+
<BookmarkFill
3030
className="recent-article-bookmark"
3131
onClick={bookmarkToggler}
3232
/>
3333
) : (
34-
<BookmarkFill
34+
<Bookmark
3535
className="recent-article-bookmark"
3636
onClick={bookmarkToggler}
3737
/>

server/index.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
const express = require("express");
2-
const create_delete_articleRoutes = require("./src/articles/cdroutes.js");
2+
const auth_articleRoutes = require("./src/articles/authroutes.js");
33
const articleRoutes = require("./src/articles/routes.js");
44
const courseRoutes = require("./src/courses/routes.js");
55
const userRoutes = require("./src/users/routes.js");
6+
const auth_userRoutes = require("./src/users/authroutes.js");
7+
const bookmarkRoutes = require("./src/bookmarks/authroutes.js")
8+
69
const imagesRoutes = require("./src/images/routes.js");
710
const cors = require("cors");
8-
const dotenv = require("dotenv");
9-
dotenv.config();
10-
// require("dotenv").config();
11+
require("dotenv").config();
1112

1213
console.log(process.env.PGUSER);
1314

@@ -26,10 +27,15 @@ app.get("/", (req, res) => {});
2627
//routes to /api/articles will be handled in /src/articles/routes.js
2728

2829
app.use("/api/articles", articleRoutes);// must go BEFORE create_delete because create_delete will return authorization error before allowing the api route for GETting articles
29-
app.use("/api/articles", create_delete_articleRoutes);//the create_delete will have authorization checked, but the regular articleRoutes will not
30+
app.use("/api/articles", auth_articleRoutes);//the create_delete will have authorization checked, but the regular articleRoutes will not
31+
32+
app.use("/api/bookmarks", bookmarkRoutes);
3033

3134
app.use("/api/courses", courseRoutes);
32-
app.use("/api/users", userRoutes);
35+
36+
app.use('/api/users', userRoutes);
37+
app.use('/api/users', auth_userRoutes);
38+
3339
app.use("/api/images", imagesRoutes); // images routes
3440

3541
app.listen(port, () => console.log(`app listening on port ${port}`));
File renamed without changes.

0 commit comments

Comments
 (0)