Skip to content

Commit e2ed2f0

Browse files
committed
Initial carousel implementation
Nothing too deep yet
1 parent af1745c commit e2ed2f0

14 files changed

Lines changed: 137 additions & 39 deletions

File tree

cypress/e2e/events/events.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ describe('Event Page', () => {
22
it('displays the correct main title', () => {
33
cy.visit('localhost:5173/events');
44

5-
cy.get('h1').should('contain', 'Events');
5+
cy.should('contain', 'my events');
66
});
77
});

cypress/e2e/organizations/organizations.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ describe('Organizations Page', () => {
22
it('displays the correct main title', () => {
33
cy.visit('localhost:5173/organizations');
44

5-
cy.get('h1').should('contain', 'Organizations');
5+
cy.should('contain', 'my orgs');
66
});
77
});

src/components/Carousel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export default function Carousel({ type }: CarouselProps) {
1111
<div>
1212
<h2 className="carousel-title">{type}</h2>
1313
<div className="carousel">
14-
<Organization />
15-
<Organization />
16-
<Organization />
14+
<Organization title="Math Club" desc="The RPI Math Faculty approved and Union affiliated math club!"/>
15+
<Organization title="Math Club" desc="The RPI Math Faculty approved and Union affiliated math club!"/>
16+
<Organization title="Math Club" desc="The RPI Math Faculty approved and Union affiliated math club!"/>
1717
</div>
1818
</div>
1919
</>

src/components/Event.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import '../css/events.css';
2+
3+
export default function Event() {
4+
return (
5+
<div className="org">
6+
7+
</div>
8+
);
9+
}

src/components/Organization.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
11
import '../css/organizations.css';
22

3-
export default function Organization() {
3+
type OrganizationProps = {
4+
title: string;
5+
desc: string;
6+
}
7+
8+
export default function Organization({title, desc}:OrganizationProps) {
49
return (
510
<div className="org">
6-
11+
<div className="org-metadata">
12+
<div className="image-placeholder"></div>
13+
<span className="org-title">{title}</span>
14+
<span>{desc}</span>
15+
</div>
16+
<div className="org-btns">
17+
<button className="events-btn">
18+
Events
19+
</button>
20+
<button className="manage-btn">
21+
Manage
22+
</button>
23+
</div>
724
</div>
825
);
926
}

src/components/navbar/Navbar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ export default function Navbar() {
5252
width: `${indicator.width}px`,
5353
}}
5454
/>
55-
<NavbarLink label="profile" nav="/" />
56-
<NavbarLink label="home" nav="/events" />
57-
<NavbarLink label="events" nav="/insights" />
55+
<NavbarLink label="profile" nav="/profile" />
56+
<NavbarLink label="home" nav="/" />
57+
<NavbarLink label="events" nav="/events" />
5858
<NavbarLink label="orgs" nav="/organizations" />
5959
<NavbarLink label="test" nav="/testing" />
6060
</div>

src/css/app-layout.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
.app-content {
1010
padding: 3rem;
11-
width: 100%;
11+
width: 75%;
1212
}

src/css/carousel.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
.carousel {
88
width: 100%;
9-
background: #F1DEDE;
10-
height: 20rem;
9+
background: var(--carousel-bg);
10+
height: 18rem;
1111
border-radius: 2rem;
1212
padding: 1rem;
1313

@@ -20,5 +20,6 @@
2020
.carousel-title {
2121
margin: 0;
2222
font-size: 1rem;
23-
color: black;
23+
color: var(--standard-bw-text);
24+
font-weight: 600;
2425
}

src/css/colors.css

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ abstracted to a single file.
88
HOW TO USE: All variables in the CAPY COLOR SUITE should be treated
99
as constants. These constants should NOT be found in other CSS files.
1010
Instead, create variables in the COLOR VARIABLES section, and use those.
11-
COLOR VARIABLES should be duplicated and properly adjusted in the dark
12-
mode section as well.
11+
COLOR VARIABLES should be duplicated and adjusted in the dark mode
12+
section as well.
1313
1414
*/
1515

@@ -18,7 +18,6 @@ mode section as well.
1818
--site-transition: 0.25s;
1919
--site-font: 'Asap', sans-serif;
2020

21-
/* ========================================== */
2221

2322
/* CAPY COLOR SUITE ========================= */
2423

@@ -32,7 +31,9 @@ mode section as well.
3231
--highlight: #f4f8f6;
3332
--off-black: #20201f;
3433

35-
/* ========================================== */
34+
35+
/* MISC DEV VARIABLES ======================= */
36+
3637

3738
/* COLOR VARIABLES ========================== */
3839

@@ -41,11 +42,22 @@ mode section as well.
4142
--standard-white: var(--off-white);
4243
--standard-black: var(--off-black);
4344
--standard-text: var(--primary);
45+
--standard-bw-text: var(--off-black);
46+
47+
/* Navbar */
48+
--nav-bg: #e6e6e6;
49+
--navlink-hover-bg: rgb(0 0 0 / 5%);
50+
--navlink-color: #444;
51+
--nav-indicator-bg: #d0d0d0;
4452

45-
/* Sidebar */
46-
--sidebar-bg: var(--highlight);
47-
--sidebar-link-hover-bg: var(--off-white);
48-
--sidebar-active-link-bg: var(--primary-light);
53+
/* Carousel */
54+
--carousel-bg: #f2dede;
55+
56+
/* Organizations */
57+
--org-bg: #D9D9D9;
58+
--img-placeholder-bg: #b3807d;
59+
--general-org-btn-bg: #b3807d;
60+
--manage-org-btn-bg: #97bdc6;
4961
}
5062

5163
[data-theme='dark'] {
@@ -56,9 +68,10 @@ mode section as well.
5668
--standard-white: var(--off-black);
5769
--standard-black: var(--off-white);
5870
--standard-text: var(--off-white);
71+
--standard-bw-text: var(--off-white);
72+
73+
/* Navbar */
74+
5975

60-
/* Sidebar */
61-
--sidebar-bg: var(--primary-extra-dark);
62-
--sidebar-link-hover-bg: var(--accent);
63-
--sidebar-active-link-bg: var(--accent);
76+
/* Carousel */
6477
}

src/css/events.css

Whitespace-only changes.

0 commit comments

Comments
 (0)