From 930fbe02ea597dafc78747ef24c37c93bcbaa718 Mon Sep 17 00:00:00 2001 From: ashleysyg Date: Thu, 24 Aug 2023 11:51:25 -0400 Subject: [PATCH 01/10] feat: sort people by team --- components/blocks/About.vue | 19 ++++++++++++++++++- content | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/components/blocks/About.vue b/components/blocks/About.vue index 72866f4..62aba29 100644 --- a/components/blocks/About.vue +++ b/components/blocks/About.vue @@ -68,8 +68,9 @@
+ {{ teamSort }} (a.name > b.name ? 1 : -1)); return people; }, + teams() { + const teams = [...new Set(this.orderedPeople.map((x) => x.team))]; + const subteams = [...new Set(this.orderedPeople.map((x) => x.subteam))]; + teams.sort((a, b) => (a > b ? 1 : -1)); + subteams.sort((a, b) => (a > b ? 1 : -1)); + return [teams, subteams]; + }, + teamSort() { + const d = this.orderedPeople; + d.sort((a, b) => { + return ( + this.teams[1].indexOf(a.subteam) - this.teams[1].indexOf(b.subteam) + ); + }); + return d; + }, }, methods: { urlize, diff --git a/content b/content index e8744b7..6eddcd4 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit e8744b7467cfd85675948fb334a855776fb9d896 +Subproject commit 6eddcd4d5baa3aca495cb52283b599b601529d53 From 765ec5b973123b3f00e2512d32bcb06449a1cc16 Mon Sep 17 00:00:00 2001 From: ashleysyg Date: Thu, 24 Aug 2023 16:00:12 -0400 Subject: [PATCH 02/10] feat: add accent colors by subteam --- components/blocks/About.vue | 16 ++++-- components/blocks/FilesToCards.vue | 89 ++++++++---------------------- 2 files changed, 35 insertions(+), 70 deletions(-) diff --git a/components/blocks/About.vue b/components/blocks/About.vue index 62aba29..a59e853 100644 --- a/components/blocks/About.vue +++ b/components/blocks/About.vue @@ -68,12 +68,11 @@
- {{ teamSort }} import DTOC from '@/components/base/DTableOfContents.vue'; import DPersonCard from '@/components/base/DPersonCard.vue'; -import { urlize } from '@/utils'; +import { COLOR_VARIANTS, urlize } from '@/utils'; export default { components: { @@ -154,7 +153,6 @@ export default { return sortOrder.indexOf(a.slug) - sortOrder.indexOf(b.slug); }); }, - tocData() { return this.sortedData.map((d, i) => { return { @@ -164,7 +162,6 @@ export default { }; }); }, - orderedPeople() { const d = this.data; const people = [...d.find((d) => d.title === 'People').data]; @@ -190,6 +187,15 @@ export default { }, methods: { urlize, + teamColor() { + const numTeams = this.teams[1].length; + const colors = COLOR_VARIANTS.slice(2, numTeams + 2); + const obj = {}; + this.teams[1].forEach((k, i) => { + obj[k] = colors[i]; + }); + return obj; + }, }, }; diff --git a/components/blocks/FilesToCards.vue b/components/blocks/FilesToCards.vue index f10fcb2..5403b50 100644 --- a/components/blocks/FilesToCards.vue +++ b/components/blocks/FilesToCards.vue @@ -6,12 +6,7 @@ $route.params.main === 'services' || ($route.params.main === 'our-work' && !$route.params.category) " - class=" - card-container - is-flex - mt-6 - is-justify-content-space-evenly is-flex-wrap-wrap - " + class="÷ card-container is-flex mt-6 is-justify-content-space-evenly is-flex-wrap-wrap" > {{ link.text.toUpperCase() }} @@ -63,14 +51,7 @@ {{ link.text.toUpperCase() }} @@ -83,22 +64,16 @@
Filter cards by: