From bd380760414cfdcf0a2568766adb33816b872ee7 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sun, 15 Oct 2017 17:31:16 +0100 Subject: [PATCH] Added share buttons --- src/css/main.scss | 22 ++++++++++++++++++++++ templates/partials/share.html | 6 ++++++ templates/post.html | 19 ++++++++++++++++++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 templates/partials/share.html diff --git a/src/css/main.scss b/src/css/main.scss index 83ff8e2..39aab3b 100644 --- a/src/css/main.scss +++ b/src/css/main.scss @@ -159,3 +159,25 @@ footer { height: 40px; } } + + +.share { + background: transparent; + border: none; + display: none; + cursor: pointer; + + &.show { + display: initial; + } + + &:hover, &:active { + fill: $link-color; + color: $link-color; + } + + svg { + height: 20px; + vertical-align: bottom; + } +} diff --git a/templates/partials/share.html b/templates/partials/share.html new file mode 100644 index 0000000..b2b8292 --- /dev/null +++ b/templates/partials/share.html @@ -0,0 +1,6 @@ + diff --git a/templates/post.html b/templates/post.html index 2974061..4fd4d0a 100644 --- a/templates/post.html +++ b/templates/post.html @@ -9,7 +9,7 @@

- {{ title }} + {{ title }} {{> share }}

@@ -25,6 +25,9 @@
+
+ {{> share shareText='Share this post'}} +
{{> footer }} @@ -52,5 +55,19 @@ } +