From d940405775339b983ad0d021eac30f644dd79ed3 Mon Sep 17 00:00:00 2001 From: Christian Bedon Date: Mon, 18 Nov 2024 14:55:45 -0500 Subject: [PATCH 1/3] feat: add badge shine and rays animations --- .storybook/stories/BadgeContainer.stories.js | 10 +- src/assets/images/my-kiva/badge-shine.svg | 5 + .../images/my-kiva/badge-shine/first.svg | 4 + .../images/my-kiva/badge-shine/second.svg | 3 + src/assets/images/my-kiva/rays/first.svg | 64 +++++++ src/assets/images/my-kiva/rays/second.svg | 64 +++++++ src/assets/images/my-kiva/rays/third.svg | 64 +++++++ src/components/MyKiva/BadgeContainer.vue | 156 ++++++++++++++---- 8 files changed, 337 insertions(+), 33 deletions(-) create mode 100644 src/assets/images/my-kiva/badge-shine.svg create mode 100644 src/assets/images/my-kiva/badge-shine/first.svg create mode 100644 src/assets/images/my-kiva/badge-shine/second.svg create mode 100644 src/assets/images/my-kiva/rays/first.svg create mode 100644 src/assets/images/my-kiva/rays/second.svg create mode 100644 src/assets/images/my-kiva/rays/third.svg diff --git a/.storybook/stories/BadgeContainer.stories.js b/.storybook/stories/BadgeContainer.stories.js index de18a4fd4c..edcefe9ef2 100644 --- a/.storybook/stories/BadgeContainer.stories.js +++ b/.storybook/stories/BadgeContainer.stories.js @@ -28,8 +28,8 @@ const story = (args = {}, badgeUrl) => { components: { BadgeContainer }, setup() { return { args }; }, template: ` - - + + `, }); @@ -66,3 +66,9 @@ export const RectangleCompleted = story({ status: BADGE_COMPLETED, shape: BADGE_ export const RectangleInProgress = story({ status: BADGE_IN_PROGRESS, shape: BADGE_SHAPE_RECTANGLE }, badgeUsEconomicEquality.contentfulData[0].imageUrl); export const RectangleLocked = story({ status: BADGE_LOCKED, shape: BADGE_SHAPE_RECTANGLE }, badgeUsEconomicEquality.contentfulData[0].imageUrl); + +export const BadgeWithRays = story({showRays: true, status: BADGE_COMPLETED, shape: BADGE_SHAPE_ARCH}, badgeClimateAction.contentfulData[0].imageUrl); + +export const BadgeWithShine = story({showShine: true, status: BADGE_COMPLETED, shape: BADGE_SHAPE_ARCH}, badgeClimateAction.contentfulData[0].imageUrl); + +export const BadgeWithShineAndRays = story({showRays: true, showShine: true, status: BADGE_COMPLETED, shape: BADGE_SHAPE_ARCH}, badgeClimateAction.contentfulData[0].imageUrl); diff --git a/src/assets/images/my-kiva/badge-shine.svg b/src/assets/images/my-kiva/badge-shine.svg new file mode 100644 index 0000000000..8bebf23d58 --- /dev/null +++ b/src/assets/images/my-kiva/badge-shine.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/images/my-kiva/badge-shine/first.svg b/src/assets/images/my-kiva/badge-shine/first.svg new file mode 100644 index 0000000000..a0600c580d --- /dev/null +++ b/src/assets/images/my-kiva/badge-shine/first.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/images/my-kiva/badge-shine/second.svg b/src/assets/images/my-kiva/badge-shine/second.svg new file mode 100644 index 0000000000..cb66238e1f --- /dev/null +++ b/src/assets/images/my-kiva/badge-shine/second.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/images/my-kiva/rays/first.svg b/src/assets/images/my-kiva/rays/first.svg new file mode 100644 index 0000000000..e254de8c45 --- /dev/null +++ b/src/assets/images/my-kiva/rays/first.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/my-kiva/rays/second.svg b/src/assets/images/my-kiva/rays/second.svg new file mode 100644 index 0000000000..d0e3d7bd3b --- /dev/null +++ b/src/assets/images/my-kiva/rays/second.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/my-kiva/rays/third.svg b/src/assets/images/my-kiva/rays/third.svg new file mode 100644 index 0000000000..c5a453e221 --- /dev/null +++ b/src/assets/images/my-kiva/rays/third.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/MyKiva/BadgeContainer.vue b/src/components/MyKiva/BadgeContainer.vue index 100d74747b..173a596e67 100644 --- a/src/components/MyKiva/BadgeContainer.vue +++ b/src/components/MyKiva/BadgeContainer.vue @@ -1,9 +1,15 @@