Skip to content
Open
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
67 changes: 64 additions & 3 deletions src/components/Timetable/TimetableContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,9 @@ const DayView = ({
</DayTimeColumn>
<DayEventColumn>
{isToday && <CurrentTimeIndicator />}

<LunchBlock>LUNCH</LunchBlock>

{processedDayEvents.map((event) => {
const course = coursedata[event.courseCode]

Expand Down Expand Up @@ -1647,6 +1650,8 @@ const WeekView = ({
))}
</WeekTimeColumn>

<WeekLunchBlock>LUNCH</WeekLunchBlock>

{/* 4. Map over the `daysOfWeek` array again for the columns, using the index. */}
{daysOfWeek.map((day, dayIndex) => {
// The index (0-6) will correctly correspond to Monday-Sunday.
Expand Down Expand Up @@ -2404,9 +2409,9 @@ const SubHeader = styled.div`
const TimetablePageHeadingWrapper = styled.div`
padding-bottom: 0.75rem;
margin-bottom: -10px;
position: sticky;
top: 0;
z-index: 100;
// position: sticky;
// top: 0;
// z-index: 100;
background: ${({ theme }) => theme.bg};
width: 100%;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
Expand Down Expand Up @@ -2726,6 +2731,7 @@ const WeekGrid = styled.div`
min-width: 800px;
width: 100%;
color: #ffffff0f;
position: relative;
`

const WeekTimeColumn = styled.div`
Expand Down Expand Up @@ -3122,3 +3128,58 @@ const CourseCardContent = styled.div`
justify-content: space-between;
align-items: center;
`

const LunchBlock = styled.div`
position: absolute;
top: 240px;
left: 0;
width: 100%;
height: 90px;

background-color: ${({ theme }) => theme.secondary || '#2b273b'};

background-image: linear-gradient(90deg, rgba(34, 70, 168, 0.79) 0%, rgba(34, 70, 168, 0.31) 100%);

border: 1px dashed rgba(59, 130, 246, 0.4);
border-radius: 6px;

display: flex;
align-items: center;
justify-content: center;

color: #c3c6cb;
font-size: 0.9rem;
font-weight: 500;
font-family: "Century Schoolbook", "Century", "Helvetica Neue", Helvetica, serif;

z-index: 1;
pointer-events: none;
box-sizing: border-box;
`

const WeekLunchBlock = styled.div`
position: absolute;
top: 240px;
left: 80px;
width: calc(100% - 80px);
height: 90px;

background-color: ${({ theme }) => theme.secondary || '#2b273b'};
background-image: linear-gradient(90deg, rgba(34, 70, 168, 0.79) 0%, rgba(34, 70, 168, 0.31) 100%);

border: 1px dashed rgba(59, 130, 246, 0.4);
border-radius: 6px;

display: flex;
align-items: center;
justify-content: center;

color: #c3c6cb;
font-size: 1rem;
font-weight: 500;
font-family: "Century Schoolbook", "Century", "Helvetica Neue", Helvetica, serif;

z-index: 1;
pointer-events: none;
box-sizing: border-box;
`