feat(frontend): replace lazy loading with zibll lazysizes

This commit is contained in:
2026-08-18 01:33:38 +08:00
parent 02571eecd6
commit 435ee1daa7
78 changed files with 1515 additions and 909 deletions
-24
View File
@@ -342,30 +342,6 @@ if (!function_exists('aksrt_renderer_resolve_images')) {
}
}
if (!function_exists('aksrt_renderer_lazyload_config')) {
/**
* Small lazyload config subset for post cards.
*
* @return array<string,mixed>
*/
function aksrt_renderer_lazyload_config(): array {
if (class_exists('\AKSRT\Settings\Settings')) {
$lazy = \AKSRT\Settings\Settings::get_lazyload_config();
return [
'enabled' => !empty($lazy['enabled']) && !empty($lazy['posts_thumb_enabled']),
'placeholder_url' => (string) ($lazy['placeholder_url'] ?? ''),
'blur' => !empty($lazy['blur']),
];
}
return [
'enabled' => false,
'placeholder_url' => '',
'blur' => false,
];
}
}
if (!function_exists('aksrt_renderer_thumb_ratio_value')) {
/**
* Convert ratio tokens like 4:3 to CSS aspect ratio values.