About page working

This commit is contained in:
Adam Piontek 2021-07-06 15:31:46 -04:00
parent 0584537f99
commit 3c6d3e6894
4 changed files with 79 additions and 16 deletions

View file

@ -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">

View file

@ -10,8 +10,9 @@ 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">
<div class="col-12 col-md-10 col-lg-9 col-xl-8 col-xxl-7 pb-2 mb-4 mt-3">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
@ -19,14 +20,14 @@ get_header(); ?>
echo get_template_part( 'content-templates/content', 'article' );
}
} ?>
</div>
<?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 ( !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; ?>
// endif; ?>
</div>
</main>
<?php

45
page.php Normal file
View file

@ -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();

View file

@ -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;
}
}
}