Remove extra view modes

This commit is contained in:
Leo Germani 2018-07-26 17:31:32 -03:00
parent 690c14a36b
commit cb4834b8ed
9 changed files with 2 additions and 355 deletions

View File

@ -61,60 +61,14 @@ if(!function_exists('tainacan_setup')) {
'icon' => '<span class="icon"><i class="mdi mdi-apps mdi-24px"></i></span>', 'icon' => '<span class="icon"><i class="mdi mdi-apps mdi-24px"></i></span>',
'dynamic_metadata' => false, 'dynamic_metadata' => false,
]); ]);
tainacan_register_view_mode('mosaic', [
'label' => 'Mosaic',
'description' => 'A mosaic view',
'icon' => '<span class="icon"><i class="mdi mdi-view-quilt mdi-24px"></i></span>',
'dynamic_metadata' => false,
]);
tainacan_register_view_mode('frame', [
'label' => 'Frame',
'description' => 'A frame view, made for gallery expositions',
'icon' => '<span class="icon"><i class="mdi mdi-checkbox-intermediate mdi-24px"></i></span>',
'dynamic_metadata' => false,
]);
tainacan_register_view_mode('gallery', [
'label' => 'Gallery',
'description' => 'A framed view with metadata, made for gallery expositions',
'icon' => '<span class="icon"><i class="mdi mdi-bank mdi-24px"></i></span>',
'dynamic_metadata' => true,
]);
tainacan_register_view_mode('masonry', [ tainacan_register_view_mode('masonry', [
'label' => 'Masonry', 'label' => 'Masonry',
'description' => 'A masonry view', 'description' => 'A masonry view',
'icon' => '<span class="icon"><i class="mdi mdi-view-dashboard mdi-24px"></i></span>', 'icon' => '<span class="icon"><i class="mdi mdi-view-dashboard mdi-24px"></i></span>',
'dynamic_metadata' => false, 'dynamic_metadata' => false,
]); ]);
tainacan_register_view_mode('books', [
'label' => 'Books',
'description' => 'A books view, made for library visualizations',
'icon' => '<span class="icon"><i class="mdi mdi-library-books mdi-24px"></i></span>',
'dynamic_metadata' => false,
]);
tainacan_register_view_mode('polaroid', [
'label' => 'Polaroid',
'description' => 'A framed picture view, similar to polaroid photographs',
'icon' => '<span class="icon"><i class="mdi mdi-polaroid mdi-24px"></i></span>',
'dynamic_metadata' => true,
]);
tainacan_register_view_mode('profile', [
'label' => 'Profile',
'description' => 'A profile view, for displaying persons information',
'icon' => '<span class="icon"><i class="mdi mdi-account-card-details mdi-24px"></i></span>',
'dynamic_metadata' => true,
]);
tainacan_register_view_mode('document', [
'label' => 'Document',
'description' => 'A document view, for displaying papers and published research',
'icon' => '<span class="icon"><i class="mdi mdi-file-document mdi-24px"></i></span>',
'dynamic_metadata' => true,
]);
tainacan_register_view_mode('albums', [
'label' => 'Albums',
'description' => 'A musical albums view',
'icon' => '<span class="icon"><i class="mdi mdi-album mdi-24px"></i></span>',
'dynamic_metadata' => false,
]);
} }
add_image_size( 'tainacan-theme-list-post', 300, 200, true ); add_image_size( 'tainacan-theme-list-post', 300, 200, true );

View File

@ -1,31 +0,0 @@
<?php if (have_posts()): ?>
<div class="tainacan-albums-container">
<div class="row no-gutters">
<?php while (have_posts()): the_post(); ?>
<div class="col col-sm-12 col-md-6 col-lg-4 col-xl-3">
<div class="tainacan-album">
<a href="<?php the_permalink(); ?>">
<div class="cd" style="background-image: url('<?php the_post_thumbnail_url('medium'); ?>')"></div>
<?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('tainacan-medium'); ?>
<?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?>
</a>
<a href="<?php the_permalink(); ?>">
<p class="metadata-title"><?php the_title(); ?></p>
</a>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php else: ?>
<div class="tainacan-albums-container">
Nenhum item encontrado
</div>
<?php endif; ?>

View File

@ -1,30 +0,0 @@
<?php if (have_posts()): ?>
<div class="tainacan-books-container">
<div class="row no-gutters">
<?php while (have_posts()): the_post(); ?>
<div class="col col-sm-12 col-md-6 col-lg-4 col-xl-3">
<div class="tainacan-book">
<a href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?>
</a>
<a href="<?php the_permalink(); ?>">
<p class="metadata-title"><?php the_title(); ?></p>
</a>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php else: ?>
<div class="tainacan-books-container">
Nenhum item encontrado
</div>
<?php endif; ?>

View File

@ -1,46 +0,0 @@
<?php if (have_posts()): ?>
<div class="tainacan-document-container">
<div class="row no-gutters">
<?php while (have_posts()): the_post(); ?>
<div class="col col-md-12 col-lg-6 col-xl-4">
<div class="tainacan-document">
<?php if ( tainacan_current_view_displays('title') ): ?>
<p class="metadata-title">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</p>
<?php endif; ?>
<div class="media">
<div class="paper mr-4">
<?php if ( tainacan_current_view_displays('thumbnail') ): ?>
<a href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?>
</a>
<?php endif; ?>
</div>
<div class="list-metadata media-body">
<?php tainacan_the_metadata(array('metadata__in' => $view_mode_displayed_metadata['meta'], 'exclude_title' => true, 'before_title' => '<h3 class="metadata-label">', 'before_value' => '<p class="metadata-value">')); ?>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php else: ?>
<div class="tainacan-document-container">
Nenhum item encontrado
</div>
<?php endif; ?>

View File

@ -1,38 +0,0 @@
<?php if (have_posts()): ?>
<div class="tainacan-frame-container">
<div class="row no-gutters">
<?php while (have_posts()): the_post(); ?>
<div class="col">
<div class="tainacan-frame">
<a href="<?php the_permalink(); ?>">
<div class="frame">
<div class="mat">
<div class="art">
<?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?>
</div>
</div>
</div>
</a>
<p class="metadata-title">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</p>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php else: ?>
<div class="tainacan-frame-container">
Nenhum item encontrado
</div>
<?php endif; ?>

View File

@ -1,51 +0,0 @@
<?php if (have_posts()): ?>
<div class="tainacan-gallery-container">
<div class="row no-gutters">
<?php while (have_posts()): the_post(); ?>
<div class="col col-md-12 col-lg-6 col-xl-4">
<div class="tainacan-gallery">
<div class="media">
<?php if ( tainacan_current_view_displays('thumbnail') ): ?>
<a href="<?php the_permalink(); ?>">
<div class="frame">
<div class="mat">
<div class="art">
<?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?>
</div>
</div>
</div>
</a>
<?php endif; ?>
<div class="media-body pl-3">
<div class="list-metadata ">
<?php if ( tainacan_current_view_displays('title') ): ?>
<p class="metadata-title">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</p>
<?php endif; ?>
<?php tainacan_the_metadata(array('metadata__in' => $view_mode_displayed_metadata['meta'], 'exclude_title' => true, 'before_title' => '<h3 class="metadata-label">', 'before_value' => '<p class="metadata-value">')); ?>
</div>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php else: ?>
<div class="tainacan-gallery-container">
Nenhum item encontrado
</div>
<?php endif; ?>

View File

@ -1,28 +0,0 @@
<?php if (have_posts()): ?>
<div class="tainacan-mosaic-container card-columns">
<?php while (have_posts()): the_post(); ?>
<div class="tainacan-mosaic">
<a href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('large'); ?>
<?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?>
</a>
<a href="<?php the_permalink(); ?>">
<p class="metadata-title"><?php the_title(); ?></p>
</a>
</div>
<?php endwhile; ?>
</div>
<?php else: ?>
<div class="tainacan-mosaic-container">
Nenhum item encontrado
</div>
<?php endif; ?>

View File

@ -1,39 +0,0 @@
<?php if (have_posts()): ?>
<div class="tainacan-polaroid-container">
<div class="row no-gutters">
<?php while (have_posts()): the_post(); ?>
<div class="col">
<div class="tainacan-polaroid">
<?php if ( tainacan_current_view_displays('thumbnail') ): ?>
<a href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?>
</a>
<?php endif; ?>
<?php if ( tainacan_current_view_displays('title') ): ?>
<p class="metadata-title">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</p>
<?php endif; ?>
<div class="list-metadata">
<?php tainacan_the_metadata(array('metadata__in' => $view_mode_displayed_metadata['meta'], 'exclude_title' => true, 'before_title' => '<h3 class="metadata-label">', 'before_value' => '<p class="metadata-value">')); ?>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php else: ?>
<div class="tainacan-grid-container">
Nenhum item encontrado
</div>
<?php endif; ?>

View File

@ -1,44 +0,0 @@
<?php if (have_posts()): ?>
<div class="tainacan-profile-container">
<div class="row no-gutters">
<?php while (have_posts()): the_post(); ?>
<div class="col col-md-12 col-lg-6 col-xl-4">
<div class="tainacan-profile">
<div class="media">
<?php if ( tainacan_current_view_displays('thumbnail') ): ?>
<a href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('tainacan-medium', array('class' => 'mr-4')); ?>
<?php else: ?>
<?php echo '<div class="mr-4"><img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png"></div>'?>
<?php endif; ?>
</a>
<?php endif; ?>
<div class="list-metadata media-body">
<?php if ( tainacan_current_view_displays('title') ): ?>
<p class="metadata-title">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</p>
<?php endif; ?>
<?php tainacan_the_metadata(array('metadata__in' => $view_mode_displayed_metadata['meta'], 'exclude_title' => true, 'before_title' => '<h3 class="metadata-label">', 'before_value' => '<p class="metadata-value">')); ?>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php else: ?>
<div class="tainacan-profile-container">
Nenhum item encontrado
</div>
<?php endif; ?>