fix(widgets): restore article list rendering and reference styles
This commit is contained in:
1 parent
4ea00f1322
commit
fc04bf65e6
18 files changed
+345
-97
No files matched your search
@@ -47,13 +47,11 @@ final class ContentRenderer {
|
||||
if ($segment !== '') {
|
||||
$attrs .= ' data-segment="' . esc_attr($segment) . '"';
|
||||
}
|
||||
$loader = '<div class="post_ajax_loader" role="status" aria-label="' . esc_attr__('正在加载', 'aksrt') . '">' . self::placeholder($instance) . '</div>';
|
||||
if (($instance['load_mode'] ?? '') === 'ajax') {
|
||||
// The runtime (lazysizes + lazyload-action) reveals this container
|
||||
// and clicks the single .ias-btn trigger; frontend.js then loads
|
||||
// the first page through the REST client.
|
||||
$trigger = '<span class="hide aksrt-ias-trigger"><a class="ias-btn" no-scroll="true" href="javascript:void(0)" data-widget-ias="1" data-next-page="1" aria-hidden="true" tabindex="-1"></a></span>';
|
||||
return '<div class="widget-ajaxpager lazyload" lazyload-action="ias"' . $attrs . ' aria-live="polite" aria-busy="true">' . $trigger . $loader . '</div>';
|
||||
$lazy = ($instance['load_mode'] ?? '') === 'ajax';
|
||||
$loader = '<div class="post_ajax_loader' . ($lazy ? ' is-loading' : '') . '" role="status" aria-label="' . esc_attr__('正在加载', 'aksrt') . '">' . self::placeholder($instance) . '</div>';
|
||||
if ($lazy) {
|
||||
// lazySizes reveals the pager; the widget client owns its request.
|
||||
return '<div class="widget-ajaxpager lazyload" data-widget-lazy' . $attrs . ' aria-live="polite" aria-busy="true">' . $loader . '</div>';
|
||||
}
|
||||
$payload = PostRenderer::payload($instance, $slug, $page, $segment);
|
||||
// The loader must live inside the pager: the REST client in frontend.js
|
||||
|
||||
Reference in new issue
Block a user