Add blog hover

This commit is contained in:
cuom1999 2022-06-02 17:29:00 -05:00
parent ba69ec2ffc
commit 3d2b7b44d5
2 changed files with 10 additions and 7 deletions

View file

@ -202,6 +202,9 @@
background-image: -webkit-linear-gradient(bottom, gray, lightgray 3%, transparent 8%, transparent 100%);
padding-bottom: 0;
}
.pre-expand-blog:hover {
background-color: #f3f3f3;
}
@media (max-width: 799px) {
.left-sidebar-header {
display: none;

View file

@ -20,18 +20,18 @@
if (url === '#') return;
window.location.href = url;
});
$('.blog-description').on('click', function() {
var max_height = $(this).css('max-height');
$('.blog-box').on('click', function() {
var $description = $(this).children('.blog-description');
var max_height = $description.css('max-height');
if (max_height !== 'fit-content') {
$(this).css('max-height', 'fit-content');
$(this).parent().css('background-image', 'inherit')
.css('padding-bottom', '0.5em');
$description.css('max-height', 'fit-content');
$(this).css('cursor', 'auto');
$(this).removeClass('pre-expand-blog');
}
})
$('.blog-description').each(function() {
$('.blog-box').each(function() {
if ($(this).prop('scrollHeight') > $(this).height() ) {
$(this).parent().addClass('pre-expand-blog');
$(this).addClass('pre-expand-blog');
$(this).css('cursor', 'pointer');
}
});