Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
erikyo committed Nov 5, 2023
1 parent 2bfd60d commit d007cdb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@
}

require_once MODULR_THEME_DIR . '/inc/theme-setup.php';
require_once MODULR_THEME_DIR . '/inc/enqueue-scripts.php';
require_once MODULR_THEME_DIR . '/inc/template-functions.php';
require_once MODULR_THEME_DIR . '/inc/customizer.php';
require_once MODULR_THEME_DIR . '/inc/sidebar.php';
require_once MODULR_THEME_DIR . '/inc/enqueue-scripts.php';
require_once MODULR_THEME_DIR . '/inc/enqueue-style.php';
require_once MODULR_THEME_DIR . '/inc/block-styles.php';
require_once MODULR_THEME_DIR . '/inc/enqueue-fonts.php';
require_once MODULR_THEME_DIR . '/inc/sidebar.php';
require_once MODULR_THEME_DIR . '/inc/block-styles.php';
require_once MODULR_THEME_DIR . '/inc/woocommerce.php';
4 changes: 2 additions & 2 deletions inc/enqueue-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function modul_r_theme_scripts() {
$asset = include MODULR_THEME_DIR . '/build/modulr-scripts.asset.php';

/* Register and Enqueue */
wp_enqueue_script( 'modul-r-scripts-main', MODULR_THEME_URL . '/build/modulr-scripts.js', $asset['dependencies'], $asset['version'] );
wp_enqueue_style( 'modul-r-scripts-main', MODULR_THEME_URL . '/build/modulr-scripts.css', $asset['dependencies'], $asset['version'] );
wp_enqueue_script( 'modul-r-scripts', MODULR_THEME_URL . '/build/modulr-scripts.js', $asset['dependencies'], $asset['version'], true );
wp_enqueue_style( 'modul-r-scripts', MODULR_THEME_URL . '/build/modulr-scripts.css', array(), $asset['version'] );
}
endif;
add_action( 'wp_enqueue_scripts', 'modul_r_theme_scripts' ); // Add Theme admin scripts
Expand Down
6 changes: 3 additions & 3 deletions inc/enqueue-style.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function modul_r_atf_css() {
$atf_css = ob_get_clean();

if ( ! empty( $atf_css ) ) {
echo '<style id="modul-r-above-the-fold">' . $atf_css . '</style>';
echo '<style id="modul-r-style-above-the-fold">' . $atf_css . '</style>';
}
}
endif;
Expand All @@ -22,7 +22,7 @@ function modul_r_atf_css() {
*/
if ( ! function_exists( 'modul_r_atf_style' ) ) :
function modul_r_atf_style() {
wp_enqueue_style( 'modul-r-above-the-fold', MODULR_THEME_URL . '/build/modulr-css-atf.css' );
wp_enqueue_style( 'modul-r-style-above-the-fold', MODULR_THEME_URL . '/build/modulr-css-atf.css' );
}
endif;

Expand All @@ -41,7 +41,7 @@ function modul_r_theme_style() {
*/
if ( ! function_exists( 'modul_r_admin_style' ) ) :
function modul_r_admin_style() {
wp_enqueue_style( 'modul-r-admin', MODULR_THEME_URL . '/build/modulr-css-admin.css' );
wp_enqueue_style( 'modul-r-style-admin', MODULR_THEME_URL . '/build/modulr-css-admin.css' );
}
endif;

Expand Down
8 changes: 4 additions & 4 deletions src/scripts/modules/grid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ export async function modulrGrid(): Promise< void > {
const clickedItemAnchor =
clickedItem.firstChild as HTMLAnchorElement;

const category = getLastElementFromHref(
clickedItemAnchor?.href
);

if ( clickedItem?.classList.contains( 'current-cat' ) ) {
toggleCategoryVisiblity( grid, null, forceGridAnimation );
// the main button cannot be disabled
Expand All @@ -114,6 +110,10 @@ export async function modulrGrid(): Promise< void > {
clickedItem.classList.remove( 'current-cat' );
gridButtons[ 0 ].classList.add( 'current-cat' );
} else {
const category = getLastElementFromHref(
clickedItemAnchor?.href
);

// remove the active class from sibling buttons
gridButtons.forEach( ( el ) => {
el.classList.remove( 'current-cat' );
Expand Down

0 comments on commit d007cdb

Please sign in to comment.