mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 11:46:41 +02:00
Add share links at bottom of page
This commit is contained in:
@@ -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" }};
|
||||
}
|
@@ -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 */
|
||||
|
||||
|
7
layouts/partials/css/social-share-kit.css
Normal file
7
layouts/partials/css/social-share-kit.css
Normal file
File diff suppressed because one or more lines are too long
@@ -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>
|
||||
|
@@ -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 }}
|
||||
|
Reference in New Issue
Block a user