feat(frontend): replace lazy loading with zibll lazysizes
This commit is contained in:
@@ -494,15 +494,13 @@ if (!function_exists('aksrt_render_related_graphic_card')) :
|
||||
$views = function_exists('aksrt_get_post_views') ? (int) aksrt_get_post_views($post->ID) : 0;
|
||||
$views_label = function_exists('aksrt_format_number') ? aksrt_format_number($views) : number_format_i18n($views);
|
||||
|
||||
$img_attrs = function_exists('aksrt_lazy_img_attrs')
|
||||
? aksrt_lazy_img_attrs($thumb, 'cover', 'fit-cover')
|
||||
: 'class="fit-cover" src="' . esc_url($thumb) . '" loading="lazy"';
|
||||
$img_attrs = aksrt_get_lazy_attr('lazy_cover', (string) $thumb, 'fit-cover', aksrt_get_lazy_thumb('lg'));
|
||||
|
||||
$html = '<div class="swiper-slide mr10">';
|
||||
$html .= '<div class="graphic style-3 mb10">';
|
||||
$html .= '<a href="' . esc_url((string) $url) . '" class="radius8" title="' . esc_attr($title) . '">';
|
||||
$html .= '<div class="graphic-img" style="padding-bottom:70%">';
|
||||
$html .= '<img ' . $img_attrs . ' alt="' . esc_attr($title) . '">';
|
||||
$html .= '<img' . $img_attrs . ' alt="' . esc_attr($title) . '">';
|
||||
$html .= '<div class="abs-center left-bottom graphic-text">';
|
||||
$html .= '<div class="text1 text-ellipsis">' . esc_html($title) . '</div>';
|
||||
$html .= '<div class="text3 muted-2-color em09"><span class="item">' . esc_html($time) . '</span>';
|
||||
|
||||
Reference in New Issue
Block a user