Skip to content
Browse files

Social Media Share Buttons & minor usability fix

  • Loading branch information...
1 parent bf4516c commit 98bd58c943870d275cbb32d5dda36cf6648d0bfc @kingsidharth committed Apr 1, 2012
Showing with 46 additions and 2 deletions.
  1. +3 −0 lib/tm.php
  2. +17 −0 lib/tm_functions.php
  3. +13 −1 style.css
  4. +13 −1 style.css.sass
View
3 lib/tm.php
@@ -23,6 +23,9 @@ function actions() {
## Navigation
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
+ #Content
+ add_action('thesis_hook_after_post','social_share');
+
#Footer
remove_action('thesis_hook_footer', 'thesis_attribution'); #Remove thesis attribution
add_action('thesis_hook_footer', 'footer_attrb_cp'); #Add attribution and Copyright
View
17 lib/tm_functions.php
@@ -38,3 +38,20 @@ function footer_attrb_cp() {
echo '<p id="copyright"> &copy; 2010 - ' . date("Y") . '&nbsp;' . get_bloginfo('name') . '. All words are belong to me.</p>';
echo '<p id="attrb"> <a href="http://www.kingsidharth.com/ks1203">ks1203</a> for <a href="http://wordpress.org">WordPress</a> & <a href="http://www.64notes.com/thesis" rel="nofollow">Thesis</a>.';
}
+
+function social_share(){
+ if(is_single()) { ?>
+<ul class="social_share">
+ <li class="fb">
+ <div data-href="<?php the_permalink(); ?>" class="fb-like" data-send="true" data-layout="button_count"></div>
+ </li><!-- fb -->
+ <li class="tweet">
+ <a data-url="<?php the_permalink(); ?>" class="twitter-share-button" data-count="horizontal"
+ data-via="kingsidharth" data-related="kingsidharth">Tweet This</a>
+ </li><!-- tweet -->
+ <li class="gplus">
+ <div data-href="<?php the_permalink(); ?>" class="g-plusone" data-size="medium"></div>
+ </li><!-- gplus -->
+</ul><!-- social_share -->
+<?php } }
+
View
14 style.css
@@ -6,7 +6,7 @@
* Version: 1.0
* Template: thesis_184 */
.custom {
- background: url("images/background.jpg") top left repeat;
+ background: url("images/background.jpg") #333333 top left repeat;
background-attachment: fixed;
font-family: "Lucida Grande", "Lucida Sans", sans-serif; }
.custom .page {
@@ -58,6 +58,18 @@
width: 100%;
margin-bottom: 1em;
padding-bottom: 1em; }
+#content_box .social_share {
+ list-style-type: none;
+ list-style-position: inside;
+ width: 100%;
+ float: left;
+ clear: both;
+ margin: 0;
+ padding: 0; }
+ #content_box .social_share li {
+ display: block;
+ float: left;
+ margin-right: 0.5em; }
/* Sidebars */
#sidebar_1 {
View
14 style.css.sass
@@ -19,7 +19,7 @@ $dgrey : #CCC
font-family: 'Lucida Grande', 'Lucida Sans', sans-serif
.custom
- background: url('images/background.jpg') top left repeat
+ background: url('images/background.jpg') $black top left repeat
background-attachment: fixed
+sans
.page
@@ -72,6 +72,18 @@ $dgrey : #CCC
width: 100%
margin-bottom: 1em
padding-bottom: 1em
+ .social_share
+ list-style-type: none
+ list-style-position: inside
+ width: 100%
+ float: left
+ clear: both
+ margin: 0
+ padding: 0
+ li
+ display: block
+ float: left
+ margin-right: 0.5em
/* Sidebars
#sidebar_1

0 comments on commit 98bd58c

Please sign in to comment.
Something went wrong with that request. Please try again.