Resources presented as 5 columns. other post archives 3 column

This commit is contained in:
jorge 2022-03-30 21:14:48 +02:00
parent d009ca412d
commit a330d65f22
5 changed files with 62 additions and 63 deletions

View File

@ -32,7 +32,7 @@ endif;
if ( is_post_type_archive ( 'archive_resource' ) ) : if ( is_post_type_archive ( 'archive_resource' ) ) :
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130 //https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
get_template_part( 'template-parts/section', 'resources', array( 'custom_post_type' => 'archive_resource', 'post_per_page' => '10' ) ); get_template_part( 'template-parts/section', 'resources', array( 'post_per_page' => '10' ) );
elseif ( is_category( 'resources' ) ): elseif ( is_category( 'resources' ) ):
get_template_part( 'template-parts/section', 'categoryposts', array( 'category_name' => 'resources', 'post_per_page' => '10' ) ); get_template_part( 'template-parts/section', 'categoryposts', array( 'category_name' => 'resources', 'post_per_page' => '10' ) );

File diff suppressed because one or more lines are too long

View File

@ -1,18 +1,18 @@
//content { //content {
// general styles // general styles
//---------------- //----------------
// //
// mods on fonts and typography // mods on fonts and typography
// not in foundation variables // not in foundation variables
// ----------------------------- // -----------------------------
h1,h2,h3,h4,h5,h6, h1,h2,h3,h4,h5,h6,
.h1,.h2,.h3,.h4,.h4,.h5,.h6, .h1,.h2,.h3,.h4,.h4,.h5,.h6,
button,.button, button,.button,
header nav, header nav,
h1,h2,h3,h4,h5,h6, h1,h2,h3,h4,h5,h6,
.h1,.h2,.h3,.h4,.h4,.h5,.h6 { .h1,.h2,.h3,.h4,.h4,.h5,.h6 {
font-variant:all-small-caps; font-variant:all-small-caps;
@ -30,7 +30,7 @@
} }
} }
} }
// //
// main block // main block
//-------------- //--------------
@ -73,8 +73,8 @@
// //
// category view and news // category view and news
//-------------- //--------------
.category-posts { .category-posts,.archive-posts {
@include xy-grid; @include xy-grid;
header,main,aside { header,main,aside {
@include breakpoint(small){ @include breakpoint(small){
@ -129,7 +129,6 @@
line-height: 0.7; line-height: 0.7;
font-size: $global-font-size*1.5; font-size: $global-font-size*1.5;
} }
} }
} }
aside { aside {
@ -179,7 +178,7 @@
// //
// collections category // collections category
//-------------- //--------------
.collections-list { .collections-list {
@include xy-grid; @include xy-grid;
header,main,aside { header,main,aside {
@ -212,7 +211,7 @@
// end news & resources category // end news & resources category
// //
// partners // partners
// for big announcemnts // for big announcemnts
//--------------------- //---------------------
@ -268,14 +267,14 @@
width: 100vw; width: 100vw;
margin: 0; margin: 0;
&.widget_text p,.textwidget { &.widget_text p,.textwidget {
padding: $global-padding * 2; padding: $global-padding * 2;
} }
} }
@include breakpoint(medium){ @include breakpoint(medium){
&.widget_text p,.textwidget { &.widget_text p,.textwidget {
max-width: 50rem; max-width: 50rem;
margin:auto; margin:auto;
padding: $global-padding * 2; padding: $global-padding * 2;
font-size: $global-font-size*1.3; font-size: $global-font-size*1.3;
} }
} }
@ -295,19 +294,19 @@
} }
&.widget_text p,.textwidget { &.widget_text p,.textwidget {
font-size: $global-font-size*1.2; font-size: $global-font-size*1.2;
padding: $global-padding * 2; padding: $global-padding * 2;
} }
} }
@include breakpoint(xlarge){ @include breakpoint(xlarge){
&.widget_text p,.textwidget { &.widget_text p,.textwidget {
font-size: $global-font-size*1.3; font-size: $global-font-size*1.3;
padding: $global-padding*3; padding: $global-padding*3;
} }
} }
@include breakpoint(xxlarge){ @include breakpoint(xxlarge){
&.widget_text p,.textwidget { &.widget_text p,.textwidget {
font-size: $global-font-size*1.6; font-size: $global-font-size*1.6;
padding: $global-padding*3; padding: $global-padding*3;
} }
} }
&:nth-child(odd) { &:nth-child(odd) {
@ -353,7 +352,7 @@
} }
} }
} }
} }
//end hero //end hero
//} //}

View File

@ -1,18 +1,18 @@
//content { //content {
// general styles // general styles
//---------------- //----------------
// //
// mods on fonts and typography // mods on fonts and typography
// not in foundation variables // not in foundation variables
// ----------------------------- // -----------------------------
h1,h2,h3,h4,h5,h6, h1,h2,h3,h4,h5,h6,
.h1,.h2,.h3,.h4,.h4,.h5,.h6, .h1,.h2,.h3,.h4,.h4,.h5,.h6,
button,.button, button,.button,
header nav, header nav,
h1,h2,h3,h4,h5,h6, h1,h2,h3,h4,h5,h6,
.h1,.h2,.h3,.h4,.h4,.h5,.h6 { .h1,.h2,.h3,.h4,.h4,.h5,.h6 {
font-variant:all-small-caps; font-variant:all-small-caps;
@ -30,7 +30,7 @@
} }
} }
} }
// //
// main block // main block
//-------------- //--------------
@ -73,8 +73,8 @@
// //
// category view and news // category view and news
//-------------- //--------------
.category-posts { .category-posts,.archive-posts {
@include xy-grid; @include xy-grid;
header,main,aside { header,main,aside {
@include breakpoint(small){ @include breakpoint(small){
@ -129,7 +129,6 @@
line-height: 0.7; line-height: 0.7;
font-size: $global-font-size*1.5; font-size: $global-font-size*1.5;
} }
} }
} }
aside { aside {
@ -179,7 +178,7 @@
// //
// collections category // collections category
//-------------- //--------------
.collections-list { .collections-list {
@include xy-grid; @include xy-grid;
header,main,aside { header,main,aside {
@ -212,7 +211,7 @@
// end news & resources category // end news & resources category
// //
// partners // partners
// for big announcemnts // for big announcemnts
//--------------------- //---------------------
@ -268,14 +267,14 @@
width: 100vw; width: 100vw;
margin: 0; margin: 0;
&.widget_text p,.textwidget { &.widget_text p,.textwidget {
padding: $global-padding * 2; padding: $global-padding * 2;
} }
} }
@include breakpoint(medium){ @include breakpoint(medium){
&.widget_text p,.textwidget { &.widget_text p,.textwidget {
max-width: 50rem; max-width: 50rem;
margin:auto; margin:auto;
padding: $global-padding * 2; padding: $global-padding * 2;
font-size: $global-font-size*1.3; font-size: $global-font-size*1.3;
} }
} }
@ -295,19 +294,19 @@
} }
&.widget_text p,.textwidget { &.widget_text p,.textwidget {
font-size: $global-font-size*1.2; font-size: $global-font-size*1.2;
padding: $global-padding * 2; padding: $global-padding * 2;
} }
} }
@include breakpoint(xlarge){ @include breakpoint(xlarge){
&.widget_text p,.textwidget { &.widget_text p,.textwidget {
font-size: $global-font-size*1.3; font-size: $global-font-size*1.3;
padding: $global-padding*3; padding: $global-padding*3;
} }
} }
@include breakpoint(xxlarge){ @include breakpoint(xxlarge){
&.widget_text p,.textwidget { &.widget_text p,.textwidget {
font-size: $global-font-size*1.6; font-size: $global-font-size*1.6;
padding: $global-padding*3; padding: $global-padding*3;
} }
} }
&:nth-child(odd) { &:nth-child(odd) {
@ -353,7 +352,7 @@
} }
} }
} }
} }
//end hero //end hero
//} //}

View File

@ -13,18 +13,19 @@
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130 //https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
// var_dump( $args ); //will display everythin imported from // var_dump( $args ); //will display everythin imported from
// get_template_part( 'template-parts/section', 'category', array('category_name' => 'news', 'post_per_page' => '3' ) ); // get_template_part( 'template-parts/section', 'category', array('category_name' => 'news', 'post_per_page' => '3' ) );
$thiscustomposttype = $args['custom_post_type']; $thiscustomposttype = get_post_type( get_the_ID() );
$howmanyposts = $args['post_per_page']; $howmanyposts = $args['post_per_page'];
?> ?>
<section class="archive-resources"> <section class="archive-posts resources">
<header> <header>
<h2> <h2>
<?php <?php
if ( is_post_type_archive($thiscustomposttype) ): // if ( is_post_type_archive() ):
//post_type_archive_title(); post_type_archive_title();
else: // else:
echo $thiscustomposttype; // echo $thiscustomposttype;
endif;?> // endif;
?>
</h2> </h2>
</header> </header>
<main class=""> <main class="">