initialize collection list grid
This commit is contained in:
parent
cff9183846
commit
511ad6ee47
|
@ -9,15 +9,6 @@
|
|||
<div class="row">
|
||||
<div class="col col-sm mx-sm-auto">
|
||||
<div class="form-inline mt-4 tainacan-collection-list--simple-search">
|
||||
<?php //_e('Order by', 'tainacan-theme'); ?>
|
||||
<!-- <select class="custom-select" name="orderby">
|
||||
<option value="date" <?php //selected('date', get_query_var('orderby')); ?> >
|
||||
<?php //_e('Creation date', 'tainacan-theme'); ?>
|
||||
</option>
|
||||
<option value="title" <?php //selected('title', get_query_var('orderby')); ?> >
|
||||
<?php //_e('Title', 'tainacan-theme'); ?>
|
||||
</option>
|
||||
</select> -->
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="btn bg-white dropdown-toggle text-black" type="button" id="dropdownMenuSorting" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
@ -47,19 +38,6 @@
|
|||
<a class="dropdown-item <?php tainacan_active(get_query_var('tainacan_collections_viewmode'), 'grid'); ?>" href="<?php echo add_query_arg('tainacan_collections_viewmode', 'grid'); ?>"><?php _e('Grid', 'tainacan-theme'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php //_e('View Mode', 'tainacan-theme'); ?>
|
||||
<!-- <select class="custom-select" name="tainacan_collections_viewmode">
|
||||
<option value="table" <?php //selected('table', get_query_var('tainacan_collections_viewmode')); ?> >
|
||||
<?php //_e('Table', 'tainacan-theme'); ?>
|
||||
</option>
|
||||
<option value="cards" <?php //selected('cards', get_query_var('tainacan_collections_viewmode')); ?> >
|
||||
<?php //_e('Cards', 'tainacan-theme'); ?>
|
||||
</option>
|
||||
<option value="grid" <?php //selected('grid', get_query_var('tainacan_collections_viewmode')); ?> >
|
||||
<?php //_e('Grid', 'tainacan-theme'); ?>
|
||||
</option>
|
||||
</select> -->
|
||||
|
||||
<form role="search" class="ml-auto" method="get" id="tainacan-collection-search">
|
||||
<input type="hidden" name="orderby" value="<?php echo get_query_var('orderby'); ?>" />
|
||||
|
|
|
@ -120,6 +120,7 @@ if(!function_exists('tainacan_setup')) {
|
|||
*
|
||||
*/
|
||||
add_image_size( 'collection-list-table', 40, 40 );
|
||||
add_image_size( 'collection-list-grid', 250, 275 );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,34 +1,19 @@
|
|||
<?php if(have_posts()): ?>
|
||||
<div class="mt-5 tainacan-list-post">
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e('Miniature'); ?></th>
|
||||
<th scope="col"><?php _e('Title'); ?></th>
|
||||
<th scope="col"><?php _e('Author'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while(have_posts()): the_post(); ?>
|
||||
|
||||
<tr class="tainacan-list-collection" data-href="<?php the_permalink(); ?>">
|
||||
<td class="collection-miniature">
|
||||
<?php if ( has_post_thumbnail() && get_the_post_thumbnail_url(get_the_ID()) ) : ?>
|
||||
<a href="<?php the_permalink(); ?>" class="">
|
||||
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID(), 'collection-list-table') ?>" class="img-fluid rounded-circle" alt="">
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="collection-title"><a href="<?php the_permalink(); ?>" class=""><?php the_title(); ?></a></td>
|
||||
<td class="collection-create-by text-oslo-gray"><?php _e('Created by', 'tainacan-theme'); ?> <?php the_author_posts_link(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="tainacan-list-post">
|
||||
<div class="row">
|
||||
<?php while(have_posts()): the_post(); ?>
|
||||
<div class="col col-md-3 mt-5">
|
||||
<a class="tainacan-list-collection--grid" href="<?php the_permalink(); ?>">
|
||||
<p class="tainacan-list-collection--grid-title text-black">
|
||||
<?php the_title(); ?>
|
||||
</p>
|
||||
<?php if ( has_post_thumbnail() && get_the_post_thumbnail_url(get_the_ID()) ) : ?>
|
||||
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID(), 'collection-list-grid') ?>" class="img-fluid tainacan-list-collection--grid-img" alt="">
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo tainacan_pagination(3); ?>
|
||||
|
|
Loading…
Reference in New Issue