From e63ec901f233c6c5662a5b3ab8adc81527f4238a Mon Sep 17 00:00:00 2001 From: ryanyychen Date: Thu, 16 May 2024 19:38:10 -0700 Subject: [PATCH 1/3] Initial color palette --- .../Components/Events/EventCalendar.svelte | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/frontend/src/Components/Events/EventCalendar.svelte b/frontend/src/Components/Events/EventCalendar.svelte index a8be7f4b..1a7589d7 100644 --- a/frontend/src/Components/Events/EventCalendar.svelte +++ b/frontend/src/Components/Events/EventCalendar.svelte @@ -11,6 +11,40 @@ onMount(async () => { const calendarEl = document.getElementById('calendar'); + var eventColors = { + 'General': '#216CDE', + 'Mentorship': '#5887FF', + 'Professional': '#22629D', + 'Technical': '#715AFF', + 'Social': '#A682FF', + 'Outreach': '#55C1FF' + } + // var eventColors = { + // 'General': '#216CDE', + // 'Mentorship': '#BB444F', + // 'Professional': '#597c60', + // 'Technical': '#9318E7', + // 'Social': '#1E6091', + // 'Outreach': '#168AAD' + // } + // var eventColors = { + // 'General': '#184E77', + // 'Mentorship': '#1A759F', + // 'Professional': '#34A0A4', + // 'Technical': '#52B69A', + // 'Social': '#99D98C', + // 'Outreach': '#D9ED92' + // } + + var eventBorders = { + 'General': '#216CDE', + 'Mentorship': '#48CAE4', + 'Professional': '#597c60', + 'Technical': '#52B69A', + 'Social': '#1E6091', + 'Outreach': '#168AAD' + } + // Fetch events from the API and wait for the promise to resolve let events = await getEvents(); @@ -34,8 +68,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: { From b45bc4fad0a319384b58c09239e28e17aabbdb08 Mon Sep 17 00:00:00 2001 From: ryanyychen Date: Tue, 29 Oct 2024 17:53:23 -0700 Subject: [PATCH 2/3] Remove commented color schemes --- .../Components/Events/EventCalendar.svelte | 35 +++---------------- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/frontend/src/Components/Events/EventCalendar.svelte b/frontend/src/Components/Events/EventCalendar.svelte index 1a7589d7..1969ece9 100644 --- a/frontend/src/Components/Events/EventCalendar.svelte +++ b/frontend/src/Components/Events/EventCalendar.svelte @@ -13,36 +13,11 @@ var eventColors = { 'General': '#216CDE', - 'Mentorship': '#5887FF', - 'Professional': '#22629D', - 'Technical': '#715AFF', - 'Social': '#A682FF', - 'Outreach': '#55C1FF' - } - // var eventColors = { - // 'General': '#216CDE', - // 'Mentorship': '#BB444F', - // 'Professional': '#597c60', - // 'Technical': '#9318E7', - // 'Social': '#1E6091', - // 'Outreach': '#168AAD' - // } - // var eventColors = { - // 'General': '#184E77', - // 'Mentorship': '#1A759F', - // 'Professional': '#34A0A4', - // 'Technical': '#52B69A', - // 'Social': '#99D98C', - // 'Outreach': '#D9ED92' - // } - - var eventBorders = { - 'General': '#216CDE', - 'Mentorship': '#48CAE4', - 'Professional': '#597c60', - 'Technical': '#52B69A', - 'Social': '#1E6091', - 'Outreach': '#168AAD' + 'Mentorship': '#216CDE', + 'Professional': '#216CDE', + 'Technical': '#216CDE', + 'Social': '#216CDE', + 'Outreach': '#06402B' } // Fetch events from the API and wait for the promise to resolve From f976bbfd166830ca5c179a800eaa921afbf76cd1 Mon Sep 17 00:00:00 2001 From: ryanyychen Date: Tue, 29 Oct 2024 17:54:54 -0700 Subject: [PATCH 3/3] Change outreach to different color --- frontend/src/Components/Events/EventCalendar.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Components/Events/EventCalendar.svelte b/frontend/src/Components/Events/EventCalendar.svelte index 1969ece9..07c3547f 100644 --- a/frontend/src/Components/Events/EventCalendar.svelte +++ b/frontend/src/Components/Events/EventCalendar.svelte @@ -17,7 +17,7 @@ 'Professional': '#216CDE', 'Technical': '#216CDE', 'Social': '#216CDE', - 'Outreach': '#06402B' + 'Outreach': '#06402B', } // Fetch events from the API and wait for the promise to resolve