From 5077072747fd1777d4c11ea99e4559416dd6e565 Mon Sep 17 00:00:00 2001 From: Axolotle Date: Wed, 16 Dec 2020 12:08:18 +0100 Subject: [PATCH] add basic skeletons components --- .../globals/skeletons/CardButtonsSkeleton.vue | 32 ++++++++++++ .../globals/skeletons/CardFormSkeleton.vue | 52 +++++++++++++++++++ .../globals/skeletons/CardInfoSkeleton.vue | 30 +++++++++++ .../globals/skeletons/CardListSkeleton.vue | 30 +++++++++++ .../globals/skeletons/ListGroupSkeleton.vue | 22 ++++++++ app/src/helpers/commons.js | 5 ++ 6 files changed, 171 insertions(+) create mode 100644 app/src/components/globals/skeletons/CardButtonsSkeleton.vue create mode 100644 app/src/components/globals/skeletons/CardFormSkeleton.vue create mode 100644 app/src/components/globals/skeletons/CardInfoSkeleton.vue create mode 100644 app/src/components/globals/skeletons/CardListSkeleton.vue create mode 100644 app/src/components/globals/skeletons/ListGroupSkeleton.vue diff --git a/app/src/components/globals/skeletons/CardButtonsSkeleton.vue b/app/src/components/globals/skeletons/CardButtonsSkeleton.vue new file mode 100644 index 00000000..14be30dc --- /dev/null +++ b/app/src/components/globals/skeletons/CardButtonsSkeleton.vue @@ -0,0 +1,32 @@ + + + diff --git a/app/src/components/globals/skeletons/CardFormSkeleton.vue b/app/src/components/globals/skeletons/CardFormSkeleton.vue new file mode 100644 index 00000000..882e7270 --- /dev/null +++ b/app/src/components/globals/skeletons/CardFormSkeleton.vue @@ -0,0 +1,52 @@ + + + diff --git a/app/src/components/globals/skeletons/CardInfoSkeleton.vue b/app/src/components/globals/skeletons/CardInfoSkeleton.vue new file mode 100644 index 00000000..ed234e61 --- /dev/null +++ b/app/src/components/globals/skeletons/CardInfoSkeleton.vue @@ -0,0 +1,30 @@ + + + diff --git a/app/src/components/globals/skeletons/CardListSkeleton.vue b/app/src/components/globals/skeletons/CardListSkeleton.vue new file mode 100644 index 00000000..f96884ab --- /dev/null +++ b/app/src/components/globals/skeletons/CardListSkeleton.vue @@ -0,0 +1,30 @@ + + + diff --git a/app/src/components/globals/skeletons/ListGroupSkeleton.vue b/app/src/components/globals/skeletons/ListGroupSkeleton.vue new file mode 100644 index 00000000..bebfa82f --- /dev/null +++ b/app/src/components/globals/skeletons/ListGroupSkeleton.vue @@ -0,0 +1,22 @@ + + + diff --git a/app/src/helpers/commons.js b/app/src/helpers/commons.js index 82cd9fd6..768e62c1 100644 --- a/app/src/helpers/commons.js +++ b/app/src/helpers/commons.js @@ -101,3 +101,8 @@ export function flattenObjectLiteral (obj, flattened = {}) { export function arrayDiff (arr1 = [], arr2 = []) { return arr1.filter(item => !arr2.includes(item)) } + + +export function randint (min, max) { + return Math.floor(Math.random() * (max - min + 1)) + min +}