diff --git a/functions.php b/functions.php index d2abd02..477bd95 100644 --- a/functions.php +++ b/functions.php @@ -21,6 +21,9 @@ function trestle_theme_setup() { define( 'CHILD_THEME_URL', 'http://demo.mightyminnow.com/theme/trestle/' ); define( 'CHILD_THEME_VERSION', '1.0' ); + // Load theme text domain + load_theme_textdomain( 'trestle', get_template_directory() . '/languages'); + // Add HTML5 markup structure add_theme_support( 'html5' ); diff --git a/lib/admin/admin.php b/lib/admin/admin.php index 3591057..316982b 100644 --- a/lib/admin/admin.php +++ b/lib/admin/admin.php @@ -4,31 +4,50 @@ * * Modified from: http://www.billerickson.net/genesis-theme-options/ ===========================================*/ - + /** * Register Defaults * * @param array $defaults - * @return array modified defaults - * + * @return array $defaults updated defaults */ function trestle_custom_defaults( $defaults ) { - - $defaults['auto_nav'] = '0'; - $defaults['include_home_link'] = '1'; - $defaults['nav_extras'] = '1'; - + + // Trestle default key/value pairs + $trestle_defaults = array( + 'trestle_auto_nav' => '0', + 'trestle_include_home_link' => '0', + 'trestle_nav_button_text' => __( '[icon name="icon-list-ul"] Navigation', 'trestle' ), + ); + + // Populate Trestle settings with default values if they don't yet exist + $options = get_option( GENESIS_SETTINGS_FIELD ); + foreach ( $trestle_defaults as $k => $v ) { + + // Add defaults to Genesis default settings array + $defaults[$k] = $v; + + // Update actual options if they don't yet exist + if ( !array_key_exists( $k, $options ) ) + $options[$k] = $v; + + } + update_option( GENESIS_SETTINGS_FIELD, $options ); + + // Return modified default array return $defaults; } add_filter( 'genesis_theme_settings_defaults', 'trestle_custom_defaults' ); - + /** * Sanitization */ function trestle_register_social_sanitization_filters() { + + // No HTML genesis_add_option_filter( 'no_html', GENESIS_SETTINGS_FIELD, @@ -38,11 +57,12 @@ function trestle_register_social_sanitization_filters() { ) ); + // Safe HTML genesis_add_option_filter( 'safe_html', GENESIS_SETTINGS_FIELD, array( - 'footer_text', + 'nav_button_text', ) ); } @@ -65,6 +85,7 @@ function trestle_register_settings_box( $_genesis_theme_settings_pagehook ) { // Call our own custom nav metabox which combines our own settings with Genesis' add_meta_box('mm-navigation-settings', __( 'Navigation', 'trestle' ), 'trestle_navigation_settings_box', $_genesis_theme_settings_pagehook, 'main', 'high'); + } add_action('genesis_theme_settings_metaboxes', 'trestle_register_settings_box'); @@ -76,8 +97,12 @@ function trestle_navigation_settings_box() { ?>
- />
- />
+ />
+ />
+
+
+
[footer_childtheme_link before=""] by MIGHTYminnow
'; -} - -/*=========================================== - * Shortcodes -===========================================*/ \ No newline at end of file +} \ No newline at end of file diff --git a/style.css b/style.css index b780e44..8956d86 100644 --- a/style.css +++ b/style.css @@ -6,6 +6,8 @@ Author: MIGHTYminnow Author URI: http://www.mightyminnow.com/ Version: 1.0 + Tags: genesis, mobile, first, responsive, clean, black, orange, white, one-column, two-columns, three-columns, left-sidebar, right-sidebar, fixed-width, custom-menu, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready + Text Domain: trestle; */ /* Table of Contents @@ -277,13 +279,13 @@ h6 { } h1 { - font-size: 36px; - font-size: 3.6rem; + font-size: 28px; + font-size: 2.8rem; } h2 { - font-size: 30px; - font-size: 3rem; + font-size: 24px; + font-size: 2.4rem; } .entry-content h2 { @@ -291,20 +293,20 @@ h2 { } h3 { - font-size: 24px; - font-size: 2.4rem; -} - -h4 { font-size: 20px; font-size: 2rem; } -h5 { +h4 { font-size: 18px; font-size: 1.8rem; } +h5 { + font-size: 16px; + font-size: 1.6rem; +} + h6 { font-size: 16px; font-size: 1.6rem; @@ -421,7 +423,7 @@ input:hover[type="submit"], } .arrow-left:before { - content: "\f0a9\00a0\00a0"; + content: "\f0a8\00a0\00a0"; font-family: FontAwesome; } @@ -705,8 +707,6 @@ img.alignright, --------------------------------------------- */ .entry-title { - font-size: 36px; - font-size: 3.6rem; line-height: 1; } @@ -1545,7 +1545,41 @@ Media Queries } -@media only screen and (min-width: 768px) { +@media only screen and (min-width: 480px) { + + h1 { + font-size: 36px; + font-size: 3.6rem; + } + + h2 { + font-size: 30px; + font-size: 3rem; + } + + h3 { + font-size: 24px; + font-size: 2.4rem; + } + + h4 { + font-size: 20px; + font-size: 2rem; + } + + h5 { + font-size: 18px; + font-size: 1.8rem; + } + + h6 { + font-size: 16px; + font-size: 1.6rem; + } + +} + +@media (min-width: 768px) { body { background-color: #f5f5f5;