mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 17:41:43 -05:00
added sharrre and pageslide
This commit is contained in:
parent
887fdbc206
commit
65de7772b0
6 changed files with 59 additions and 1 deletions
|
@ -8,3 +8,35 @@ MyVotes = new Meteor.Collection('myvotes');
|
|||
Meteor.subscribe('myvotes');
|
||||
|
||||
Session.set('state', 'list');
|
||||
|
||||
|
||||
|
||||
if (Meteor.is_client) {
|
||||
Meteor.startup(function () {
|
||||
$(document).ready(function (){
|
||||
console.log($('#mobile-menu'));
|
||||
$('#mobile-menu').pageslide({
|
||||
iframe: false
|
||||
});
|
||||
|
||||
if($(window).width()>400){ //do not load social media plugin on mobile
|
||||
console.log($('.share-replace'));
|
||||
$('.share-replace').sharrre({
|
||||
share: {
|
||||
googlePlus: true,
|
||||
facebook: true,
|
||||
twitter: true,
|
||||
},
|
||||
buttons: {
|
||||
googlePlus: {size: 'tall'},
|
||||
facebook: {layout: 'box_count'},
|
||||
twitter: {count: 'vertical'},
|
||||
},
|
||||
enableHover: false,
|
||||
enableCounter: false,
|
||||
enableTracking: true
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
11
client/js/jquery.pageslide.min.js
vendored
Normal file
11
client/js/jquery.pageslide.min.js
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* jQuery pageSlide
|
||||
* Version 2.0
|
||||
* http://srobbin.com/jquery-pageslide/
|
||||
*
|
||||
* jQuery Javascript plugin which slides a webpage over to reveal an additional interaction pane.
|
||||
*
|
||||
* Copyright (c) 2011 Scott Robbin (srobbin.com)
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
*/
|
||||
;(function(b){function j(e,a){if(0===e.indexOf("#"))b(e).clone(!0).appendTo(c.empty()).show();else{if(a){var d=b("<iframe />").attr({src:e,frameborder:0,hspace:0}).css({width:"100%",height:"100%"});c.html(d)}else c.load(e);c.data("localEl",!1)}}function k(b,a){var d=c.outerWidth(!0),f={},g={};if(!c.is(":visible")&&!h){h=!0;switch(b){case "left":c.css({left:"auto",right:"-"+d+"px"});f["margin-left"]="-="+d;g.right="+="+d;break;default:c.css({left:"-"+d+"px",right:"auto"}),f["margin-left"]="+="+d,g.left="+="+d}l.animate(f,a);c.show().animate(g,a,function(){h=!1})}}var l=b("body"),c=b("#pageslide"),h=!1,m;0==c.length&&(c=b("<div />").attr("id","pageslide").css("display","none").appendTo(b("body")));b.fn.pageslide=function(e){this.click(function(a){var d=b(this),f=b.extend({href:d.attr("href")},e);a.preventDefault();a.stopPropagation();c.is(":visible")&&d[0]==m?b.pageslide.close():(b.pageslide(f),m=d[0])})};b.fn.pageslide.defaults={speed:200,direction:"right",modal:!1,iframe:!0,href:null};b.pageslide=function(e){var a=b.extend({},b.fn.pageslide.defaults,e);c.is(":visible")&&c.data("direction")!=a.direction?b.pageslide.close(function(){j(a.href,a.iframe);k(a.direction,a.speed)}):(j(a.href,a.iframe),c.is(":hidden")&&k(a.direction,a.speed));c.data(a)};b.pageslide.close=function(c){var a=b("#pageslide"),d=a.outerWidth(!0),f=a.data("speed"),g={},i={};if(!a.is(":hidden")&&!h){h=!0;switch(a.data("direction")){case "left":g["margin-left"]="+="+d;i.right="-="+d;break;default:g["margin-left"]="-="+d,i.left="-="+d}a.animate(i,f);l.animate(g,f,function(){a.hide();h=!1;"undefined"!=typeof c&&c()})}};c.click(function(b){b.stopPropagation()});b(document).bind("click keyup",function(e){"keyup"==e.type&&27!=e.keyCode||c.is(":visible")&&!c.data("modal")&&b.pageslide.close()})})(jQuery);
|
7
client/js/jquery.sharrre-1.3.2.min.js
vendored
Executable file
7
client/js/jquery.sharrre-1.3.2.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
</li>
|
||||
<li class="post-discuss">
|
||||
<a class="discuss-link">
|
||||
<a class="discuss-link" href="#">
|
||||
<i class="icon-comment"></i>
|
||||
<span class="count">{{comments}}</span>
|
||||
<span class="action">Discuss</span>
|
||||
|
|
|
@ -8,6 +8,13 @@ Template.post.events = {
|
|||
, 'click .upvote-link': function(){
|
||||
Meteor.call('voteForPost', this);
|
||||
}
|
||||
|
||||
, 'click .share-link': function(){
|
||||
e.preventDefault();
|
||||
$(".share-link").not($(this)).next().addClass("hidden");
|
||||
$(this).next().toggleClass("hidden");
|
||||
$(".overlay").toggleClass("hidden");
|
||||
}
|
||||
};
|
||||
|
||||
Template.post.rank = function(){
|
||||
|
|
|
@ -6,3 +6,4 @@ Template.posts.posts = function(){
|
|||
var posts = Posts.find({}, {sort: {headline: 1}});
|
||||
return posts;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue