Add shareThis functionality
authorLaury GvR <laury@gaslightmedia.com>
Thu, 3 Mar 2016 20:46:29 +0000 (15:46 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 3 Mar 2016 20:46:29 +0000 (15:46 -0500)
assets/share-icon.png [new file with mode: 0644]
css/app.css
footer.php
page.php
parts/bread-crumbs.php [new file with mode: 0644]
scss/_plugins.scss [new file with mode: 0644]
scss/app.scss
scss/plugins/_sharethis.scss [new file with mode: 0644]

diff --git a/assets/share-icon.png b/assets/share-icon.png
new file mode 100644 (file)
index 0000000..6df905d
Binary files /dev/null and b/assets/share-icon.png differ
index 11495b2..a616b21 100755 (executable)
@@ -6816,4 +6816,18 @@ a[href^=tel] {
   color: inherit;
   text-decoration: none; }
 
-/* */
\ No newline at end of file
+/* */
+.st_sharethis {
+  float: right;
+  margin-top: 10px;
+  width: 58px; }
+  .st_sharethis .stButton .chicklets {
+    height: 21px; }
+
+.stButton .sharethis {
+  background-image: url("../assets/share-icon.png") !important;
+  width: 52px;
+  height: 22px; }
+
+.breadcrumbs {
+  padding-right: 20px; }
index 7805614..60859f7 100755 (executable)
@@ -37,6 +37,8 @@
 
     </body>
     <?php wp_footer();?>
+    <script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
+    <script charset="utf-8" type="text/javascript">stLight.options({"publisher":"wp.c3d3647e-de70-4780-b71d-6b739fad685a"});var st_type="wordpress4.4.1";</script>
     <script>
         jQuery(document).ready(function(){
             jQuery(".top-bar > section > ul > li > a").attr('href','#');
index a46cc01..de21cc7 100755 (executable)
--- a/page.php
+++ b/page.php
     <div class="small-12 medium-9 main-content columns">
         <div class="row">
             <div class="small-12 medium-11 medium-push-1 left columns">
-                <?php
-                if(function_exists('bcn_display') && !is_front_page()) {
-                    echo "<div class=\"breadcrumbs\">";
-                    bcn_display();
-                    echo "</div>";
-                }
-                ?>
+                <?php get_template_part('parts/bread-crumbs');?>
             </div>
         </div>
         <div class="row editor-content">
diff --git a/parts/bread-crumbs.php b/parts/bread-crumbs.php
new file mode 100644 (file)
index 0000000..191d091
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+echo '<span class="st_sharethis" st_title="'. get_the_title().'" st_url="'. get_the_permalink() .'"></span>';
+if(function_exists('bcn_display') && !is_front_page()) {
+    echo "<div class=\"breadcrumbs\">";
+    bcn_display();
+    echo "</div>";
+}
+?>
\ No newline at end of file
diff --git a/scss/_plugins.scss b/scss/_plugins.scss
new file mode 100644 (file)
index 0000000..d8d947e
--- /dev/null
@@ -0,0 +1 @@
+@import "plugins/sharethis";
\ No newline at end of file
index 82bea11..7785ca9 100755 (executable)
@@ -5,6 +5,7 @@
 @import "foundation";
 @import "wordpress";
 @import "structure";
+@import "plugins";
 
 // Or selectively include components
 // @import
diff --git a/scss/plugins/_sharethis.scss b/scss/plugins/_sharethis.scss
new file mode 100644 (file)
index 0000000..21e65f7
--- /dev/null
@@ -0,0 +1,16 @@
+.st_sharethis {
+    float: right;
+    margin-top: 10px;
+    width: 58px;
+    .stButton .chicklets {
+        height: 21px;
+    }
+}
+.stButton .sharethis {
+  background-image: url("../assets/share-icon.png") !important;
+  width: 52px;
+  height: 22px;
+}
+.breadcrumbs {
+    padding-right: 20px;
+}
\ No newline at end of file