Skip to content

Commit

Permalink
created separate styling file for event card
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenm1 committed Oct 21, 2024
1 parent 0157dce commit bfb5235
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 73 deletions.
70 changes: 0 additions & 70 deletions app/events/page.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,73 +25,3 @@ export const Title = styled.main`
text-align: left;
height: 50px;
`;

export const EventContainer = styled.main`
margin: auto;
width: 100%;
display: flex;
padding: 16px;
justify-content: flex-start;
align-items: flex-start;
`;

export const DateContainer = styled.main`
width: 10%;
`;

export const EventCardContainer = styled.main`
width: 65%;
padding: 16px;
background: ${COLORS.bread1};
border-radius: 8px;
display: flex;
justify-content: space-between;
align-items: center;
`;

export const MonthText = styled.main`
color: #000;
text-align: center;
font-family: ${BespokeSans.style.fontFamily};
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: normal;
`;

export const DateText = styled.main`
color: #000;
text-align: center;
font-family: ${BespokeSans.style.fontFamily};
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: normal;
`;

export const TimeText = styled.main`
color: #000;
font-family: ${BespokeSans.style.fontFamily};
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
`;

export const EventDescriptionText = styled.main`
color: #000;
font-family: ${BespokeSans.style.fontFamily};
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: normal;
`;

export const LocationText = styled.main`
color: ${COLORS.gray10};
font-family: ${BespokeSans.style.fontFamily};
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
`;
2 changes: 1 addition & 1 deletion app/events/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import React, { useEffect, useState } from 'react';
import { fetchAllEvents } from '../../api/supabase/queries/events';
import MyEventCard from '../../components/MyEventCard';
import MyEventCard from '../../components/eventcardcomponent/MyEventCard';
import { Event } from '../../types/schema';
import * as styles from './page.style';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import BPLogo from '@/assets/images/bp-logo.png';
import * as styles from '../app/events/page.style';
import { Event } from '../types/schema';
import { Event } from '../../types/schema';
import * as styles from './eventcard.style';

export default function MyEventCard(eventData: Event) {
const eventStart = new Date(eventData.start_date_time);
Expand Down
89 changes: 89 additions & 0 deletions components/eventcardcomponent/eventcard.style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
'use client';

import NextImage from 'next/image';
import styled from 'styled-components';
import COLORS from '../../styles/colors';
import { BespokeSans } from '../../styles/fonts';

export const Image = styled(NextImage)`
layout: responsive;
width: 20%;
height: 90%;
`;

export const EventContainer = styled.main`
margin: auto;
width: 100%;
display: flex;
padding: 16px;
justify-content: flex-start;
align-items: flex-start;
`;

export const DateContainer = styled.main`
width: 10%;
`;

export const EventCardContainer = styled.main`
width: 65%;
padding: 16px;
background: ${COLORS.bread1};
border-radius: 8px;
display: flex;
justify-content: space-between;
align-items: center;
`;

export const MonthText = styled.main`
color: #000;
text-align: center;
font-family: ${BespokeSans.style.fontFamily};
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: normal;
`;

export const DateText = styled.main`
color: #000;
text-align: center;
font-family: ${BespokeSans.style.fontFamily};
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: normal;
`;

export const TimeText = styled.main`
color: #000;
font-family: ${BespokeSans.style.fontFamily};
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
`;

export const EventDescriptionText = styled.main`
color: #000;
font-family: ${BespokeSans.style.fontFamily};
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: normal;
`;

export const LocationText = styled.main`
color: ${COLORS.gray10};
font-family: ${BespokeSans.style.fontFamily};
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
`;

export const EventModalBox = styled.main`
display: flex;
width: 80%;
padding: 24px;
gap: 24px;
`;

0 comments on commit bfb5235

Please sign in to comment.