Add blog hover
This commit is contained in:
parent
ba69ec2ffc
commit
3d2b7b44d5
2 changed files with 10 additions and 7 deletions
|
@ -202,6 +202,9 @@
|
||||||
background-image: -webkit-linear-gradient(bottom, gray, lightgray 3%, transparent 8%, transparent 100%);
|
background-image: -webkit-linear-gradient(bottom, gray, lightgray 3%, transparent 8%, transparent 100%);
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
.pre-expand-blog:hover {
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
}
|
||||||
@media (max-width: 799px) {
|
@media (max-width: 799px) {
|
||||||
.left-sidebar-header {
|
.left-sidebar-header {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
@ -20,18 +20,18 @@
|
||||||
if (url === '#') return;
|
if (url === '#') return;
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
});
|
});
|
||||||
$('.blog-description').on('click', function() {
|
$('.blog-box').on('click', function() {
|
||||||
var max_height = $(this).css('max-height');
|
var $description = $(this).children('.blog-description');
|
||||||
|
var max_height = $description.css('max-height');
|
||||||
if (max_height !== 'fit-content') {
|
if (max_height !== 'fit-content') {
|
||||||
$(this).css('max-height', 'fit-content');
|
$description.css('max-height', 'fit-content');
|
||||||
$(this).parent().css('background-image', 'inherit')
|
|
||||||
.css('padding-bottom', '0.5em');
|
|
||||||
$(this).css('cursor', 'auto');
|
$(this).css('cursor', 'auto');
|
||||||
|
$(this).removeClass('pre-expand-blog');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
$('.blog-description').each(function() {
|
$('.blog-box').each(function() {
|
||||||
if ($(this).prop('scrollHeight') > $(this).height() ) {
|
if ($(this).prop('scrollHeight') > $(this).height() ) {
|
||||||
$(this).parent().addClass('pre-expand-blog');
|
$(this).addClass('pre-expand-blog');
|
||||||
$(this).css('cursor', 'pointer');
|
$(this).css('cursor', 'pointer');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue