1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-06-28 16:48:00 +02:00

remove socialite, use static tweet button

This commit is contained in:
Matthias Kretschmann 2014-07-03 18:53:39 +02:00
parent 7b6f9bf812
commit 29132bc1e5
7 changed files with 87 additions and 85 deletions

View File

@ -111,7 +111,6 @@ module.exports = function(grunt){
'bower_components/masonry/index.js',
'bower_components/imagesloaded/imagesloaded.js',
'bower_components/simpleJekyllSearch/index.js',
'bower_components/socialite/index.js',
'bower_components/jquery.adaptive-background/index.js',
'<%= config.src %>/<%= config.assets.js %>/app.js'
]

View File

@ -2,6 +2,6 @@
<aside class="comments">
<p>You should tweet this post</p>
<p class="btn-wrap"><a class="btn socialite twitter-share icon-twitter" data-via="kremalicious" data-related="kremaliciouscom,ezeep" href="https://twitter.com/share">Tweet</a></p>
<p class="btn-wrap"><a class="btn twitter-share icon-twitter" target="_blank" href="https://twitter.com/intent/tweet?url={{ site.url | cgi_escape }}{{ page.url | cgi_escape }}&text={{ page.title | cgi_escape }}&via=kremalicious&related=kremaliciouscom,ezeep">Tweet</a></p>
</aside>

View File

@ -3,13 +3,13 @@ $(ASAP = function(){
siteNavigation.init();
siteEffects.init();
infiniteScroll.init();
});
$(window).load( AfterLoad = function() {
photoGrid.init();
infiniteScroll.init();
});
@ -165,18 +165,10 @@ var siteEffects = {
$(document).scrollTop($('#main').offset().top);
},
socialiteButtons: function() {
$('.comments').one('mouseenter', function() {
Socialite.load($(this)[0]);
});
},
init: function(){
if ( $('.page-single .format-photo').length > 0 ) {
this.adaptiveBackground();
}
this.socialiteButtons();
}
}

View File

@ -92,32 +92,46 @@ a.btn-primary:visited {
}
// Socialite.js
// replicate social buttons, but dim everything
.btn.socialite {
font: normal normal normal 11px/18px 'Helvetica Neue',Arial,sans-serif;
text-align: left;
color: #676767;
text-transform: none;
font-weight: bold;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
height: 21px;
max-width: 100%;
position: relative;
background-color: rgba(255,255,255,.4);
#gradient > .vertical(rgba(255,255,255,0.7); 0%; rgba(255,255,255,0); 100%);
border: 1px solid #dcdcdc;
border-radius: 3px;
//
// Tweet button
//
.btn.twitter-share {
display: inline-block;
padding: 1px 3px 0 3px;
height: 21px;
border: 1px solid #ccc;
border-radius: 3px;
font: bold 11px/17px Helvetica, Arial, sans-serif;
text-align: left;
color: #333;
text-transform: none;
text-decoration: none;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
background-color: #f8f8f8;
#gradient > .vertical(#fff; 0%; #dedede; 100%);
vertical-align: top;
padding: 1px 5px;
.box-shadow(none);
&:hover,
&:focus,
&:active {
border-color: #bbb;
background-color: #d9d9d9;
#gradient > .vertical(#f8f8f8; 0%; #d9d9d9; 100%);
}
&:active {
top: 0;
background-color: #efefef;
box-shadow: inset 0 3px 5px rgba(0,0,0,0.1);
}
// icon
&:before {
font-size: 15px;
margin-right: 2px;
top: 1px
top: 1px;
color: #0089cb;
}
}

View File

@ -1,11 +1,10 @@
.comments {
.clearfix;
&:extend(.clearfix all, .textcenter);
font-size: @font-size-small;
font-style: italic;
color: @text-color-dimmed;
margin-top: @line-height-computed*2;
text-align: center;
.border-radius;
p,
@ -15,5 +14,4 @@
margin-top: @line-height-computed/2;
height: 27px
}
.btn { left: -20px }
}

View File

@ -76,7 +76,7 @@ a:active {
.transition(none);
top: 1px;
background: @link-color;
color: #fff !important;
color: #fff;
text-shadow: none;
}

View File

@ -15,7 +15,6 @@
"imagesloaded": ">=3.1.0",
"infinitescroll": "https://raw.github.com/paulirish/infinite-scroll/master/jquery.infinitescroll.js",
"simpleJekyllSearch": "https://raw.github.com/christian-fei/Simple-Jekyll-Search/master/jekyll-search.jquery.js",
"socialite": "https://raw.github.com/tmort/Socialite/master/socialite.js",
"jquery.adaptive-background": "https://raw.github.com/briangonzalez/jquery.adaptive-backgrounds.js/master/src/jquery.adaptive-backgrounds.js"
},
"ignore": [