diff --git a/assets/css/frontend/widget-batch5.css b/assets/css/frontend/widget-batch5.css index 930abbf3..977feeca 100644 --- a/assets/css/frontend/widget-batch5.css +++ b/assets/css/frontend/widget-batch5.css @@ -2533,3 +2533,22 @@ a.main-color > .icon-cover-card:hover, .aksrt-plate-info .count-mates .em14 { font-weight: 700; line-height: 1.2; } .aksrt-fi[data-aksrt-feature-intro] .aksrt-fi__panel { display: none; } .aksrt-fi[data-aksrt-feature-intro] .aksrt-fi__panel.is-active { display: block; } + + +/* batch43-45 residual */ +.aksrt-product-widget__item--mini { + gap: 10px; padding: 8px 0; + border-bottom: 1px solid var(--color-line, rgba(0,0,0,.06)); +} +.aksrt-product-widget__item--mini:last-child { border-bottom: 0; } +.aksrt-product-widget__thumb.mini { + flex: 0 0 56px; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; + background: var(--surface-2, #f3f4f6); display: block; +} +.aksrt-product-widget__thumb.mini img { width: 100%; height: 100%; object-fit: cover; display: block; } +.aksrt-paid-posts.style-card { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; } +.aksrt-paid-posts.style-list .aksrt-paid-posts__item { margin-bottom: 10px; } +.aksrt-paid-posts__price.badge { + display: inline-block; margin-top: 4px; padding: 1px 6px; border-radius: 4px; + background: rgba(240,68,148,.1); color: var(--theme-color, #f04494); font-size: 12px; +} diff --git a/src/AKSRT/Core/WidgetAjax.php b/src/AKSRT/Core/WidgetAjax.php index febe7a93..1a3cdbf8 100644 --- a/src/AKSRT/Core/WidgetAjax.php +++ b/src/AKSRT/Core/WidgetAjax.php @@ -134,6 +134,7 @@ class WidgetAjax { 'orderby' => sanitize_key((string) ($request->get_param('orderby') ?? 'date')), 'cat' => max(0, (int) ($request->get_param('cat') ?? 0)), 'limit_day' => max(0, (int) ($request->get_param('limit_day') ?? 0)), + 'style' => sanitize_key((string) ($request->get_param('style') ?? 'mini')), 'paginate' => $paginate, ]; $page = max(1, (int) ($request->get_param('page') ?? $request->get_param('paged') ?? 1)); diff --git a/src/AKSRT/Widgets/CategoryBlockWidget.php b/src/AKSRT/Widgets/CategoryBlockWidget.php index 80f72769..953c6773 100644 --- a/src/AKSRT/Widgets/CategoryBlockWidget.php +++ b/src/AKSRT/Widgets/CategoryBlockWidget.php @@ -337,7 +337,7 @@ class CategoryBlockWidget extends \WP_Widget { $context ); $paginate = sanitize_key((string) ($instance['paginate'] ?? 'none')); - if (!in_array($paginate, ['ajax', 'none'], true)) { + if (!in_array($paginate, ['ajax', 'none', 'number'], true)) { $paginate = 'none'; } @@ -367,21 +367,26 @@ class CategoryBlockWidget extends \WP_Widget { $max_pages = max(1, (int) $query->max_num_pages); $total = (int) $query->found_posts; - $has_more = $paginate === 'ajax' && $page < $max_pages; + $has_more = in_array($paginate, ['ajax', 'number'], true) && $page < $max_pages; + $base_qs = [ + 'count' => $count, + 'cat' => $category_id, + 'columns' => $columns, + 'layout' => $layout, + 'context' => $context, + 'paginate' => $paginate, + ]; + $rest_base = add_query_arg($base_qs, rest_url('aksrt/v1/widgets/category-block')); $paginate_html = ''; if ($paginate === 'ajax' && $has_more) { - $next = add_query_arg([ - 'page' => $page + 1, - 'count' => $count, - 'cat' => $category_id, - 'columns' => $columns, - 'layout' => $layout, - 'context' => $context, - 'paginate' => 'ajax', - ], rest_url('aksrt/v1/widgets/category-block')); + $next = add_query_arg(['page' => $page + 1], $rest_base); $paginate_html = function_exists('aksrt_get_ajax_next_paginate') ? aksrt_get_ajax_next_paginate($total, $page, $count, $next) : '