feat(navigation): hard-switch to Zibll navigation and Font Awesome 5
This commit is contained in:
1 parent
3c3ddac8be
commit
a0b84977a2
630 files changed
+101647
-11293
No files matched your search
@@ -125,23 +125,23 @@ if (!function_exists('aksrt_renderer_thumb')) {
|
||||
$content .= '<div class="video-thumb-box" video-url="' . esc_url((string) $data['video_url']) . '" data-volume="' . ($muted ? 'none' : '100') . '" data-post-thumb-video>';
|
||||
$content .= '<div class="img-thumb"><img' . $default_attr . aksrt_get_lazy_attr('lazy_posts_thumb', (string) $data['primary'], 'fit-cover radius8') . ' alt="' . esc_attr((string) $data['title']) . '"></div>';
|
||||
$content .= '<div class="video-thumb"><div class="dplayer dplayer-thumb"><video playsinline loop preload="none"' . ($muted ? ' muted' : '') . ' data-src="' . esc_url((string) $data['video_url']) . '"></video></div></div></div>';
|
||||
$format_icon = '<i class="fa fa-play-circle em12 mt6 c-white opacity8" aria-hidden="true"></i>';
|
||||
$format_icon = '<i class="fa fas fa-play-circle em12 mt6 c-white opacity8" aria-hidden="true"></i>';
|
||||
} elseif ($has_slides) {
|
||||
$content .= '<div class="relative zib-slider"><div class="new-swiper item-thumbnail' . ($is_contain ? ' gradient-background' : '') . '" data-loop="true" data-effect="slide" data-autoplay="1" data-post-thumb-slider><div class="swiper-wrapper">';
|
||||
foreach ((array) $data['slides'] as $image) {
|
||||
$content .= '<div class="swiper-slide' . ($is_contain ? ' gradient-bg' : '') . '"' . ($is_contain ? ' data-opacity="0.2"' : '') . '><a' . $target . ' href="' . esc_url((string) $data['permalink']) . '"><img' . aksrt_get_lazy_attr('lazy_posts_thumb', (string) $image, 'radius8') . ' alt="' . esc_attr((string) $data['title']) . '"></a></div>';
|
||||
}
|
||||
$content .= '</div><div class="swiper-pagination kaoyou"></div></div></div>';
|
||||
$format_icon = '<badge class="b-black opacity8 mt6"><i class="fa fa-image mr3" aria-hidden="true"></i>' . count((array) $data['slides']) . '</badge>';
|
||||
$format_icon = '<badge class="b-black opacity8 mt6"><i class="fa fas fa-image mr3" aria-hidden="true"></i>' . count((array) $data['slides']) . '</badge>';
|
||||
} else {
|
||||
$content .= '<a' . $target . ' href="' . esc_url((string) $data['permalink']) . '"><img' . $default_attr . aksrt_get_lazy_attr('lazy_posts_thumb', (string) $data['primary'], 'fit-cover radius8') . ' alt="' . esc_attr((string) $data['title']) . '"></a>';
|
||||
$format = get_post_format((int) $data['post_id']);
|
||||
if ((string) $data['video_url'] !== '') {
|
||||
$format_icon = '<i class="fa fa-play-circle em12 mt6 c-white opacity8" aria-hidden="true"></i>';
|
||||
$format_icon = '<i class="fa fas fa-play-circle em12 mt6 c-white opacity8" aria-hidden="true"></i>';
|
||||
} elseif (in_array($format, ['image', 'gallery'], true) && (int) $data['gallery_count'] > 0) {
|
||||
$format_icon = '<badge class="b-black opacity8 mr6 mt6"><i class="fa fa-image mr3" aria-hidden="true"></i>' . (int) $data['gallery_count'] . '</badge>';
|
||||
$format_icon = '<badge class="b-black opacity8 mr6 mt6"><i class="fa fas fa-image mr3" aria-hidden="true"></i>' . (int) $data['gallery_count'] . '</badge>';
|
||||
} elseif ($format === 'video') {
|
||||
$format_icon = '<i class="fa fa-play-circle em12 mr6 mt6 c-white opacity8" aria-hidden="true"></i>';
|
||||
$format_icon = '<i class="fa fas fa-play-circle em12 mr6 mt6 c-white opacity8" aria-hidden="true"></i>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ if (!function_exists('aksrt_renderer_mult_thumb')) {
|
||||
foreach (array_slice((array) $data['gallery'], 0, 4) as $index => $image) {
|
||||
$badge = '';
|
||||
if ($index === 3 && (int) ($data['gallery_count'] ?? 0) > 4) {
|
||||
$badge = '<div class="abs-center right-top"><badge class="b-black mr6 mt6 em09"><i class="fa fa-image mr3" aria-hidden="true"></i>+' . ((int) $data['gallery_count'] - 4) . '</badge></div>';
|
||||
$badge = '<div class="abs-center right-top"><badge class="b-black mr6 mt6 em09"><i class="fa fas fa-image mr3" aria-hidden="true"></i>+' . ((int) $data['gallery_count'] - 4) . '</badge></div>';
|
||||
}
|
||||
$html .= '<span>' . $badge . '<img' . aksrt_get_lazy_attr('lazy_posts_thumb', (string) $image, 'fit-cover radius8') . ' alt=""></span>';
|
||||
}
|
||||
@@ -199,13 +199,13 @@ if (!function_exists('aksrt_renderer_pay_badge')) {
|
||||
if (!function_exists('aksrt_renderer_vip_icon')) {
|
||||
function aksrt_renderer_vip_icon(int $level): string {
|
||||
if (!class_exists('\AKSRT\Settings\Settings')) {
|
||||
return '<i class="fas fa-crown mr3" aria-hidden="true"></i>';
|
||||
return '<i class="fa fas fa-certificate mr3" aria-hidden="true"></i>';
|
||||
}
|
||||
$settings = \AKSRT\Settings\Settings::get_payment_vip_settings();
|
||||
$url = esc_url((string) ($settings['levels'][$level]['img_icon'] ?? ''));
|
||||
return $url !== ''
|
||||
? '<img class="mr3" src="' . $url . '" alt="" aria-hidden="true">'
|
||||
: '<i class="fas fa-crown mr3" aria-hidden="true"></i>';
|
||||
: '<i class="fa fas fa-certificate mr3" aria-hidden="true"></i>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ if (!function_exists('aksrt_renderer_badges')) {
|
||||
if (empty($cfg['is_category']) && in_array('cat', $types, true)) {
|
||||
$colors = ['c-blue', 'c-yellow', 'c-green', 'c-purple', 'c-red'];
|
||||
foreach (array_slice((array) $data['categories'], 0, 3) as $index => $category) {
|
||||
$items[] = '<a class="but ' . esc_attr($colors[$index % count($colors)]) . '" title="' . esc_attr__('查看更多分类文章', 'aksrt') . '" href="' . esc_url(get_category_link($category->term_id)) . '"><i class="fa fa-folder-open-o" aria-hidden="true"></i>' . esc_html($category->name) . '</a>';
|
||||
$items[] = '<a class="but ' . esc_attr($colors[$index % count($colors)]) . '" title="' . esc_attr__('查看更多分类文章', 'aksrt') . '" href="' . esc_url(get_category_link($category->term_id)) . '"><i class="fa fas fa-folder-open" aria-hidden="true"></i>' . esc_html($category->name) . '</a>';
|
||||
}
|
||||
}
|
||||
if (empty($cfg['is_tag']) && in_array('tag', $types, true)) {
|
||||
|
||||
Reference in new issue
Block a user