first commit without licensingg
This commit is contained in:
60
template-parts/archive/content-full.php
Normal file
60
template-parts/archive/content-full.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying full posts
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package Revision
|
||||
*/
|
||||
|
||||
$options = get_query_var( 'options' );
|
||||
|
||||
// Thumbnail size.
|
||||
$thumbnail_size = 'csco-large';
|
||||
|
||||
if ( 'uncropped' === csco_get_page_preview() ) {
|
||||
$thumbnail_size = sprintf( '%s-uncropped', $thumbnail_size );
|
||||
}
|
||||
?>
|
||||
|
||||
<article <?php post_class(); ?>>
|
||||
<div class="cs-entry__full-header">
|
||||
<div class="cs-entry__container">
|
||||
<?php if ( has_post_thumbnail() ) { ?>
|
||||
<figure class="cs-entry__inner cs-entry__thumbnail " data-scheme="inverse">
|
||||
<div class="cs-overlay-post-meta cs-meta-overlay-background"><?php csco_get_post_meta( array( 'category', 'reading_time' ), true, $options['meta'] ); ?></div>
|
||||
<div class="cs-overlay-transparent">
|
||||
<?php the_post_thumbnail( $thumbnail_size ); ?>
|
||||
</div>
|
||||
<a class="cs-overlay-link" href="<?php echo esc_url( get_permalink() ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>"></a>
|
||||
</figure>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cs-entry__wrap">
|
||||
<div class="cs-entry__container">
|
||||
<div class="cs-entry__content-wrap">
|
||||
<?php
|
||||
csco_get_post_meta( array( 'author', 'date', 'comments', 'views' ), true, $options['meta'] );
|
||||
the_title( '<h2 class="cs-entry__title"><a href="' . esc_url( get_permalink() ) . '"><span>', '</span></a></h2>' );
|
||||
?>
|
||||
<div class="cs-entry-type-<?php echo esc_attr( $options['summary_type'] ); ?> ">
|
||||
<?php
|
||||
if ( 'summary' === $options['summary_type'] ) {
|
||||
the_excerpt();
|
||||
} else {
|
||||
$more_link_text = sprintf(
|
||||
/* translators: %s: Name of current post */
|
||||
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'revision' ),
|
||||
get_the_title()
|
||||
);
|
||||
|
||||
the_content( $more_link_text );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
57
template-parts/archive/entry-overlay.php
Normal file
57
template-parts/archive/entry-overlay.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying posts
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package Revision
|
||||
*/
|
||||
|
||||
$options = get_query_var( 'options' );
|
||||
|
||||
// Set post class.
|
||||
$post_class = __return_empty_string();
|
||||
?>
|
||||
|
||||
<article <?php post_class( $post_class ); ?> data-scheme="inverse">
|
||||
<div class="cs-entry__outer cs-entry__overlay cs-overlay-ratio cs-ratio-landscape-16-9" >
|
||||
<div class="cs-entry__inner cs-entry__thumbnail" >
|
||||
<div class="cs-overlay-background">
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'csco-medium-uncropped' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php csco_the_post_format_icon(); ?>
|
||||
</div>
|
||||
<div class="cs-entry__inner cs-entry__content cs-overlay-content">
|
||||
<div class="cs-entry__content-top">
|
||||
<div class="cs-overlay-post-meta cs-meta-overlay-transparent"><?php csco_get_post_meta( array( 'category', 'reading_time' ), true, $options['meta'] ); ?></div>
|
||||
</div>
|
||||
<div class="cs-entry__content-body">
|
||||
<?php csco_get_post_meta( array( 'author', 'date', 'comments', 'views' ), true, $options['meta'] ); ?>
|
||||
|
||||
<?php the_title( '<h2 class="cs-entry__title"><a href="' . esc_url( get_permalink() ) . '"><span>', '</span></a></h2>' ); ?>
|
||||
|
||||
<?php
|
||||
if ( $options['excerpt'] ) {
|
||||
$excerpt = csco_get_the_excerpt( 150 );
|
||||
if ( $excerpt ) {
|
||||
?>
|
||||
<div class="cs-entry__excerpt">
|
||||
<?php echo esc_html( $excerpt ); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ( $options['discover_more'] ) { ?>
|
||||
<?php csco_discover_more_button(); ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<a class="cs-overlay-link" href="<?php echo esc_url( get_permalink() ); ?>" title="<?php echo esc_attr( the_title() ); ?>"></a>
|
||||
</div>
|
||||
</article>
|
||||
61
template-parts/archive/entry.php
Normal file
61
template-parts/archive/entry.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying posts
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package Revision
|
||||
*/
|
||||
|
||||
$options = get_query_var( 'options' );
|
||||
|
||||
// Set post class.
|
||||
$post_class = __return_empty_string();
|
||||
|
||||
?>
|
||||
|
||||
<?php if ( 'list' === $options['layout'] || 'grid' === $options['layout'] ) { ?>
|
||||
<article <?php post_class( $post_class ); ?>>
|
||||
<div class="cs-entry__outer">
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
?>
|
||||
<div class="cs-entry__inner cs-entry__thumbnail cs-entry__overlay cs-overlay-ratio cs-ratio-<?php echo esc_attr( $options['image_orientation'] ); ?>" data-scheme="inverse">
|
||||
|
||||
<div class="cs-overlay-post-meta cs-meta-overlay-background"><?php csco_get_post_meta( array( 'category', 'reading_time' ), true, $options['meta'] ); ?></div>
|
||||
|
||||
<div class="cs-overlay-background cs-overlay-transparent">
|
||||
<?php the_post_thumbnail( $options['image_size'] ); ?>
|
||||
</div>
|
||||
|
||||
<?php csco_the_post_format_icon(); ?>
|
||||
|
||||
<a class="cs-overlay-link" href="<?php echo esc_url( get_permalink() ); ?>" title="<?php echo esc_attr( the_title() ); ?>"></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="cs-entry__inner cs-entry__content">
|
||||
<?php csco_get_post_meta( array( 'author', 'date', 'comments', 'views' ), true, $options['meta'] ); ?>
|
||||
|
||||
<?php the_title( '<h2 class="cs-entry__title"><a href="' . esc_url( get_permalink() ) . '"><span>', '</span></a></h2>' ); ?>
|
||||
|
||||
<?php
|
||||
if ( $options['excerpt'] ) {
|
||||
$excerpt = csco_get_the_excerpt( 150 );
|
||||
if ( $excerpt ) {
|
||||
?>
|
||||
<div class="cs-entry__excerpt">
|
||||
<?php echo esc_html( $excerpt ); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ( $options['discover_more'] ) { ?>
|
||||
<?php csco_discover_more_button(); ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<?php } ?>
|
||||
Reference in New Issue
Block a user