Tiny refactors
This commit is contained in:
parent
8cae10339b
commit
50c0d34498
|
@ -3,7 +3,7 @@ php -r '
|
|||
echo "\n ..::Tainacan Theme::..\n";
|
||||
|
||||
echo "\nInitiating the installation with composer ... please wait!!\n";
|
||||
echo "\Copying files ...\n";
|
||||
echo "Copying files ...\n";
|
||||
|
||||
echo "\nCopying Bootstrap Framework ...\n\n";
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
<?php $view_mode = get_query_var( 'tainacan_collections_viewmode' ); ?>
|
||||
|
||||
<!-- Get the banner to display -->
|
||||
<?php get_template_part( 'template-parts/bannerheader' ); ?>
|
||||
|
||||
|
@ -41,16 +43,16 @@
|
|||
<span class="d-none d-md-inline"><?php _e( 'View Mode', 'tainacan-interface' ); ?></span>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuViewMode">
|
||||
<a class="dropdown-item text-black <?php tainacan_active( get_query_var( 'tainacan_collections_viewmode' ), 'cards' ); ?>" href="<?php echo add_query_arg( 'tainacan_collections_viewmode', 'cards' ); ?>"><i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-viewcards text-oslo-gray"></i> <?php _e( 'Cards', 'tainacan-interface' ); ?></a>
|
||||
<a class="dropdown-item text-black <?php tainacan_active( get_query_var( 'tainacan_collections_viewmode' ), 'grid' ); ?>" href="<?php echo add_query_arg( 'tainacan_collections_viewmode', 'grid' ); ?>"><i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-viewminiature text-oslo-gray"></i> <?php _e( 'Thumbnails', 'tainacan-interface' ); ?></a>
|
||||
<a class="dropdown-item text-black <?php tainacan_active( get_query_var( 'tainacan_collections_viewmode' ), 'table' ); ?>" href="<?php echo add_query_arg( 'tainacan_collections_viewmode', 'table' ); ?>"><i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-viewtable text-oslo-gray"></i> <?php _e( 'Table', 'tainacan-interface' ); ?></a>
|
||||
<a class="dropdown-item text-black <?php tainacan_active( $view_mode, 'cards' ); ?>" href="<?php echo add_query_arg( 'tainacan_collections_viewmode', 'cards' ); ?>"><i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-viewcards text-oslo-gray"></i> <?php _e( 'Cards', 'tainacan-interface' ); ?></a>
|
||||
<a class="dropdown-item text-black <?php tainacan_active( $view_mode, 'grid' ); ?>" href="<?php echo add_query_arg( 'tainacan_collections_viewmode', 'grid' ); ?>"><i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-viewminiature text-oslo-gray"></i> <?php _e( 'Thumbnails', 'tainacan-interface' ); ?></a>
|
||||
<a class="dropdown-item text-black <?php tainacan_active( $view_mode, 'table' ); ?>" href="<?php echo add_query_arg( 'tainacan_collections_viewmode', 'table' ); ?>"><i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-viewtable text-oslo-gray"></i> <?php _e( 'Table', 'tainacan-interface' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form role="search" class="ml-auto" method="get" id="tainacan-collection-search">
|
||||
<input type="hidden" name="orderby" value="<?php echo get_query_var( 'orderby' ); ?>" />
|
||||
<input type="hidden" name="order" value="<?php echo get_query_var( 'order' ); ?>" />
|
||||
<input type="hidden" name="tainacan_collections_viewmode" value="<?php echo get_query_var( 'tainacan_collections_viewmode' ); ?>" />
|
||||
<input type="hidden" name="tainacan_collections_viewmode" value="<?php echo $view_mode; ?>" />
|
||||
<div class="input-group">
|
||||
<input class="form-control rounded-0" type="search" name="s" value="<?php echo get_query_var( 's' ); ?>" placeholder="<?php esc_attr_e( 'Search collections', 'tainacan-interface' ); ?>" />
|
||||
<span class="input-group-append">
|
||||
|
@ -62,7 +64,7 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<?php get_template_part( 'template-parts/loop-tainacan-collection', get_query_var( 'tainacan_collections_viewmode' ) ); ?>
|
||||
<?php get_template_part( 'template-parts/loop-tainacan-collection', $view_mode ); ?>
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
</main>
|
||||
|
|
|
@ -22,7 +22,6 @@ function fallbackCopyTextToClipboard(text) {
|
|||
}
|
||||
|
||||
function copyTextToClipboard(text) {
|
||||
|
||||
if (!navigator.clipboard) {
|
||||
fallbackCopyTextToClipboard(text);
|
||||
return;
|
||||
|
|
|
@ -3,7 +3,6 @@ jQuery( document ).ready(function( $ ) {
|
|||
$( 'body' ).removeClass('loading-content');
|
||||
|
||||
$( '#carouselExample' ).on( 'slide.bs.carousel', function ( e ) {
|
||||
|
||||
var $e = $( e.relatedTarget );
|
||||
var idx = $e.index();
|
||||
var itemsPerSlide = 3;
|
||||
|
|
|
@ -15,11 +15,8 @@ function tainacan_interface_the_breadcrumb() {
|
|||
$homeLink = esc_url( home_url() );
|
||||
|
||||
if (is_home() || is_front_page()) {
|
||||
|
||||
if ($showOnHome == 1) echo '<nav aria-label="breadcrumb" class="d-none d-md-flex mt-3 border-bottom-0 max-large margin-one-column"><a href="' . $homeLink . '">' . $home . '</a></nav>';
|
||||
|
||||
} else {
|
||||
|
||||
echo '<nav aria-label="breadcrumb" class="d-md-flex mt-3 mb-3 border-bottom-0 max-large margin-one-column"><a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' ';
|
||||
|
||||
if ( is_category() ) {
|
||||
|
|
|
@ -142,4 +142,3 @@ class TainacanThemeCollectionColor {
|
|||
}
|
||||
|
||||
new TainacanThemeCollectionColor();
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
if ( ! function_exists( 'tainacan_enqueues' ) ) {
|
||||
/**
|
||||
* Inclui os scripts javascript e os styles necessários ao front-end do thema
|
||||
* Inclui os scripts javascript e os styles necessários ao front-end do tema
|
||||
*/
|
||||
function tainacan_enqueues() {
|
||||
/**
|
||||
|
@ -65,7 +65,6 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) {
|
|||
'linkCopied' => __( 'Copied! Link sent to the transfer area.', 'tainacan-interface' )
|
||||
));
|
||||
|
||||
|
||||
// Tainacan Icons
|
||||
wp_register_style( 'TainacanIconsFont', get_template_directory_uri() . '/assets/fonts/tainacan-icons-font/css/tainacanicons.min.css', '', '1.0.3', '' );
|
||||
wp_enqueue_style( 'TainacanIconsFont' );
|
||||
|
@ -77,6 +76,6 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) {
|
|||
wp_enqueue_script( 'comment-reply' );
|
||||
}
|
||||
|
||||
}
|
||||
} // End if().
|
||||
} // tainacan_enqueues
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'tainacan_enqueues' );
|
||||
|
|
Loading…
Reference in New Issue