Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:25-alpine AS build
FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/events/events.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Event Page', () => {
it('displays the correct main title', () => {
cy.visit('localhost:5173/events');
cy.visit('localhost:5173/app/events');

cy.contains('my events');
cy.contains('events');
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/home/home.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('Home Page', () => {
it('displays the correct main title', () => {
cy.visit('localhost:5173');
cy.visit('localhost:5173/app/');

cy.contains('UserId:');
});
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/organizations/organizations.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Organizations Page', () => {
it('displays the correct main title', () => {
cy.visit('localhost:5173/organizations');
cy.visit('localhost:5173/app/organizations');

cy.contains('my orgs');
cy.contains('orgs');
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/profile/profile.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('Profile Page', () => {
it('displays the correct main title', () => {
cy.visit('localhost:5173profile');
cy.visit('localhost:5173/app/profile');

cy.get('h1').should('contain', 'Profile');
});
Expand Down
13 changes: 9 additions & 4 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
server {
listen 80;

location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri /index.html;
root /usr/share/nginx/html;

location = /app {
return 301 /app/;
}

location /app/ {
rewrite ^/app/(.*)$ /$1 break;
try_files $uri $uri/ /index.html;
}
}
6 changes: 2 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import Testing from './pages/Testing.tsx'; // temp page
import Profile from './pages/Profile.tsx';
import { AuthProvider } from './contexts/AuthContext.tsx';

function App() {
export default function App() {
return (
<>
<AuthProvider>
<ThemeProvider>
<BrowserRouter>
<BrowserRouter basename="/app">
<Routes>
<Route element={<AppLayout />}>
<Route path="/profile" element={<Profile />} />
Expand All @@ -29,5 +29,3 @@ function App() {
</>
);
}

export default App;
5 changes: 2 additions & 3 deletions src/components/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ type CarouselProps =
| { type: 'organization'; title: string; data: Organization[] };

export default function Carousel({ type, title, data }: CarouselProps) {
console.log(data);
const [active, setActive] = useState(0);

const moveLeft = () => {
Expand Down Expand Up @@ -40,7 +39,7 @@ export default function Carousel({ type, title, data }: CarouselProps) {
return (
<EventPanel
event={event}
className={`carousel-item offset-${offset}`}
className={`carousel-item ${type}-offset-${offset}`}
onClick={() => setActive(index)}
/>
);
Expand All @@ -51,7 +50,7 @@ export default function Carousel({ type, title, data }: CarouselProps) {
return (
<OrganizationPanel
organization={org}
className={`carousel-item offset-${offset}`}
className={`carousel-item ${type}-offset-${offset}`}
onClick={() => setActive(index)}
/>
);
Expand Down
13 changes: 4 additions & 9 deletions src/components/EventCarouselPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../css/organizations.css';
import '../css/events.css';
import '../css/carousel.css';

import type { Event } from '../types/Event.ts';
Expand All @@ -11,16 +11,11 @@ type EventCarouselPanelProps = {

export default function EventCarouselPanel({ event, className, onClick }: EventCarouselPanelProps) {
return (
<div className={`org ${className}`} onClick={onClick}>
<div className="org-metadata">
<div className="image-placeholder"></div>
<span className="org-title">{event.title}</span>
<div className={`event ${className}`} onClick={onClick}>
<div className="event-metadata">
<span className="event-title">{event.title}</span>
<span>{event.description}</span>
</div>
<div className="org-btns">
<button className="events-btn">Events</button>
<button className="manage-btn">Manage</button>
</div>
</div>
);
}
129 changes: 102 additions & 27 deletions src/css/carousel.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,77 +49,152 @@
will-change: transform;
}

/* arrow buttons */
.carousel-arrow {
z-index: 10;
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
border: none;
background: transparent;
cursor: pointer;
font-size: 2.5rem;
color: black;
transition: var(--site-transition);
}

.carousel-arrow:hover {
scale: 1.1;
}

/* left arrow */
.carousel-arrow.left {
margin-left: 0.5rem;
}

/* right arrow */
.carousel-arrow.right {
margin-right: 0.5rem;
}

/* ===================================================== */

/* OFFSETS */

/* ===================================================== */

.offset-2 {
.organization-offset-2 {
transform: translate(90%, -50%) scale(0.75);
opacity: 0.8;
z-index: 1;
}

.offset-1 {
.organization-offset-1 {
transform: translate(50%, -50%) scale(0.9);
opacity: 1;
z-index: 2;
}

.offset-0 {
.organization-offset-0 {
transform: translate(-50%, -50%) scale(1);
opacity: 1;
z-index: 3;
box-shadow: 0 0 1rem gray;
}

/* stylelint-disable-next-line selector-class-pattern */
.offset--1 {
.organization-offset--1 {
transform: translate(-150%, -50%) scale(0.9);
opacity: 1;
z-index: 2;
}

/* stylelint-disable-next-line selector-class-pattern */
.offset--2 {
.organization-offset--2 {
transform: translate(-190%, -50%) scale(0.75);
opacity: 0.8;
z-index: 1;
}

/* hide far cards */
[class*='offset-3'],
[class*='offset--3'] {
[class*='organization-offset-3'],
[class*='organization-offset--3'] {
opacity: 0;
pointer-events: none;
z-index: 0;
}

/* arrow buttons */
.carousel-arrow {
z-index: 10;
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
border: none;
background: transparent;
cursor: pointer;
font-size: 2.5rem;
color: black;
transition: var(--site-transition);
.event-offset-4 {
transform: translate(160%, -50%) scale(0.6);
filter: saturate(0.2);
opacity: 0.8;
z-index: 1;
}

.carousel-arrow:hover {
scale: 1.1;
.event-offset-3 {
transform: translate(140%, -50%) scale(0.76);
filter: saturate(0.4);
opacity: 1;
z-index: 2;
}

/* left arrow */
.carousel-arrow.left {
margin-left: 0.5rem;
.event-offset-2 {
transform: translate(105%, -50%) scale(0.88);
filter: saturate(0.6);
opacity: 1;
z-index: 3;
}

/* right arrow */
.carousel-arrow.right {
margin-right: 0.5rem;
.event-offset-1 {
transform: translate(45%, -50%) scale(0.96);
filter: saturate(0.8);
opacity: 1;
z-index: 4;
}

.event-offset-0 {
transform: translate(-50%, -50%) scale(1);
opacity: 1;
z-index: 5;
box-shadow: 0 0 0.75rem gray;
}

/* stylelint-disable-next-line selector-class-pattern */
.event-offset--1 {
transform: translate(-145%, -50%) scale(0.96);
filter: saturate(0.8);
opacity: 1;
z-index: 4;
}

/* stylelint-disable-next-line selector-class-pattern */
.event-offset--2 {
transform: translate(-205%, -50%) scale(0.88);
filter: saturate(0.6);
opacity: 1;
z-index: 3;
}

/* stylelint-disable-next-line selector-class-pattern */
.event-offset--3 {
transform: translate(-240%, -50%) scale(0.76);
filter: saturate(0.4);
opacity: 1;
z-index: 2;
}

/* stylelint-disable-next-line selector-class-pattern */
.event-offset--4 {
transform: translate(-260%, -50%) scale(0.6);
filter: saturate(0.2);
opacity: 0.8;
z-index: 1;
}

/* hide far cards */
[class*='event-offset-5'],
[class*='eventoffset--5'] {
opacity: 0;
pointer-events: none;
z-index: 0;
}
57 changes: 57 additions & 0 deletions src/css/events.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.event {
height: 16rem;
width: 14rem;
border-radius: 2rem;
background: var(--org-bg);
padding: 1.25rem;
color: var(--standard-bw-text);
cursor: pointer;
display: flex;
flex-direction: column;
}

.event-metadata {
display: flex;
flex-direction: column;
gap: 1rem;
}

.event-title {
font-size: 1.1rem;
}

.event-btns {
margin: auto 0 0.5rem;
display: flex;
flex-direction: row;
}

.events-btn,
.join-btn,
.manage-btn,
.home-btn {
font-size: 1rem;
padding: 0.25rem 2rem;
border-radius: 2rem;
border: none;
cursor: pointer;
color: var(--standard-bw-text);
}

.events-btn {
background: var(--general-org-btn-bg);
}

.join-btn {
margin-left: auto;
background: var(--general-org-btn-bg);
}

.manage-btn {
margin-left: auto;
background: var(--manage-org-btn-bg);
}

.home-btn {
background: var(--general-org-btn-bg);
}
Loading