Giter VIP home page Giter VIP logo

mk-nurture's People

Contributors

jcmrs avatar

Watchers

 avatar  avatar

mk-nurture's Issues

Dequeue components. Not working as expected.

`// Dequeue UIKit Components not in use.
add_action( 'beans_uikit_dequeue_components', 'mk_dequeue_uikit_components', 15 );

function mk_dequeue_uikit_components() {

beans_uikit_dequeue_components( array( 'table, badge, alert, overlay' ) );

}`

Not working as expected.

Header Bar revisions.

`// Add Header Bar
beans_add_smart_action( 'beans_header_before_markup', 'header_bar' );

// Strip the default styling for site_title_tag before giving it a new place. Add class attributes here, or within markup?
beans_remove_markup( 'beans_site_title_tag' );

// Style beans_site_title_tag
function header_bar() {

?>
<div class="tm-header-bar uk-block-muted">


    <div class="uk-container uk-container-center uk-text-justify">

        <div class="uk-grid" data-uk-grid-match data-uk-margin>
            <div class="uk-width-large-1-2 uk-width-medium-1-2 uk-text-primary uk-text-middle uk-text-left uk-text-center-small uk-text-break">
                <?php echo beans_site_title_tag(); ?>
            </div>
            <div class="uk-width-large-1-2 uk-width-medium-1-2 uk-text-right uk-text-middle uk-text-center-small">
                <a href="tel:1-408-555-5555">Call now to get your beans!</a>
            </div>
        </div>


    </div>

</div>
<?php

}

// Vertical align within tm-header.
beans_add_attribute( 'tm-site-branding', 'class', 'uk-vertical-align-middle');
beans_add_attribute( 'tm-primary-menu', 'class', 'uk-vertical-align-middle');
// Issues:
// Remove default navbar styling
// Replace with uk-button styles like http://getuikit.com/docs/subnav.html subnavpill
// Workaround via style.less - ugly hardcoded`

There's got to be a more elegant approach.

UIKit components loading check, output issue.

No output.

// Checking which UIkit components are loading. Fancy.
add_action( 'beans_body_append_markup', 'example_fancy_uikit_components' );

function example_fancy_uikit_components() {

    // Stop here if Beans is not in dev mode.
    if ( !get_option( 'beans_dev_mode', false ) ) {
        return;
    }

    global $_beans_uikit_enqueued_items;

    ?>
    <a href="#example-uikit-list" class="uk-button-text uk-float-right uk-margin-right uk-margin-bottom" data-uk-offcanvas=""><i class="uk-icon-cog uk-margin-small-right"></i>UIkit components</a>
    <div id="example-uikit-list" class="uk-offcanvas">
        <div class="uk-offcanvas-bar uk-offcanvas-bar-flip">
            <ul class="uk-nav uk-nav-offcanvas uk-nav-parent-icon" data-uk-nav="{multiple:true}">
                <li class="uk-nav-header">UIkit components</li>
                <li class="uk-parent uk-active">
                    <a href="#">Core</a>
                    <ul class="uk-nav-sub">
                        <?php foreach ( $_beans_uikit_enqueued_items['components']['core'] as $core ) : ?>
                            <li><a href="#"><?php echo $core; ?></a></li>
                        <?php endforeach; ?>
                    </ul>
                </li>
                <li class="uk-parent uk-active">
                    <a href="#">Add-ons</a>
                    <ul class="uk-nav-sub">
                        <?php foreach ( $_beans_uikit_enqueued_items['components']['add-ons'] as $addons ) : ?>
                            <li><a href="#"><?php echo $addons; ?></a></li>
                        <?php endforeach; ?>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <?php

}

Featured Image. Default size.

// Change default featured image size.
// Issues: Yet no matter what I try, featured image still remains too small (max-width from small_args?), below device breakpoints too big. Regardless of functions, there appears to be a conflict. Post_image still gets attributes from elsewhere.

add_filter( 'beans_edit_post_image_args', 'mk_post_image_edit_args' );
function mk_post_image_edit_args( $args ) {
    return array_merge( $args, array(
        'resize' => array( 1600, 300, true ),
    ) );
}
add_filter( 'beans_edit_post_image_medium_args', 'mk_post_image_medium_args' );
function mk_post_image_medium_args( $args ) {
    return array_merge( $args, array(
        'resize' => array( 1200, 300, true ),
    ) );
}
add_filter( 'beans_edit_post_image_small_args', 'mk_post_image_small_args' );
function mk_post_image_small_args( $args ) {
    return array_merge( $args, array(
        'resize' => array( 800, 300, true ),
    ) );
}

Back to Top. But not all the way.

// Add Back to Top. Figure out why it doesn't scroll back all the way to the top! beans_add_attribute( 'beans_body', 'id', 'mk-top' ); // beans_add_attribute( 'tm_header_bar', 'id', 'mk-top' );

Conflict with added Header Bar?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.