diff --git a/content-templates/content-article.php b/content-templates/content-article.php index 319c927..63c958f 100644 --- a/content-templates/content-article.php +++ b/content-templates/content-article.php @@ -9,6 +9,23 @@ namespace WP_73k; ?> +<article class="post border-bottom border-gray pb-4 mb-3" itemscope itemtype="https://schema.org/CreativeWork"> + <header> + <h2 class="post-title fs-2 fw-600 mb-2"> + <?php + if ( is_archive() || is_home() ) { + printf( '<a href="%s" rel="bookmark">%s</a>', + esc_url( get_the_permalink() ), + esc_html( get_the_title() ) + ); + } else { + echo get_the_title(); + } ?> + </h2> + </header> +</article> + + <article <?php post_class( 'bg-white border-2 border-gray-400 p-8' ); ?> itemscope itemtype="https://schema.org/CreativeWork"> <header> <h2 class="m-0"> diff --git a/index.php b/index.php index ca01344..fe6378f 100644 --- a/index.php +++ b/index.php @@ -10,23 +10,24 @@ namespace WP_73k; get_header(); ?> <main class="container d-flex justify-content-center"> - <div class="container mx-auto relative z-10 mb-16 lg:mb-32 flex flex-wrap items-start"> - <div class="w-full lg:w-4/6 lg:pr-10 mb-8"> - <?php - if ( have_posts() ) { - while ( have_posts() ) { - the_post(); - echo get_template_part( 'content-templates/content', 'article' ); - } - } ?> - </div> + + <div class="col-12 col-md-10 col-lg-9 col-xl-8 col-xxl-7 pb-2 mb-4 mt-3"> + <?php - if ( !is_active_sidebar( 'sidebar' ) ) : ?> - <aside class="w-full lg:w-2/6 bg-white border-gray-400 border-2 p-8"> - <?php dynamic_sidebar( 'sidebar' ); ?> - </aside> + if ( have_posts() ) { + while ( have_posts() ) { + the_post(); + echo get_template_part( 'content-templates/content', 'article' ); + } + } ?> + <?php - endif; ?> + // if ( !is_active_sidebar( 'sidebar' ) ) : ?> + <!-- <aside class="w-full lg:w-2/6 bg-white border-gray-400 border-2 p-8"> --> + <?php // dynamic_sidebar( 'sidebar' ); ?> + <!-- </aside> --> + <?php + // endif; ?> </div> </main> <?php diff --git a/page.php b/page.php new file mode 100644 index 0000000..cf96ea0 --- /dev/null +++ b/page.php @@ -0,0 +1,45 @@ +<?php +/** + * The default single page template. + * + * @author Freeshifter LLC + * @since 1.0.0 + */ + +namespace WP_73k; + +get_header(); ?> +<main class="container d-flex justify-content-center"> + + <div class="col-12 col-md-10 col-lg-9 col-xl-8 col-xxl-7 border-bottom border-gray pb-3 mb-5 mt-3"> + + <article itemscope itemtype="https://schema.org/CreativeWork"> + <header> + <h2 class="fs-2 fw-600 mb-2"> + <?php + if ( is_archive() || is_home() ) { + printf( '<a href="%s" rel="bookmark">%s</a>', + esc_url( get_the_permalink() ), + esc_html( get_the_title() ) + ); + } else { + echo get_the_title(); + } ?> + </h2> + </header> + + <div class="article"> + <?php + if ( has_post_thumbnail() ) { + echo get_the_post_thumbnail( get_the_ID(), 'large', ['class' => 'rounded shadow-lg'] ); + } + + the_content(); ?> + </div> + + </article> + + </div> +</main> +<?php +get_footer(); diff --git a/src/classes.php b/src/classes.php index bcd478f..5093943 100644 --- a/src/classes.php +++ b/src/classes.php @@ -59,7 +59,7 @@ add_filter( 'wp_nav_menu_objects', function($items, $args) { foreach ($object->classes as $c) { if (substr( $c, 0, strlen( $svgicon_prefix ) ) === $svgicon_prefix) { $icon_slug = str_replace($svgicon_prefix, '', $c); - $object->title = svg_icon_use($icon_slug, 'icon baseline') . $object->title; + $object->title = svg_icon_use($icon_slug, 'icon baseline') . "\\" . $object->title; } } }