added first ad mock section
This commit is contained in:
parent
1e4d014afc
commit
d50a7cae3e
BIN
assets/images/slowtwitch-shop.png
Normal file
BIN
assets/images/slowtwitch-shop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 129 KiB |
232
front-page.php
232
front-page.php
@ -2,130 +2,138 @@
|
||||
|
||||
<main class="st-main st-main-grid">
|
||||
<!-- LATEST SECTION -->
|
||||
<section class="st-article-section">
|
||||
<h2 class="st-article-section-title">Latest <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
||||
<?php
|
||||
query_posts('showposts=1');
|
||||
if (have_posts()) : while (have_posts()) : the_post();
|
||||
$category = get_the_category()[0];
|
||||
$author = get_userdata( $post->post_author );
|
||||
?>
|
||||
<article class="st-article-section-main-article">
|
||||
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
||||
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
||||
<h3><?php the_title(); ?></h3>
|
||||
</a>
|
||||
|
||||
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
|
||||
<a href="<?php echo get_author_posts_url( $post->post_author ); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
|
||||
</article>
|
||||
|
||||
<?php
|
||||
endwhile;
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
||||
|
||||
$post_section_two_args = array(
|
||||
'showposts' => 5,
|
||||
'offset' => 1,
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'DESC',
|
||||
'post_type' => 'post',
|
||||
'post_status' => 'publish'
|
||||
);
|
||||
query_posts($post_section_two_args);
|
||||
if (have_posts()) : while (have_posts()) : the_post();
|
||||
$category = get_the_category()[0];
|
||||
$author = get_userdata( $post->post_author );
|
||||
?>
|
||||
<article class="st-article-section-sub-article">
|
||||
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
<div class="st-article-section-sub-article__text-container">
|
||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-sub-article__category-link"><?php echo $category->name; ?></a>
|
||||
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
<?php
|
||||
endwhile;
|
||||
endif;
|
||||
wp_reset_postdata();
|
||||
<section class="st-article-section st-article-section__top">
|
||||
<h2 class="st-article-section-title">Latest <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
||||
<?php
|
||||
query_posts('showposts=1');
|
||||
if (have_posts()) : while (have_posts()) : the_post();
|
||||
$category = get_the_category()[0];
|
||||
$author = get_userdata( $post->post_author );
|
||||
?>
|
||||
<!-- TODO: Insert section sidebar here -->
|
||||
<article class="st-article-section-main-article">
|
||||
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
||||
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
||||
<h3><?php the_title(); ?></h3>
|
||||
</a>
|
||||
|
||||
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
|
||||
<a href="<?php echo get_author_posts_url( $post->post_author ); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
|
||||
</article>
|
||||
|
||||
<?php
|
||||
endwhile;
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
||||
|
||||
$post_section_two_args = array(
|
||||
'showposts' => 5,
|
||||
'offset' => 1,
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'DESC',
|
||||
'post_type' => 'post',
|
||||
'post_status' => 'publish'
|
||||
);
|
||||
query_posts($post_section_two_args);
|
||||
if (have_posts()) : while (have_posts()) : the_post();
|
||||
$category = get_the_category()[0];
|
||||
$author = get_userdata( $post->post_author );
|
||||
?>
|
||||
<article class="st-article-section-sub-article">
|
||||
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
<div class="st-article-section-sub-article__text-container">
|
||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-sub-article__category-link"><?php echo $category->name; ?></a>
|
||||
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
<?php
|
||||
endwhile;
|
||||
endif;
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
</section>
|
||||
<section class="st-ad-section st-ad-section__top">
|
||||
<img src="/wp-content/themes/slowtwitch-news/assets/images/vertical-ad-mock.jpg" alt="Ad Mock" class="st-ad-section-vertical-ad">
|
||||
<a href="https://shop.slowtwitch.com/" class="st-ad-section-shop-card-link">
|
||||
<div class="st-ad-section-shop-card">
|
||||
<h3 class="st-ad-section-shop-card__title">Save Big On Gear at the Slowtwitch Shop <span>></span></h3>
|
||||
<img src="/wp-content/themes/slowtwitch-news/assets/images/slowtwitch-shop.png" alt="" class="st-ad-section-shop-card__img">
|
||||
</div>
|
||||
</a>
|
||||
</section>
|
||||
<!-- TODO: Insert flat section for newsletter signup -->
|
||||
<!-- TECH SECTION -->
|
||||
<section class="st-article-section">
|
||||
<h2 class="st-article-section-title">Tech <a href="<?php echo home_url() . '/tech'; ?>" class="st-article-section-category-link">></a></h2>
|
||||
<?php
|
||||
$post_section_three_featured_args = array(
|
||||
'showposts' => 1,
|
||||
<h2 class="st-article-section-title">Tech <a href="<?php echo home_url() . '/tech'; ?>" class="st-article-section-category-link">></a></h2>
|
||||
<?php
|
||||
$post_section_three_featured_args = array(
|
||||
'showposts' => 1,
|
||||
'category_name' => 'Tech',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'DESC',
|
||||
'post_type' => 'post',
|
||||
'post_status' => 'publish'
|
||||
);
|
||||
query_posts($post_section_three_featured_args);
|
||||
if (have_posts()) : while (have_posts()) : the_post();
|
||||
$category = get_the_category()[0];
|
||||
$author = get_userdata( $post->post_author );
|
||||
?>
|
||||
<article class="st-article-section-main-article">
|
||||
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
||||
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
||||
<h3><?php the_title(); ?></h3>
|
||||
</a>
|
||||
|
||||
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
|
||||
<a href="<?php echo get_author_posts_url( $post->post_author ); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
|
||||
</article>
|
||||
|
||||
<?php
|
||||
endwhile;
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
||||
|
||||
$post_section_two_args = array(
|
||||
'showposts' => 3,
|
||||
'offset' => 1,
|
||||
'category_name' => 'Tech',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'DESC',
|
||||
'post_type' => 'post',
|
||||
'post_status' => 'publish'
|
||||
);
|
||||
query_posts($post_section_three_featured_args);
|
||||
query_posts($post_section_two_args);
|
||||
if (have_posts()) : while (have_posts()) : the_post();
|
||||
$category = get_the_category()[0];
|
||||
$author = get_userdata( $post->post_author );
|
||||
?>
|
||||
<article class="st-article-section-main-article">
|
||||
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
||||
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
||||
<h3><?php the_title(); ?></h3>
|
||||
</a>
|
||||
|
||||
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
|
||||
<a href="<?php echo get_author_posts_url( $post->post_author ); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
|
||||
</article>
|
||||
|
||||
<?php
|
||||
endwhile;
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
||||
|
||||
$post_section_two_args = array(
|
||||
'showposts' => 5,
|
||||
'offset' => 1,
|
||||
'category_name' => 'Tech',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'DESC',
|
||||
'post_type' => 'post',
|
||||
'post_status' => 'publish'
|
||||
);
|
||||
query_posts($post_section_two_args);
|
||||
if (have_posts()) : while (have_posts()) : the_post();
|
||||
$category = get_the_category()[0];
|
||||
$author = get_userdata( $post->post_author );
|
||||
?>
|
||||
<article class="st-article-section-sub-article">
|
||||
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
<div class="st-article-section-sub-article__text-container">
|
||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-sub-article__category-link"><?php echo $category->name; ?></a>
|
||||
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
<?php
|
||||
endwhile;
|
||||
endif; ?>
|
||||
<!-- TODO: Insert section sidebar here -->
|
||||
$category = get_the_category()[0];
|
||||
$author = get_userdata( $post->post_author );
|
||||
?>
|
||||
<article class="st-article-section-sub-article">
|
||||
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
<div class="st-article-section-sub-article__text-container">
|
||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-sub-article__category-link"><?php echo $category->name; ?></a>
|
||||
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
<?php
|
||||
endwhile;
|
||||
endif; ?>
|
||||
</section>
|
||||
<section class="st-newsletter-signup">
|
||||
<!-- TODO: Insert flat section for newsletter signup -->
|
||||
</section>
|
||||
<!-- PRODUCTS SECTION -->
|
||||
<section class="st-article-section">
|
||||
<h2 class="st-article-section-title">Products <a href="<?php echo home_url() . '/products'; ?>" class="st-article-section-category-link">></a></h2>
|
||||
<?php
|
||||
|
50
style.css
50
style.css
@ -308,6 +308,19 @@ COMPONENTS
|
||||
*/
|
||||
/* main article card */
|
||||
|
||||
.st-article-section,
|
||||
.st-ad-section {
|
||||
border-bottom: 1px #cec9c2 solid;
|
||||
padding-bottom: 2em;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.st-article-section:last-of-type,
|
||||
.st-ad-section:last-of-type {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.st-article-section-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -444,4 +457,41 @@ COMPONENTS
|
||||
.st-chip-primary:active {
|
||||
background: #FFF;
|
||||
color: #454545;
|
||||
}
|
||||
|
||||
/* ad section */
|
||||
|
||||
.st-ad-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.st-ad-section-shop-card {
|
||||
background-color: #FFDB12;
|
||||
margin-top: 1em;
|
||||
border-radius: 5px;
|
||||
padding: .3em .5em;
|
||||
padding-bottom: 0;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.st-ad-section-shop-card__title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 1.5rem;
|
||||
letter-spacing: 1px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.st-ad-section-shop-card-link {
|
||||
text-decoration: none;
|
||||
color: #414b4c;
|
||||
}
|
||||
|
||||
.st-ad-section-shop-card__img {
|
||||
max-width: 100%;
|
||||
margin-bottom: 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user