Parcourir la source

Add Slack to social options (#236)

tags/v2.5.5
Jace Browning il y a 5 ans
Parent
révision
37c462b088

+ 1
- 0
exampleSite/config.toml Voir le fichier

@@ -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"

+ 6
- 0
layouts/partials/social-follow.html Voir le fichier

@@ -54,3 +54,9 @@
{{- partial "new-window-icon.html" . -}}
</a>
{{ end }}
{{ with .Param "slack" }}
<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">
{{ partial "svg/slack.svg" (dict "size" $icon_size) }}
{{- partial "new-window-icon.html" . -}}
</a>
{{ end }}

+ 27
- 0
layouts/partials/svg/slack.svg Voir le fichier

@@ -0,0 +1,27 @@
<svg {{ with .size }} height="{{ . }}" {{ end }} style="enable-background:new 0 0 270 270;" version="1.1" viewBox="0 0 270 270" width="{{ .size }}" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<style type="text/css">
.st0{fill:#BABABA;}
</style>
<g>
<g>
<path class="st0" d="M99.4,151.2c0,7.1-5.8,12.9-12.9,12.9s-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h12.9V151.2z"/>
<path class="st0" d="M105.9,151.2c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v32.3c0,7.1-5.8,12.9-12.9,12.9
s-12.9-5.8-12.9-12.9C105.9,183.5,105.9,151.2,105.9,151.2z"/>
</g>
<g>
<path class="st0" d="M118.8,99.4c-7.1,0-12.9-5.8-12.9-12.9s5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v12.9H118.8z"/>
<path class="st0" d="M118.8,105.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9H86.5c-7.1,0-12.9-5.8-12.9-12.9
s5.8-12.9,12.9-12.9C86.5,105.9,118.8,105.9,118.8,105.9z"/>
</g>
<g>
<path class="st0" d="M170.6,118.8c0-7.1,5.8-12.9,12.9-12.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9h-12.9V118.8z"/>
<path class="st0" d="M164.1,118.8c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9V86.5c0-7.1,5.8-12.9,12.9-12.9
c7.1,0,12.9,5.8,12.9,12.9V118.8z"/>
</g>
<g>
<path class="st0" d="M151.2,170.6c7.1,0,12.9,5.8,12.9,12.9c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9v-12.9H151.2z"/>
<path class="st0" d="M151.2,164.1c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h32.3c7.1,0,12.9,5.8,12.9,12.9
c0,7.1-5.8,12.9-12.9,12.9H151.2z"/>
</g>
</g>
</svg>

+ 6
- 1
src/css/_social-icons.css Voir le fichier

@@ -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;
}


+ 3
- 0
stackbit.yaml Voir le fichier

@@ -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

Chargement…
Annuler
Enregistrer