Initial commit.

This commit is contained in:
Frank419
2024-08-20 07:44:34 +08:00
commit 942a4c151f
61 changed files with 7781 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
if ( !defined( 'WPINC' ) ) {
die;
}
?>
<?php $userid = get_the_author_meta( 'ID' ) ?>
<div class="singular-author">
<div class="author-card">
<div class="author-avatar">
<?php echo get_avatar( $userid, 80 ); ?>
</div>
<div class="author-description">
<a class="author-link" href="<?php echo get_author_posts_url( $userid ) ?>"><?php the_author() ?></a>
<p class="author-tagline"><?php the_author_meta( 'description' ) ?></p>
</div>
</div>
</div>
+5
View File
@@ -0,0 +1,5 @@
<div class="empty">
<p>
<?php esc_html_e( 'Sorry, but nothing was found at this place.', 'minimalistflex' ); ?>
</p>
</div>
+4
View File
@@ -0,0 +1,4 @@
<?php
if ( !defined( 'WPINC' ) ) {
die;
}
+110
View File
@@ -0,0 +1,110 @@
<?php
if ( !defined( 'WPINC' ) ) {
die;
}
?>
<?php
$default_images = explode( ',', get_theme_mod( 'minimalistflex_default_featured_images' ));
$default_image_location = get_theme_mod( 'minimalistflex_default_featured_images_location', 'archive' );
?>
<?php while ( have_posts() ) :
the_post();
$id = get_the_author_meta('ID');
$post_id = get_the_ID();
?>
<div <?php post_class("panel"); ?>>
<?php if ( has_post_thumbnail() ): ?>
<a class="panel-image" href="<?php the_permalink() ?>" aria-label="<?php
printf(
/* translators: %s: Post title associated with the thumbnail image. */
__( 'Thumbnail image of %s. Also a link that navigates to it.', 'minimalistflex' ),
get_the_title()
) ?>">
<?php the_post_thumbnail( 'large' ); ?>
</a>
<?php elseif ( ( $default_images[0] <> '' || minimalistflex_get_first_image() ) && $default_image_location <> 'no' && $default_image_location <> 'single' ): ?>
<?php if ( get_theme_mod( 'minimalistflex_default_featured_images_first_image', 'yes' ) == 'yes' && minimalistflex_get_first_image() ): ?>
<?php $imgsrc = minimalistflex_get_first_image(); ?>
<?php else: ?>
<?php
$key = minimalistflex_get_seconds() % count($default_images);
$imgsrc = $default_images[$key];
?>
<?php endif; ?>
<a class="panel-image" href="<?php the_permalink() ?>" aria-label="<?php
printf(
/* translators: %s: Post title associated with the thumbnail image. */
__( 'Thumbnail image of %s. Also a link that navigates to it.', 'minimalistflex' ),
get_the_title()
) ?>">
<img src="<?php echo esc_url( $imgsrc );?>" aria-label="<?php esc_attr_e( 'The thumbnail image. This is a default image so that it\'s purely decorative.', 'minimalistflex' ) ?>">
</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(
_nx(
'1 Comment',
'%d Comments',
get_comments_number(),
'comment count',
'minimalistflex'
),
number_format_i18n( get_comments_number() )
);
?>
</div>
<?php endif; ?>
<h1 class="panel-title"><?php the_title(); ?></h1>
<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">' . __('Pages: ', 'minimalistflex') . '</span>'
) ); ?>
</div>
<div class="panel-meta">
<?php if ( get_theme_mod( 'minimalistflex_interface_publisher', 'yes' ) == 'yes' ): ?>
<a class="panel-author" href="<?php echo esc_attr( get_author_posts_url($id) ) ?>">
<span aria-hidden="true"><?php echo get_avatar( $id, 80 ) ?></span>
<?php the_author() ?>
</a>
<?php endif; ?>
<?php $datemode = get_theme_mod( 'minimalistflex_interface_date', 'modify' ); ?>
<?php if ( $datemode <> 'no' ): ?>
<div class="panel-author">
<?php if ( $datemode == 'publish' || get_the_modified_date() <> get_the_date() ): ?>
<?php printf(
/* translators: %s: Post publish time. */
__( 'Published on %s', 'minimalistflex' ),
get_the_date()
) ?>
<?php else: ?>
<?php printf(
/* translators: %s: Post last modified time. */
__( 'Last modified on %s', 'minimalistflex' ),
get_the_modified_date()
) ?>
<?php endif; ?>
</div>
<?php endif; ?>
<a class="panel panel-link" href="<?php the_permalink(); ?>">
<span aria-hidden="true">
<?php echo esc_html( get_theme_mod( 'minimalistflex_interface_readlink', __( 'Read More', 'minimalistflex' ) ) ); ?>
</span>
<span class="screen-reader-text">
<?php
printf(
/* translators: %s: Post title. */
__( 'Read more of %s', 'minimalistflex' ),
get_the_title()
) ?>
</span>
</a>
</div>
</div>
</div>
<?php endwhile; ?>
+38
View File
@@ -0,0 +1,38 @@
<?php
if ( !defined( 'WPINC' ) ) {
die;
}
?>
<div class="singular-meta">
<?php $tags = get_the_category(); ?>
<?php if( $tags ): ?>
<div class="singular-categories">
<div class="categories-indicator">
<?php esc_html_e( 'Categories:', 'minimalistflex' ) ?>
</div>
<?php foreach( $tags as $tag ) { ?>
<div class="singular-category">
<a href="<?php echo esc_attr( get_category_link( $tag ) ) ?>">
<?php echo $tag->name; ?>
</a>
</div>
<?php } ?>
</div>
<?php endif; ?>
<?php $tags = get_the_tags(); ?>
<?php if( $tags ): ?>
<div class="singular-categories singular-tags">
<div class="categories-indicator tags-indicator">
<?php esc_html_e( 'Tags:', 'minimalistflex' ) ?>
</div>
<?php foreach( $tags as $tag ) { ?>
<div class="singular-category singular-tag">
<a href="<?php echo esc_attr( get_tag_link( $tag ) ) ?>">
<?php echo $tag->name; ?>
</a>
</div>
<?php } ?>
</div>
<?php endif; ?>
</div>
+32
View File
@@ -0,0 +1,32 @@
<?php
if ( !defined( 'WPINC' ) ) {
die;
}
?>
<div class="publisher">
<a class="publisher-link" href="<?php echo esc_attr( get_author_posts_url($id) ) ?>">
<?php echo get_avatar( $id, 32 ) ?>
<span><?php the_author() ?></span>
</a>
<div class="publisher-datetime">
<?php $datemode = get_theme_mod( 'minimalistflex_interface_date', 'modify' ); ?>
<?php if ( $datemode <> 'no' ): ?>
<?php if ( $datemode == 'publish' || get_the_modified_date() <> get_the_date() ): ?>
<?php printf(
/* translators: %s: Post publish time. */
__( 'Published on %s', 'minimalistflex' ),
get_the_date()
) ?>
<?php else: ?>
<?php printf(
/* translators: %s: Post last modified time. */
__( 'Last modified on %s', 'minimalistflex' ),
get_the_modified_date()
) ?>
<?php endif; ?>
<?php endif; ?>
</div>
</div>