Sharethis, related items
authorLaury GvR <laury@gaslightmedia.com>
Tue, 29 Mar 2016 22:44:09 +0000 (18:44 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 29 Mar 2016 22:44:09 +0000 (18:44 -0400)
assets/share-icon.png [new file with mode: 0644]
css/app.css
footer.php
functions.php
header.php
scss/_plugins.scss
scss/plugins/_sharethis.scss [new file with mode: 0644]
scss/plugins/_woocommerce.scss
woocommerce.php

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 bc9128f..a353a5b 100644 (file)
@@ -6527,6 +6527,10 @@ main {
 
 /* End NextGen Gallery */
 /* WooCommerce */
+.woocommerce-wrapper #container {
+  max-width: 700px;
+  margin: 0 auto; }
+
 .woocommerce {
   font-family: Arial;
   /* Sidebar */
@@ -7052,23 +7056,29 @@ main {
     margin: 0 auto;
     text-align: left;
     width: 80%; }
-  .woocommerce .main.woo-single-product #content .type-product .images {
-    width: 40%; }
-    .woocommerce .main.woo-single-product #content .type-product .images img {
-      border: 1px solid lightgrey;
-      border-radius: 2px; }
-    .woocommerce .main.woo-single-product #content .type-product .images #wpb_wiz_img_id {
-      height: 180px; }
-    .woocommerce .main.woo-single-product #content .type-product .images .wp-post-image {
-      height: 180px; }
-  .woocommerce .main.woo-single-product #content .type-product .summary.entry-summary {
-    width: 60%; }
-  .woocommerce .main.woo-single-product #content .thumbnails > a {
-    /*        width: 21%;
+  .woocommerce .main.woo-single-product #content {
+    /* Related products */
+    /* End Related products */ }
+    .woocommerce .main.woo-single-product #content .type-product .images {
+      width: 40%; }
+      @media only screen and (max-width: 40em) {
+        .woocommerce .main.woo-single-product #content .type-product .images {
+          width: 100%; } }
+      .woocommerce .main.woo-single-product #content .type-product .images img {
+        border: 1px solid lightgrey;
+        border-radius: 2px; }
+      .woocommerce .main.woo-single-product #content .type-product .images #wpb_wiz_img_id {
+        height: 180px; }
+      .woocommerce .main.woo-single-product #content .type-product .images .wp-post-image {
+        height: 180px; }
+    .woocommerce .main.woo-single-product #content .type-product .summary.entry-summary {
+      width: 60%; }
+    .woocommerce .main.woo-single-product #content .thumbnails > a {
+      /*        width: 21%;
             float: left;
             margin: 0 0.5%;*/
-    padding: 4px;
-    /*        :first-child {
+      padding: 4px;
+      /*        :first-child {
                 margin-left: 0;
                 padding-left: 0;
             }
@@ -7076,12 +7086,30 @@ main {
                 margin-right: 0;
                 padding-left: 0;
             }*/ }
-    .woocommerce .main.woo-single-product #content .thumbnails > a img {
-      height: 35px; }
-  .woocommerce .main.woo-single-product #content .product.has-default-attributes.has-children > .images {
-    opacity: 1; }
-  .woocommerce .main.woo-single-product #content .entry-summary .product_title {
-    margin-bottom: 10px; }
+      .woocommerce .main.woo-single-product #content .thumbnails > a img {
+        height: 35px; }
+    .woocommerce .main.woo-single-product #content .product.has-default-attributes.has-children > .images {
+      opacity: 1; }
+    .woocommerce .main.woo-single-product #content .entry-summary .product_title {
+      margin-bottom: 10px; }
+    .woocommerce .main.woo-single-product #content .related ul.products li.product:last-child, .woocommerce .main.woo-single-product #content .related ul.products li.product {
+      width: 33.33%;
+      float: left;
+      clear: none;
+      padding: 10px;
+      margin: 0;
+      height: 400px; }
+      @media only screen and (max-width: 40em) {
+        .woocommerce .main.woo-single-product #content .related ul.products li.product:last-child, .woocommerce .main.woo-single-product #content .related ul.products li.product {
+          width: 50%; } }
+      .woocommerce .main.woo-single-product #content .related ul.products li.product:last-child img, .woocommerce .main.woo-single-product #content .related ul.products li.product img {
+        height: 150px; }
+      .woocommerce .main.woo-single-product #content .related ul.products li.product:last-child [itemprop="description"], .woocommerce .main.woo-single-product #content .related ul.products li.product [itemprop="description"] {
+        display: none; }
+      .woocommerce .main.woo-single-product #content .related ul.products li.product:last-child .price span.amount, .woocommerce .main.woo-single-product #content .related ul.products li.product .price span.amount {
+        font-size: 22px; }
+      .woocommerce .main.woo-single-product #content .related ul.products li.product:last-child .price > *, .woocommerce .main.woo-single-product #content .related ul.products li.product .price > * {
+        height: 20px; }
   .woocommerce #content ul.products li.product-category.product {
     width: 33.33%;
     float: left;
@@ -7210,6 +7238,16 @@ main {
 #cart-login a:hover {
   color: #0f789f; }
 
+.woocommerce .st_sharethis {
+  float: right;
+  width: 58px; }
+.woocommerce .stButton .sharethis {
+  background-image: url("../assets/share-icon.png") !important;
+  width: 52px;
+  height: 22px; }
+.woocommerce .stButton .chicklets {
+  height: 22px; }
+
 .home-feed-post {
   padding-bottom: 25px; }
   @media only screen and (max-width: 40em) {
index b8795ad..d39f127 100644 (file)
@@ -20,4 +20,7 @@
       </div><!--End of off-canvas-->
   <?php wp_footer();?>
   </body>
+    <script charset="utf-8" type="text/javascript">var switchTo5x=true;</script>
+    <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>
 </html>
index c9397b5..832678f 100644 (file)
@@ -148,7 +148,7 @@ add_action('woocommerce_after_shop_loop_item_title','woocommerce_template_single
 // Declare WooCommerce support
 add_action( 'after_setup_theme', 'woocommerce_support' );
 function woocommerce_support() {
-add_theme_support( 'woocommerce' );
+    add_theme_support( 'woocommerce' );
 }
 // WooCommerce number of products shown
 add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 );
index 4a40fcd..fbe9286 100644 (file)
       <div class="off-canvas-wrap" data-offcanvas>
         <div class="inner-wrap">
             <div id="page-wrapper">
-                    <header>
-                        <div id="top-line">
-                            <div class="row medium-uncollapse large-collapse">
-                                <div id="cart-login" class="small-12 medium-5 large-3 columns right">
-                                    <div id="woo-quick-cart-image">
-                                        <a href="<?php global $woocommerce;echo $woocommerce->cart->get_cart_url();?>">
-                                            <img src="<?php echo get_template_directory_uri(); ?>/assets/shopping-cart.png">
-                                        </a>
+                <header>
+                    <div id="top-line">
+                        <div class="row medium-uncollapse large-collapse">
+                            <div id="cart-login" class="small-12 medium-5 large-3 columns right">
+                                <div id="woo-quick-cart-image">
+                                    <a href="<?php global $woocommerce;echo $woocommerce->cart->get_cart_url();?>">
+                                        <img src="<?php echo get_template_directory_uri(); ?>/assets/shopping-cart.png">
+                                    </a>
 
-                                    </div>
-                                    <div>
-                                        <a href="<?php echo $woocommerce->cart->get_cart_url();?>"><span>View Cart</span></a> |
-                                    </div>
-                                    <div id="woo-quick-checkout">
-                                    <?php if ( is_user_logged_in() ) { ?>
-                                            <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><?php _e('My Account','woothemes'); ?></a>
-                                            | <a href="<?php echo wp_logout_url()?>">Log Out</a>
-                                     <?php } 
-                                     else { ?>
-                                            <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('Login / Register','woothemes'); ?>"><?php _e('Login / Register','woothemes'); ?></a>
-                                     <?php } ?>
-                                    </div>
                                 </div>
-                                <div class="large-4 columns show-for-large-up">
-                                    <h6>888-676-Lama</h6>
+                                <div>
+                                    <a href="<?php echo $woocommerce->cart->get_cart_url();?>"><span>View Cart</span></a> |
+                                </div>
+                                <div id="woo-quick-checkout">
+                                <?php if ( is_user_logged_in() ) { ?>
+                                        <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><?php _e('My Account','woothemes'); ?></a>
+                                        | <a href="<?php echo wp_logout_url()?>">Log Out</a>
+                                 <?php } 
+                                 else { ?>
+                                        <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('Login / Register','woothemes'); ?>"><?php _e('Login / Register','woothemes'); ?></a>
+                                 <?php } ?>
                                 </div>
                             </div>
-                        </div>
-                        
-                        <div class="row medium-uncollapse large-collapse">
-                            <div class="small-12 small-text-center large-text-left large-4 columns">
-                                <a id="logo" href="<?php bloginfo('url');?>"><img alt="Jolly Lama logo" src="<?php bloginfo('template_url');?>/assets/jolly-lama-logo.jpg"></a>
-                            </div>
-                            <div class="small-12 large-7 columns right">
-                                <?php get_template_part('parts/top-bar');?>
+                            <div class="large-4 columns show-for-large-up">
+                                <h6>888-676-Lama</h6>
                             </div>
                         </div>
-                    </header>
-                    <?php get_template_part('parts/off-canvas-menu');?>
+                    </div>
+
+                    <div class="row medium-uncollapse large-collapse">
+                        <div class="small-12 small-text-center large-text-left large-4 columns">
+                            <a id="logo" href="<?php bloginfo('url');?>"><img alt="Jolly Lama logo" src="<?php bloginfo('template_url');?>/assets/jolly-lama-logo.jpg"></a>
+                        </div>
+                        <div class="small-12 large-7 right">
+                            <?php get_template_part('parts/top-bar');?>
+                        </div>
+                    </div>
+                </header>
+                <?php get_template_part('parts/off-canvas-menu');?>
index 69b253a..7312ea8 100644 (file)
@@ -1,2 +1,3 @@
   @import "plugins/nextgen";
-  @import "plugins/woocommerce";
\ No newline at end of file
+  @import "plugins/woocommerce";
+  @import "plugins/sharethis";
\ No newline at end of file
diff --git a/scss/plugins/_sharethis.scss b/scss/plugins/_sharethis.scss
new file mode 100644 (file)
index 0000000..ca74b36
--- /dev/null
@@ -0,0 +1,14 @@
+.woocommerce {    
+    .st_sharethis {
+        float: right;
+        width: 58px;
+    }
+    .stButton .sharethis {
+      background-image: url("../assets/share-icon.png") !important;
+      width: 52px;
+      height: 22px;
+    }
+    .stButton .chicklets {
+        height: 22px;
+    }
+}
\ No newline at end of file
index d65768c..b182894 100644 (file)
@@ -1,5 +1,9 @@
 
 /* WooCommerce */
+.woocommerce-wrapper #container {
+    max-width: 700px;
+    margin: 0 auto;
+}
 .woocommerce {
     font-family: Arial;
     ul, ol, li {
         .type-product {
             .images {
                 width: 40%;
+                @media #{$small-only} {
+                    width: 100%;
+                }
                 img {
                     border: 1px solid lightgrey;
                     border-radius: 2px;
         .entry-summary .product_title {
             margin-bottom: 10px;
         }
+            /* Related products */
+        .related ul.products li.product:last-child,
+        .related ul.products li.product {
+            width: 33.33%;
+            @media #{$small-only} {
+                width: 50%;
+            }
+            float: left;
+            clear: none;
+            padding: 10px;
+            margin: 0;
+            height: 400px;
+            img {
+                height: 150px;
+            }
+            [itemprop="description"] {
+                display: none;
+            }
+            .price span.amount {
+                font-size: 22px;
+            }
+            .price > * {
+                height: 20px;
+            }
+        }
+        /* End Related products */
     }
     /* End product detail page */
 
index 61467bc..aeeace9 100644 (file)
@@ -1,13 +1,13 @@
 <?php get_header(); ?>
 <main class="page-inside woocommerce">
+    
     <div id="content-wrapper" class='side-shadow woocommerce-wrapper'>
-         
         <div class="row">
             <div class="large-3 columns show-for-large-up">
                 <?php get_sidebar(); ?>
             </div>
             <?php if (is_shop()) { ?>
-                <div class="small-12 medium-9 columns main woo-tags">
+                <div class="small-12 large-9 columns main woo-tags">
   
                 <?php
                         /**
@@ -37,7 +37,7 @@
                 ?>
                 </div>
             <?php } if (is_product_tag() || is_product_category()) { ?>
-                <div class="small-12 medium-9 columns main woo-tags">
+                <div class="small-12 large-9 columns main woo-tags">
   
                 <?php
                         /**
                 ?>
                 </div>
             <?php } else if (is_product()) { ?>
-                <div class="small-12 medium-9 columns main woo-single-product">
+                <div class="small-12 large-9 columns main woo-single-product">
+                    <?php 
+                        echo '<span class="st_sharethis" st_title="'. get_the_title().'" st_url="'. get_the_permalink() .'"></span>';       
+                        if(function_exists('pf_show_link')){echo pf_show_link();} 
+                    ?>
                     <?php
                             /**
                              * woocommerce_before_main_content hook