search results in columns

This commit is contained in:
jorge 2022-04-11 03:51:19 +02:00
parent 003f3443b2
commit 99f60a7ce4
4 changed files with 34 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -72,9 +72,21 @@ main {
// category view, news, search results // category view, news, search results
//-------------- //--------------
.category-posts,.archive-posts,.search-results { .category-posts,.archive-posts,.search-results-content {
@include xy-grid; @include xy-grid;
header,main,aside { header {
@include breakpoint(small){
@include xy-cell(12);
@include flex;
@include flex-align(center,top);
flex-direction: column;
align-items: center;
padding-top: $global-padding*3;
}
@include breakpoint(medium){
}
}
main,aside {
@include breakpoint(small){ @include breakpoint(small){
@include xy-cell(12); @include xy-cell(12);
@include flex; @include flex;
@ -171,7 +183,7 @@ main {
.search-results { .search-results {
article { article {
main { main {
.search-results-elements { .search-results-content {
h1,h2,h3,h4,h5,h6 { h1,h2,h3,h4,h5,h6 {
display: block; display: block;
} }

View File

@ -15,10 +15,11 @@
get_header(); ?> get_header(); ?>
<?php get_template_part( 'template-parts/announcement' ); ?>
<article> <article>
<main> <main>
<section class="search-results-elements"> <section class="search-results-content">
<header> <header>
<h4>search results for:</h4> <h4>search results for:</h4>
<h2> <h2>
@ -44,7 +45,7 @@ get_header(); ?>
</a> </a>
<?php endif;?> <?php endif;?>
<h5 class="date"> <h5 class="date">
<?php the_date('d.m.Y');?> <?php //the_date('d.m.Y');?>
</h5> </h5>
<h3 class="entry-title"> <h3 class="entry-title">
<a href="<?php the_permalink(); ?>" rel="bookmark"> <a href="<?php the_permalink(); ?>" rel="bookmark">
@ -65,11 +66,9 @@ get_header(); ?>
<!--a href="" class="button hollow">see more news</a--> <!--a href="" class="button hollow">see more news</a-->
</nav> </nav>
</aside> </aside>
<?php wp_reset_postdata(); ?>
<?php else : //if no post in query ?> <?php else : //if no post in query ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p> <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?> <?php endif; ?>
</main> </main>
</article>
<?php get_footer(); <?php get_footer();

View File

@ -72,9 +72,21 @@ main {
// category view, news, search results // category view, news, search results
//-------------- //--------------
.category-posts,.archive-posts,.search-results { .category-posts,.archive-posts,.search-results-content {
@include xy-grid; @include xy-grid;
header,main,aside { header {
@include breakpoint(small){
@include xy-cell(12);
@include flex;
@include flex-align(center,top);
flex-direction: column;
align-items: center;
padding-top: $global-padding*3;
}
@include breakpoint(medium){
}
}
main,aside {
@include breakpoint(small){ @include breakpoint(small){
@include xy-cell(12); @include xy-cell(12);
@include flex; @include flex;
@ -171,7 +183,7 @@ main {
.search-results { .search-results {
article { article {
main { main {
.search-results-elements { .search-results-content {
h1,h2,h3,h4,h5,h6 { h1,h2,h3,h4,h5,h6 {
display: block; display: block;
} }