Layout modifications.

This commit is contained in:
Frank419 2025-01-28 12:01:58 +08:00
parent 6876dc26a0
commit ff3cf5e516
3 changed files with 44 additions and 33 deletions

View File

@ -40,17 +40,21 @@ $mf_default_image_location = get_theme_mod( 'minimalistflex_default_featured_ima
</div>
<?php endif; ?>
<div class="singular-main">
<h1 class="panel-title"><?php the_title(); ?></h1>
<?php get_template_part( 'templates/publisher' ) ?>
<div class="panel-main">
<?php the_content(); ?>
<?php wp_link_pages( Array(
'before' => '<p class="panel post-nav-links"><span class="post-nav-links-indicator">' . __( 'Pages: ', 'minimalistflex' ) . '</span>'
) ); ?>
<div class="singular-post">
<h1 class="panel-title"><?php the_title(); ?></h1>
<?php get_template_part( 'templates/publisher' ) ?>
<div class="panel-main">
<?php the_content(); ?>
<?php wp_link_pages( Array(
'before' => '<p class="panel post-nav-links"><span class="post-nav-links-indicator">' . __( 'Pages: ', 'minimalistflex' ) . '</span>'
) ); ?>
</div>
</div>
<?php get_sidebar( 'below-content' ) ?>
<?php get_template_part( 'templates/author' ) ?>
<?php get_template_part( 'templates/metadata' ) ?>
<div class="singular-card">
<?php get_template_part( 'templates/author' ) ?>
<?php get_template_part( 'templates/metadata' ) ?>
</div>
</div>
<?php if ( comments_open() || get_comments_number() ) :
comments_template();

View File

@ -49,35 +49,19 @@ $mf_default_image_location = get_theme_mod( 'minimalistflex_default_featured_ima
</a>
<?php endif; ?>
<div class="panel-content">
<?php if ( get_theme_mod( 'minimalistflex_interface_comment_count', 'yes' ) === 'yes' ): ?>
<div class="panel-comment-count">
<?php
printf(
/* translators: %d: Number of comments. */
esc_html( _nx(
'%d Comment',
'%d Comments',
get_comments_number(),
'comment count',
'minimalistflex'
) ),
esc_html( number_format_i18n( get_comments_number() ) )
);
?>
</div>
<?php endif; ?>
<h1 class="panel-title"><?php the_title(); ?></h1>
<h2 class="panel-title"><?php the_title(); ?></h2>
<div class="panel-main">
<?php the_excerpt(); ?>
<?php wp_link_pages( Array(
'before' => '<p class="panel post-nav-links"><span class="post-nav-links-indicator">' . esc_html__('Pages: ', 'minimalistflex') . '</span></p>'
) ); ?>
</div>
<?php wp_link_pages( Array(
'before' => '<div class="panel post-nav-links"><span class="post-nav-links-indicator">' . esc_html__('Pages: ', 'minimalistflex') . '</span>',
'after' => '</div>'
) ); ?>
<div class="panel-meta">
<?php if ( get_theme_mod( 'minimalistflex_interface_publisher', 'yes' ) === 'yes' ): ?>
<a class="panel-author" href="<?php echo esc_url( get_author_posts_url($mf_id) ) ?>">
<span aria-hidden="true"><?php echo get_avatar( $mf_id, 80 ) ?></span>
<?php the_author() ?>
<span><?php the_author() ?></span>
</a>
<?php endif; ?>
<?php $mf_datemode = get_theme_mod( 'minimalistflex_interface_date', 'modify' ); ?>
@ -98,6 +82,27 @@ $mf_default_image_location = get_theme_mod( 'minimalistflex_default_featured_ima
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ( get_theme_mod( 'minimalistflex_interface_comment_count', 'yes' ) === 'yes' ): ?>
<div class="panel-comment-count">
<a href="<?php echo get_comments_link() ?>">
<?php
printf(
/* translators: %d: Number of comments. */
esc_html( _nx(
'%d Comment',
'%d Comments',
get_comments_number(),
'comment count',
'minimalistflex'
) ),
esc_html( number_format_i18n( get_comments_number() ) )
);
?>
</a>
</div>
<?php endif; ?>
</div>
<div class="panel-link-container">
<a class="panel panel-link" href="<?php the_permalink(); ?>" aria-label="<?php
printf(
/* translators: %s: Post title. */

View File

@ -4,10 +4,12 @@ if ( !defined( 'WPINC' ) ) {
}
?>
<?php $mf_id = get_the_author_meta( 'ID' ); ?>
<div class="publisher">
<a class="publisher-link" href="<?php echo esc_url( get_author_posts_url($id) ) ?>">
<?php echo get_avatar( $id, 32 ) ?>
<a class="publisher-link" href="<?php echo esc_url( get_author_posts_url($mf_id) ) ?>">
<?php echo get_avatar( $mf_id, 32 ) ?>
<span><?php the_author() ?></span>
</a>
<div class="publisher-datetime">