Skip to content

Commit

Permalink
Merge pull request #173 from HKN-UCSD/feature-event-colors
Browse files Browse the repository at this point in the history
Change Outreach Events Color for Better Clarity
  • Loading branch information
niannianwang authored Oct 30, 2024
2 parents ca61367 + f976bbf commit 2387374
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions frontend/src/Components/Events/EventCalendar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
onMount(async () => {
const calendarEl = document.getElementById('calendar');
var eventColors = {
'General': '#216CDE',
'Mentorship': '#216CDE',
'Professional': '#216CDE',
'Technical': '#216CDE',
'Social': '#216CDE',
'Outreach': '#06402B',
}
// Fetch events from the API and wait for the promise to resolve
let events = await getEvents();
Expand All @@ -34,8 +43,9 @@
end: event.end_time,
url: `/events/${event.pk}`,
content: event.descriptions,
backgroundColor: event.is_draft ? '#bababa' : '#4350AF',
borderColor: event.is_draft ? '#bababa' : '#4350AF',
backgroundColor: event.is_draft ? '#bababa' : eventColors[event.event_type],
borderColor: event.is_draft ? '#bababa' : eventColors[event.event_type],
textColor: '#FFFFFF',
})),
eventDisplay: 'block',
customButtons: {
Expand Down

0 comments on commit 2387374

Please sign in to comment.