From 37c462b08800753c6e42456a1512831f86a3f7a5 Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Fri, 15 Nov 2019 14:13:07 -0500 Subject: [PATCH] Add Slack to social options (#236) --- exampleSite/config.toml | 1 + layouts/partials/social-follow.html | 6 ++++++ layouts/partials/svg/slack.svg | 27 +++++++++++++++++++++++++++ src/css/_social-icons.css | 7 ++++++- stackbit.yaml | 3 +++ 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/svg/slack.svg diff --git a/exampleSite/config.toml b/exampleSite/config.toml index a416cd9..a47e118 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -27,6 +27,7 @@ enableRobotsTXT = true gitlab = "" linkedin = "" mastodon = "" + slack = "" # choose a background color from any on this page: http://tachyons.io/docs/themes/skins/ and preface it with "bg-" background_color_class = "bg-black" featured_image = "/images/gohugo-default-sample-hero-image.jpg" diff --git a/layouts/partials/social-follow.html b/layouts/partials/social-follow.html index 249a2a0..f2c029c 100644 --- a/layouts/partials/social-follow.html +++ b/layouts/partials/social-follow.html @@ -54,3 +54,9 @@ {{- partial "new-window-icon.html" . -}} {{ end }} +{{ with .Param "slack" }} + + {{ partial "svg/slack.svg" (dict "size" $icon_size) }} + {{- partial "new-window-icon.html" . -}} + +{{ end }} diff --git a/layouts/partials/svg/slack.svg b/layouts/partials/svg/slack.svg new file mode 100644 index 0000000..3bed325 --- /dev/null +++ b/layouts/partials/svg/slack.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/css/_social-icons.css b/src/css/_social-icons.css index 59ed072..8d79bee 100644 --- a/src/css/_social-icons.css +++ b/src/css/_social-icons.css @@ -1,4 +1,4 @@ -.facebook, .twitter, .instagram, .youtube, .github, .gitlab, .linkedin, .medium, .mastodon { +.facebook, .twitter, .instagram, .youtube, .github, .gitlab, .linkedin, .medium, .mastodon, .slack { fill: #BABABA; } @@ -46,3 +46,8 @@ .mastodon:hover { fill: #3088d4; } + +.slack:hover { + fill: #3088d4; +} + diff --git a/stackbit.yaml b/stackbit.yaml index 7b25b04..cebca08 100644 --- a/stackbit.yaml +++ b/stackbit.yaml @@ -113,6 +113,9 @@ models: - type: string name: mastodon label: Mastodon + - type: string + name: slack + label: Slack - type: string name: background_color_class label: background_color_class