From f5b5ae55d90e90516e2e630e5b311365ab5d6e48 Mon Sep 17 00:00:00 2001 From: kendo5731 Date: Thu, 4 Feb 2016 22:59:25 +0100 Subject: [PATCH] feat(): add support for Twitter and Facebook share buttons --- README.md | 1 - layouts/_default/single.html | 1 + layouts/partials/share.html | 21 +++++++++++++++++++++ static/css/theme.scss | 4 ++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/share.html diff --git a/README.md b/README.md index 99f3f98..beae103 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ A theme for [Hugo](https://gohugo.io/), inspired by Atom editor. This repo is a work in progress, there is still work to do, contributions are welcome ! -- Support Twitter and Facebook share buttons - Support pagination in list layout - Support "dynamic" titles and descriptions - Uglify CSS and Javascript diff --git a/layouts/_default/single.html b/layouts/_default/single.html index beb77f2..bdb873a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,7 @@ {{ partial "top.html" . }}

{{ .Title }}

PubliƩ le {{ dateFormat "01-02-2006 15:04:05" .Date }}

+{{ partial "share.html" . }}
{{ .Content }}
diff --git a/layouts/partials/share.html b/layouts/partials/share.html new file mode 100644 index 0000000..3ff6b42 --- /dev/null +++ b/layouts/partials/share.html @@ -0,0 +1,21 @@ + + + + +
+
+ diff --git a/static/css/theme.scss b/static/css/theme.scss index 9d55c14..9c34a19 100644 --- a/static/css/theme.scss +++ b/static/css/theme.scss @@ -135,3 +135,7 @@ a { height: 100%; } } + +.fb-share-button iframe { + margin-top: -5px; +}