コード例 #1
0
ファイル: functions.php プロジェクト: ThemeButler/tbr-totem
function totem_enqueue_uikit_assets()
{
    // Enqueue uikit extra components
    beans_uikit_enqueue_components(array('flex'));
    // Enqueue uikit overwrite theme folder
    beans_uikit_enqueue_theme('totem', get_stylesheet_directory_uri() . '/assets/less/uikit');
    // Add the theme style as a uikit fragment to have access to all the variables
    beans_compiler_add_fragment('uikit', get_stylesheet_directory_uri() . '/assets/less/style.less', 'less');
}
コード例 #2
0
ファイル: assets.php プロジェクト: ThemeButler/tm-demo
/**
 * Enqueue UIKit components and Beans style.
 *
 * Beans style is enqueued with the UIKit components to have access to UIKit LESS variables.
 *
 * @since 1.0.0
 */
function beans_enqueue_uikit_components()
{
    $core = array('base', 'block', 'grid', 'article', 'comment', 'panel', 'nav', 'navbar', 'subnav', 'table', 'breadcrumb', 'pagination', 'list', 'form', 'button', 'badge', 'alert', 'dropdown', 'offcanvas', 'text', 'utility', 'icon');
    beans_uikit_enqueue_components($core);
    // Include uikit default theme.
    beans_uikit_enqueue_theme('default');
    // Enqueue uikit overwrite theme folder.
    beans_uikit_enqueue_theme('beans', BEANS_ASSETS_URL . 'less/uikit-overwrite');
    // Add the theme style as a uikit fragment to have access to all the variables.
    beans_compiler_add_fragment('uikit', BEANS_ASSETS_URL . 'less/style.less', 'less');
}
コード例 #3
0
ファイル: functions.php プロジェクト: ThemeButler/tbr-banks
function banks_enqueue_uikit_assets()
{
    // Enqueue uikit overwrite theme folder
    beans_uikit_enqueue_theme('banks', get_stylesheet_directory_uri() . '/assets/less/uikit');
    // Add the theme style as a uikit fragment to have access to all the variables
    beans_compiler_add_fragment('uikit', get_stylesheet_directory_uri() . '/assets/less/style.less', 'less');
    // Add the theme js as a uikit fragment
    beans_compiler_add_fragment('uikit', get_stylesheet_directory_uri() . '/assets/js/banks.js', 'js');
    // Include the uikit components needed
    beans_uikit_enqueue_components(array('contrast'));
}
コード例 #4
0
ファイル: functions.php プロジェクト: Getbeans/Beans
/**
 * Enqueue UIkit components.
 *
 * Enqueued components will be compiled into a single file. Refer to
 * {@link http://http://getuikit.com/ UIkit} to learn more about the available components.
 *
 * When development mode is enabled, files changes will automatically be detected. This makes it very easy
 * to style UIkit themes using LESS.
 *
 * This function must be called in the 'beans_uikit_enqueue_scripts' action hook.
 *
 * @since 1.0.0
 *
 * @param string|array $components Name of the component(s) to include as an indexed array. The name(s) must be
 *                                 the UIkit component filename without the extention (e.g. 'grid'). Set to true
 *                                 load all components.
 * @param string       $type       Optional. Type of UIkit components ('core' or 'add-ons').
 * @param bool         $autoload   Optional. Automatically include components dependencies.
 */
function beans_uikit_enqueue_components($components, $type = 'core', $autoload = true)
{
    global $_beans_uikit_enqueued_items;
    // Get all uikit components.
    if (true === $components) {
        $uikit = new _Beans_Uikit();
        $components = $uikit->get_all_components($type);
    } elseif ($autoload) {
        $uikit = new _Beans_Uikit();
        $autoloads = $uikit->get_autoload_components((array) $components);
        foreach ($autoloads as $autotype => $autoload) {
            beans_uikit_enqueue_components($autoload, $autotype, false);
        }
    }
    // Add components.
    $_beans_uikit_enqueued_items['components'][$type] = array_merge((array) $_beans_uikit_enqueued_items['components'][$type], (array) $components);
}
コード例 #5
0
ファイル: functions.php プロジェクト: ThemeButler/tm-site
function tbr_enque_uikit_global() {

  beans_uikit_enqueue_components( array( 'toggle', 'flex' ) );

}
コード例 #6
0
ファイル: front-page.php プロジェクト: ThemeButler/tm-site
function tbr_enque_uikit_page()
{
    beans_uikit_enqueue_components(array('overlay'));
}
コード例 #7
0
ファイル: page-contact.php プロジェクト: ThemeButler/tm-dfh
function dfh_enque_uikit_contact()
{
    beans_uikit_enqueue_components(array('article', 'contrast'));
}
コード例 #8
0
ファイル: page-random.php プロジェクト: ThemeButler/tm-dfh
function dfh_enque_uikit_page()
{
    beans_uikit_enqueue_components(array('article'));
}
コード例 #9
0
ファイル: search.php プロジェクト: ThemeButler/tm-site
function tbr_enque_uikit_search()
{
    beans_uikit_enqueue_components(array('list', 'badge', 'text', 'pagination'));
}
コード例 #10
0
function dfh_enque_uikit_single()
{
    beans_uikit_enqueue_components(array('thumbnail', 'overlay', 'modal', 'icon', 'subnav', 'article', 'cover'));
    beans_uikit_enqueue_components(array('lightbox', 'slidenav'), 'add-ons');
}
コード例 #11
0
function tbr_enque_uikit_theme_single() {

  beans_uikit_enqueue_components( array( 'article', 'overlay' ) );

}
コード例 #12
0
ファイル: page-speaking.php プロジェクト: ThemeButler/tm-dfh
function dfh_enque_uikit_speaking()
{
    beans_uikit_enqueue_components(array('article', 'cover'));
    beans_uikit_enqueue_components(array('accordion'), 'add-ons');
}
コード例 #13
0
ファイル: single-themes.php プロジェクト: ThemeButler/tm-site
function tbr_enque_uikit_theme_single() {

  beans_uikit_enqueue_components( array( 'article', 'close', 'icon', 'modal', 'overlay' ) );
  beans_uikit_enqueue_components( array( 'lightbox', 'slidenav' ), 'add-ons' );

}
コード例 #14
0
ファイル: page-about.php プロジェクト: ThemeButler/tm-dfh
function dfh_enque_uikit_page()
{
    beans_uikit_enqueue_components(array('article', 'cover'));
    beans_uikit_enqueue_components(array('progress'), 'add-ons');
}
コード例 #15
0
ファイル: functions.php プロジェクト: ThemeButler/tm-demo
function themebutler_enqueue_uikit_components()
{
    beans_uikit_enqueue_components(array('base', 'text', 'utility', 'dropdown', 'overlay', 'icon', 'animation', 'flex'));
}
コード例 #16
0
ファイル: single.php プロジェクト: ThemeButler/tm-site
function tbr_enque_uikit_blog_single()
{
    beans_uikit_enqueue_components(array('animation', 'subnav', 'comment', 'badge', 'list', 'article', 'pagination', 'modal', 'icon', 'overlay', 'close'));
    beans_uikit_enqueue_components(array('lightbox', 'slidenav'), 'add-ons');
}
コード例 #17
0
function tbr_enque_uikit_theme_single()
{
    beans_uikit_enqueue_components(array('article', 'overlay'));
    //beans_uikit_enqueue_components( array( 'tooltip' ), 'add-ons' );
}
コード例 #18
0
function tbr_enqueue_resources_uikit()
{
    beans_uikit_enqueue_components(array('grid'), 'add-ons');
}
コード例 #19
0
function dfh_enque_uikit_consulting()
{
    beans_uikit_enqueue_components(array('article'));
}