jcmrs / mk-nurture Goto Github PK
View Code? Open in Web Editor NEWNurture Child Theme for the Beans Framework
Home Page: https://mk-beans-jcmrs.c9users.io
Nurture Child Theme for the Beans Framework
Home Page: https://mk-beans-jcmrs.c9users.io
`// 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.
`// 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.
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
}
// 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 ),
) );
}
// 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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.