Improved share on responsive
This commit is contained in:
parent
2a44d77153
commit
61d15bba6c
|
@ -468,7 +468,23 @@ blockquote {
|
||||||
.related-posts {
|
.related-posts {
|
||||||
padding: 50px 0 30px; }
|
padding: 50px 0 30px; }
|
||||||
.related-posts .post:last-child {
|
.related-posts .post:last-child {
|
||||||
display: none; } }
|
display: none; }
|
||||||
|
.share {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
bottom: 0;
|
||||||
|
margin: 0;
|
||||||
|
border-top: 1px solid #EAECEF;
|
||||||
|
padding-top: 35px; }
|
||||||
|
.share ul {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: row;
|
||||||
|
margin-left: 10px; }
|
||||||
|
.share ul li {
|
||||||
|
margin-right: 10px; } }
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
.post-content .editor-content h1,
|
.post-content .editor-content h1,
|
||||||
|
|
|
@ -8,6 +8,9 @@ $(document).ready(function ($) {
|
||||||
'content-api-key': '8a13e02a8917186f02014db742',
|
'content-api-key': '8a13e02a8917186f02014db742',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0),
|
||||||
|
h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
||||||
|
|
||||||
if(window.location.origin == 'https://our-status.hauntedthemes.com'){
|
if(window.location.origin == 'https://our-status.hauntedthemes.com'){
|
||||||
config['content-api-host'] = 'https://our-status.hauntedthemes.com';
|
config['content-api-host'] = 'https://our-status.hauntedthemes.com';
|
||||||
config['content-api-key'] = 'c6717eab3d9a3e6be361980f66';
|
config['content-api-key'] = 'c6717eab3d9a3e6be361980f66';
|
||||||
|
@ -38,8 +41,9 @@ $(document).ready(function ($) {
|
||||||
|
|
||||||
function setDemoImages(){
|
function setDemoImages(){
|
||||||
if(window.location.origin == 'https://our-status.hauntedthemes.com'){
|
if(window.location.origin == 'https://our-status.hauntedthemes.com'){
|
||||||
$('#content img, .blog-intro img').each(function (index, element) {
|
$('#content img, #main img, .related-posts img, .blog-intro img').each(function (index, element) {
|
||||||
$(this).attr('src', $(this).attr('src').replace("http://localhost:2368", "https://our.status.im"));
|
$(this).attr('src', "https://our.status.im" + $(this).attr('src'));
|
||||||
|
$(this).attr('src', $(this).attr('src').replace('https://our.status.imhttps://our.status.im', 'https://our.status.im'));
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
$('img').each(function (index, element) {
|
$('img').each(function (index, element) {
|
||||||
|
@ -59,14 +63,6 @@ $(document).ready(function ($) {
|
||||||
|
|
||||||
setGalleryRation();
|
setGalleryRation();
|
||||||
|
|
||||||
// var elem = document.querySelector('.loop-grid');
|
|
||||||
// msnry = new Masonry(elem, {
|
|
||||||
// itemSelector: '.loop-grid .post',
|
|
||||||
// // columnWidth: 340,
|
|
||||||
// percentPosition: true,
|
|
||||||
// gutter: 0,
|
|
||||||
// transitionDuration: 0
|
|
||||||
// });
|
|
||||||
|
|
||||||
var currentPage = 1;
|
var currentPage = 1;
|
||||||
var pathname = window.location.pathname;
|
var pathname = window.location.pathname;
|
||||||
|
@ -102,17 +98,9 @@ $(document).ready(function ($) {
|
||||||
$.get(nextPage, function (content) {
|
$.get(nextPage, function (content) {
|
||||||
step++;
|
step++;
|
||||||
var post = $(content).find('.post');
|
var post = $(content).find('.post');
|
||||||
// post.addClass('invisible');
|
|
||||||
$('#content .loop-grid').append( post );
|
$('#content .loop-grid').append( post );
|
||||||
setDemoImages();
|
setDemoImages();
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
// $.each(post, function(index, val) {
|
|
||||||
// var $this = $(this);
|
|
||||||
// $('#content .loop-grid').imagesLoaded( function() {
|
|
||||||
// msnry.appended( $this );
|
|
||||||
// $this.removeClass('invisible');
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -151,8 +139,27 @@ $(document).ready(function ($) {
|
||||||
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
|
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".share").stick_in_parent({
|
var checkIfSticky = 0;
|
||||||
offset_top: 30
|
if(w >= 992){
|
||||||
|
$(".share").stick_in_parent({
|
||||||
|
offset_top: 30
|
||||||
|
});
|
||||||
|
checkIfSticky = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(window).on('resize', function(event) {
|
||||||
|
w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
||||||
|
if (w < 992) {
|
||||||
|
$(".share").trigger("sticky_kit:detach");
|
||||||
|
checkIfSticky = 0;
|
||||||
|
}else{
|
||||||
|
if (checkIfSticky == 0) {
|
||||||
|
$(".share").stick_in_parent({
|
||||||
|
offset_top: 30
|
||||||
|
});
|
||||||
|
checkIfSticky++;
|
||||||
|
}
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set the right proportion for images inside the gallery
|
// Set the right proportion for images inside the gallery
|
||||||
|
|
|
@ -677,6 +677,25 @@ blockquote{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.share{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
bottom: 0;
|
||||||
|
margin: 0;
|
||||||
|
border-top: 1px solid $lighter-grey;
|
||||||
|
padding-top: 35px;
|
||||||
|
ul{
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: row;
|
||||||
|
margin-left: 10px;
|
||||||
|
li{
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
|
|
Loading…
Reference in New Issue