feat(lightbox): 接入全站图片预览
This commit is contained in:
@@ -62,8 +62,9 @@ $show_sidebar = function_exists('aksrt_is_show_sidebar') ? aksrt_is_show_sidebar
|
||||
<article <?php post_class('entry-page'); ?>>
|
||||
<?php get_template_part('templates/parts/page-header', null, $header_args); ?>
|
||||
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<figure class="entry-thumb">
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<figure class="entry-thumb" data-aksrt-lightbox="<?php echo !empty($page_settings['lightbox']) ? '1' : '0'; ?>">
|
||||
|
||||
<?php the_post_thumbnail('large'); ?>
|
||||
</figure>
|
||||
<?php endif; ?>
|
||||
@@ -106,13 +107,5 @@ $show_sidebar = function_exists('aksrt_is_show_sidebar') ? aksrt_is_show_sidebar
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($page_settings['lightbox'])) : ?>
|
||||
<div class="lightbox-overlay" id="lightbox-overlay" role="dialog" aria-modal="true" aria-label="<?php esc_attr_e('图片预览', 'aksrt'); ?>">
|
||||
<button type="button" class="lightbox-close" aria-label="<?php esc_attr_e('关闭', 'aksrt'); ?>"><i class="fa fas fa-times"></i></button>
|
||||
<img src="" alt="" class="lightbox-img">
|
||||
<div class="lightbox-caption" aria-live="polite"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
|
||||
Reference in New Issue
Block a user