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

View File

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

View File

@ -13,18 +13,19 @@
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
// var_dump( $args ); //will display everythin imported from
// 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'];
?>
<section class="archive-resources">
<section class="archive-posts resources">
<header>
<h2>
<?php
if ( is_post_type_archive($thiscustomposttype) ):
//post_type_archive_title();
else:
echo $thiscustomposttype;
endif;?>
// if ( is_post_type_archive() ):
post_type_archive_title();
// else:
// echo $thiscustomposttype;
// endif;
?>
</h2>
</header>
<main class="">