<?php // Stylesheets and scripts

function wp_rem_enqueues() {
    
    // Stylesheets
    wp_enqueue_style( 'sanitize', 'https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/5.0.0/sanitize.min.css' );
    //wp_enqueue_style( 'parent-main', get_template_directory_uri() . '/assets/dist/parent.css', array('sanitize') );
    
    // Scripts
    wp_enqueue_script( 'functions.js', get_template_directory_uri() . '/assets/js/scripts.js', array('jquery'), '', true );
    wp_enqueue_script( 'awesome', 'https://use.fontawesome.com/releases/v5.2.0/js/all.js', '', '', true );
    wp_enqueue_script( 'awesome-shim', 'https://use.fontawesome.com/releases/v5.2.0/js/v4-shims.js', '', '', true );
    wp_enqueue_script( 'masonary', 'https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js', '', '', true );
    
    
    if(is_home() || is_archive() || is_search()) {
        $blog_type = get_theme_mod( 'blog_type' );
        if($blog_type == 'blog-masonary') {
            wp_enqueue_script( 'blog', get_template_directory_uri() . '/assets/js/blog-masonary.js', '', true );
        }
    }
}
add_action( 'wp_enqueue_scripts', 'wp_rem_enqueues' );
// End