Skip to content

Commit 37c462b

Browse files
jacebrowningBud Parr
authored andcommitted
Add Slack to social options (#236)
1 parent 15a4540 commit 37c462b

5 files changed

Lines changed: 43 additions & 1 deletion

File tree

exampleSite/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ enableRobotsTXT = true
2727
gitlab = ""
2828
linkedin = ""
2929
mastodon = ""
30+
slack = ""
3031
# choose a background color from any on this page: http://tachyons.io/docs/themes/skins/ and preface it with "bg-"
3132
background_color_class = "bg-black"
3233
featured_image = "/images/gohugo-default-sample-hero-image.jpg"

layouts/partials/social-follow.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,9 @@
5454
{{- partial "new-window-icon.html" . -}}
5555
</a>
5656
{{ end }}
57+
{{ with .Param "slack" }}
58+
<a href="{{ . }}" target="_blank" class="link-transition slack link dib z-999 pt3 pt0-l mr1" title="Slack link" rel="noopener" aria-label="follow on Slack——Opens in a new window">
59+
{{ partial "svg/slack.svg" (dict "size" $icon_size) }}
60+
{{- partial "new-window-icon.html" . -}}
61+
</a>
62+
{{ end }}

layouts/partials/svg/slack.svg

Lines changed: 27 additions & 0 deletions
Loading

src/css/_social-icons.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.facebook, .twitter, .instagram, .youtube, .github, .gitlab, .linkedin, .medium, .mastodon {
1+
.facebook, .twitter, .instagram, .youtube, .github, .gitlab, .linkedin, .medium, .mastodon, .slack {
22
fill: #BABABA;
33
}
44

@@ -46,3 +46,8 @@
4646
.mastodon:hover {
4747
fill: #3088d4;
4848
}
49+
50+
.slack:hover {
51+
fill: #3088d4;
52+
}
53+

stackbit.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ models:
113113
- type: string
114114
name: mastodon
115115
label: Mastodon
116+
- type: string
117+
name: slack
118+
label: Slack
116119
- type: string
117120
name: background_color_class
118121
label: background_color_class

0 commit comments

Comments
 (0)