Add share links at bottom of page

This commit is contained in:
Alexis Tacnet
2017-05-05 18:29:03 +02:00
parent f58f9b969e
commit 61fa3f81e7
12 changed files with 101 additions and 0 deletions

View File

@@ -58,4 +58,8 @@ section.main .content .markdown pre, section.main .content .markdown pre code {
.hljs-built_in, .hljs-bullet, .hljs-code, .hljs-addition {
color: {{ .Param "colors.type" }};
}
.ssk {
background-color: {{ .Param "colors.trivial" }};
}

View File

@@ -648,6 +648,29 @@ section.main .content .navigation a {
font-style: italic;
color: #313537;
}
section.main .content .share, section.main .content .share div {
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox;
display: -ms-flex;
display: flex;
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
align-items: center;
justify-content: center;
}
section.main .content .share {
background-color: rgba(152, 152, 152, 0.07);
padding: 1em 0;
}
section.main .content .share a {
margin: 0 6px;
}
/* Fonts */

File diff suppressed because one or more lines are too long

View File

@@ -18,6 +18,10 @@
<script src="{{ .Site.BaseURL }}js/progressively.min.js" defer></script>
{{ end }}
{{ if .Site.Params.share }}
<script src="{{ .Site.BaseURL }}js/social-share-kit.min.js" defer></script>
{{ end }}
{{ template "_internal/google_analytics_async.html" . }}
<script>
@@ -28,5 +32,11 @@
{{ if .Site.Params.progressively }}
progressively.init({delay: 30, throttle: 50});
{{ end }}
{{ if .Site.Params.share }}
SocialShareKit.init({
url: '{{ .Permalink }}',
text: '{{ .Title }}'
});
{{ end }}
};
</script>

View File

@@ -28,6 +28,12 @@
</style>
{{ end }}
{{ if .Site.Params.share }}
<style type="text/css" media="screen">
{{ partial "css/social-share-kit.css" . | safeCSS }}
</style>
{{ end }}
{{ if .Site.Params.colors }}
<style type="text/css" media="screen">
{{ partial "css/colors.css" . | safeCSS }}