diff --git a/assets/css/frontend/widget-batch5.css b/assets/css/frontend/widget-batch5.css index 530b4817..ddc37d63 100644 --- a/assets/css/frontend/widget-batch5.css +++ b/assets/css/frontend/widget-batch5.css @@ -2431,3 +2431,51 @@ a.main-color > .icon-cover-card:hover, /* batch31-33 residual */ .aksrt-fi__img.aksrt-lazy { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; } .aksrt-fi__video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; } + + +/* batch34-36 residual */ +.widget-hot-posts--graphic .hot-posts-graphic { margin-bottom: 12px; border-radius: 8px; overflow: hidden; } +.widget-hot-posts--graphic .hot-posts-graphic .graphic { position: relative; overflow: hidden; border-radius: 8px; background: var(--surface-2, #f3f4f6); } +.widget-hot-posts--graphic .hot-posts-graphic img.fit-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; } +.widget-hot-posts--graphic .linear-mask { + position: absolute; inset: 0; + background: linear-gradient(to top, rgba(0,0,0,.62), transparent 55%); + pointer-events: none; +} +.widget-hot-posts--graphic .abs-center.left-bottom { position: absolute; left: 0; right: 0; bottom: 0; color: #fff; } +.widget-hot-posts--graphic .hot-posts-graphic__title { font-weight: 600; line-height: 1.35; } +.widget-hot-posts--graphic .hot-post-item { position: relative; align-items: flex-start; gap: 0; } +.widget-hot-posts--graphic .hot-post-item__thumb { + flex: 0 0 72px; width: 72px; height: 54px; border-radius: 8px; overflow: hidden; + position: relative; background: var(--surface-2, #f3f4f6); +} +.widget-hot-posts--graphic .hot-post-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; } +.widget-hot-posts--graphic badge.img-badge.left.hot { + position: absolute; top: 6px; left: 6px; z-index: 2; + padding: 2px 6px; border-radius: 4px; font-size: 11px; line-height: 1.2; color: #fff; +} +.widget-hot-posts--graphic badge.img-badge.jb-red { background: #f04438; } +.widget-hot-posts--graphic badge.img-badge.jb-yellow { background: #f79009; color: #111; } +.widget-hot-posts--graphic badge.img-badge.b-gray { background: #667085; } +.widget-hot-posts--graphic badge.img-badge.em12 { font-size: 12px; } +.pagenav.ajax-pag { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin-top: 12px; } +.pagenav.ajax-pag .page-numbers { + display: inline-flex; min-width: 32px; height: 32px; padding: 0 8px; + align-items: center; justify-content: center; border-radius: 8px; + background: var(--surface-2, #f3f4f6); color: inherit; text-decoration: none; font-size: 13px; +} +.pagenav.ajax-pag .page-numbers.current { background: var(--theme-color, #f04494); color: #fff; } +.pagenav.ajax-pag .page-numbers.dots { background: transparent; min-width: auto; } +.widget-tab-posts__skeleton .placeholder-row { + display: flex; gap: 10px; align-items: center; padding: 8px 0; +} +.widget-tab-posts__skeleton .thumb-placeholder { + width: 56px; height: 42px; border-radius: 6px; background: var(--surface-2, #eee); +} +.widget-tab-posts__skeleton .placeholder.k1, +.widget-tab-posts__skeleton .placeholder.s1 { + height: 12px; border-radius: 4px; background: var(--surface-2, #eee); +} +.widget-tab-posts__skeleton .placeholder.k1 { width: 80%; } +.widget-tab-posts__skeleton .placeholder.s1 { width: 48%; } +.posts-mini-lists.aksrt-main-posts { /* zibll mini outer */ } diff --git a/src/AKSRT/Widgets/RecentCommentsWidget.php b/src/AKSRT/Widgets/RecentCommentsWidget.php index 34a49134..b7c8dd05 100644 --- a/src/AKSRT/Widgets/RecentCommentsWidget.php +++ b/src/AKSRT/Widgets/RecentCommentsWidget.php @@ -56,10 +56,16 @@ class RecentCommentsWidget extends \WP_Widget { 'orderby' => 'comment_date_gmt', 'order' => 'DESC', ]; - // Include forum topics when forum is active. - if (post_type_exists('forum_topic') || post_type_exists('forum_post')) { + // Include forum topics / products when active. + if (post_type_exists('aksrt_forum_topic')) { + $query['post_type'][] = 'aksrt_forum_topic'; + } elseif (post_type_exists('forum_topic') || post_type_exists('forum_post')) { + // Legacy CPT names. $query['post_type'][] = post_type_exists('forum_topic') ? 'forum_topic' : 'forum_post'; } + if (post_type_exists('aksrt_product')) { + $query['post_type'][] = 'aksrt_product'; + } if ($post_not_in) { $query['post__not_in'] = $post_not_in; } @@ -126,7 +132,8 @@ class RecentCommentsWidget extends \WP_Widget { $avatar_url = $user_id > 0 && function_exists('aksrt_get_avatar_url') ? aksrt_get_avatar_url($user_id, ['size' => 42]) : get_avatar_url($comment, ['size' => 42]); - $avatar = '
+ +
++ +
$orderby, 'cat' => max(0, (int) ($new_instance['cat'] ?? 0)), 'limit_day' => max(0, (int) ($new_instance['limit_day'] ?? 0)), + 'topics' => sanitize_text_field((string) ($new_instance['topics'] ?? '')), + 'pay_type' => sanitize_key((string) ($new_instance['pay_type'] ?? '')), ]; } }