From 871ec8b48a7f6edf302f138304e6ece194e6d7aa Mon Sep 17 00:00:00 2001 From: codecalm Date: Sun, 8 Nov 2020 20:06:24 +0100 Subject: [PATCH] homepage activity --- src/pages/_data/activity.yml | 18 +++++++++++++ src/pages/_includes/cards/activity.html | 5 ++++ src/pages/_includes/layout/homepage.html | 33 +++++++++++++++++------- src/pages/_includes/parts/activity.html | 24 +++++++++++++++++ src/pages/activity.html | 21 +++++++++++++++ src/scss/_variables.scss | 5 ++-- src/scss/ui/_grid.scss | 4 +++ 7 files changed, 97 insertions(+), 13 deletions(-) create mode 100644 src/pages/_data/activity.yml create mode 100644 src/pages/_includes/cards/activity.html create mode 100644 src/pages/_includes/parts/activity.html create mode 100644 src/pages/activity.html diff --git a/src/pages/_data/activity.yml b/src/pages/_data/activity.yml new file mode 100644 index 000000000..a6c404e75 --- /dev/null +++ b/src/pages/_data/activity.yml @@ -0,0 +1,18 @@ +- text: "%p commented on your \"I'm not a witch.\" post." +- text: "It's %p's birthday. Wish him well!" +- text: "%p posted \"Well, what do you want?\"." +- text: "%p created a new project Morning alarm clock." +- text: "%p liked your photo." +- text: "%p registered new client as %c." +- text: "%p closed a new deal on project Pen Pineapple Apple Pen." +- text: "%p created a new project for %c." +- text: "%p change status of Tabler Icons from open to closed." +- text: "%p liked Tabler UI Kit." +- text: "%p posted new video." +- text: "%p and 3 others followed you." +- text: "%p upload 3 new photos to category Inspirations." +- text: "%p made a $10 donation." +- text: "%p created a profile." +- text: "%p hosted the event Tabler UI Birthday." +- text: "%p mentioned you on Best of 2020." +- text: "%p sent a Review Request to Amanda Blake." diff --git a/src/pages/_includes/cards/activity.html b/src/pages/_includes/cards/activity.html new file mode 100644 index 000000000..989deb0e3 --- /dev/null +++ b/src/pages/_includes/cards/activity.html @@ -0,0 +1,5 @@ +
+
+ {% include parts/activity.html %} +
+
\ No newline at end of file diff --git a/src/pages/_includes/layout/homepage.html b/src/pages/_includes/layout/homepage.html index 486ae22ee..8b659c066 100644 --- a/src/pages/_includes/layout/homepage.html +++ b/src/pages/_includes/layout/homepage.html @@ -89,19 +89,32 @@ {% include cards/development-activity.html %} -
- {% include cards/small-stats.html color="blue" icon="currency-dollar" count="132" subtitle="Sales" description="12 waiting payments" %} +
+ {% include cards/activity.html %}
-
- {% include cards/small-stats.html color="green" icon="shopping-cart" count="78" subtitle="Orders" description="32 shipped" %} -
-
- {% include cards/small-stats.html chart-position="left" chart-type="pie" chart-data="56/100" chart-label="56%" color="red" count="1352" subtitle="Members" description="163 registered today" %} -
-
- {% include cards/small-stats.html color="yellow" chart-type="pie" chart-data="22/100" color="yellow" count="132" subtitle="Comments" description="16 waiting" %} + +
+
+
+ {% include cards/small-stats.html color="blue" icon="currency-dollar" count="132" subtitle="Sales" description="12 waiting payments" %} +
+
+ {% include cards/small-stats.html color="green" icon="shopping-cart" count="78" subtitle="Orders" description="32 shipped" %} +
+
+ {% include cards/small-stats.html color="yellow" icon="users" count="1352" subtitle="Members" description="163 registered today" %} +
+
+ {% include cards/small-stats.html icon="brand-twitter" color="twitter" count="623" subtitle="Shares" description="16 today" %} +
+
+ {% include cards/small-stats.html icon="brand-facebook" color="facebook" count="132" subtitle="Likes" description="21 today" %} +
+
+ +
{% include cards/most-visited-pages.html %}
diff --git a/src/pages/_includes/parts/activity.html b/src/pages/_includes/parts/activity.html new file mode 100644 index 000000000..8593b141f --- /dev/null +++ b/src/pages/_includes/parts/activity.html @@ -0,0 +1,24 @@ +{% assign limit = include.limit | default: false %} +
+ {% for item in site.data.activity limit:limit %} + {% assign person = site.data.people[forloop.index] %} +
+
+
+ {% include ui/avatar.html person=person %} +
+
+
+ {{ item.text | replace: '%p', person.full_name | replace: '%c', person.company }} +
+
2 days ago
+
+ {% if forloop.index < 5 %} +
+
+
+ {% endif %} +
+
+ {% endfor %} +
\ No newline at end of file diff --git a/src/pages/activity.html b/src/pages/activity.html new file mode 100644 index 000000000..5358f1bc6 --- /dev/null +++ b/src/pages/activity.html @@ -0,0 +1,21 @@ +--- +title: Activity +page-header: Activity +--- + +
+
+
+
+ {% include parts/activity.html %} +
+
+
+
+
+
+ +
+
+
+
\ No newline at end of file diff --git a/src/scss/_variables.scss b/src/scss/_variables.scss index 1db204cfb..ecb2f92eb 100644 --- a/src/scss/_variables.scss +++ b/src/scss/_variables.scss @@ -216,9 +216,8 @@ $spacers: ( 1: $spacer / 4, 2: $spacer / 2, 3: $spacer, - 4: $spacer * 1.5, - 5: $spacer * 3, - 6: $spacer * 4.5 + 4: $spacer * 2, + 5: $spacer * 4, ) !default; $negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default; diff --git a/src/scss/ui/_grid.scss b/src/scss/ui/_grid.scss index 9fcb6e958..e233f5cec 100644 --- a/src/scss/ui/_grid.scss +++ b/src/scss/ui/_grid.scss @@ -1,3 +1,7 @@ +.row > * { + min-width: 0; +} + .col-separator { border-left: 1px solid $border-color; }