diff --git a/functions.php b/functions.php index 487325f..2ccf2ae 100644 --- a/functions.php +++ b/functions.php @@ -8,7 +8,7 @@ include_once( get_template_directory() . '/lib/init.php' ); // Other includes -require_once dirname( __FILE__ ) . '/includes/admin.php'; +require_once dirname( __FILE__ ) . '/includes/admin/admin.php'; // Child theme (do not remove) define( 'CHILD_THEME_NAME', 'Trestle' ); @@ -32,16 +32,25 @@ add_theme_support( 'genesis-footer-widgets', 3 ); * Header styles and scripts ===========================================*/ -function header_actions() { +function trestle_header_actions() { // Google fonts wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,700' ); // Custom jQuery - wp_enqueue_script( 'trestle_jquery', get_stylesheet_directory_uri() . '/includes/trestle-jquery.js', array( 'jquery' ), '1.0', true ); + wp_enqueue_script( 'trestle_jquery', get_stylesheet_directory_uri() . '/includes/js/trestle-jquery.js', array( 'jquery' ), '1.0', true ); } -add_action( 'wp_enqueue_scripts', 'header_actions'); +add_action( 'wp_enqueue_scripts', 'trestle_header_actions'); + + +/*=========================================== + * Admin styles and scripts +===========================================*/ +function trestle_admin_actions() { + add_editor_style( get_stylesheet_directory_uri() . '/includes/admin/admin.css' ); +} +add_action( 'init', 'trestle_admin_actions' ); /*=========================================== @@ -51,10 +60,10 @@ add_action( 'wp_enqueue_scripts', 'header_actions'); ===========================================*/ // Include plugin activation class -require_once dirname( __FILE__ ) . '/includes/class-tgm-plugin-activation.php'; +require_once dirname( __FILE__ ) . '/includes/classes/class-tgm-plugin-activation.php'; // Fetch & install plugins from wordpress.org -function register_required_plugins() { +function trestle_register_required_plugins() { $plugins = array( @@ -84,6 +93,12 @@ function register_required_plugins() { 'required' => true, ), + array( + 'name' => 'Genesis Featured Widget Amplified', + 'slug' => 'genesis-featured-widget-amplified', + 'required' => true, + ), + array( 'name' => 'Genesis Simple Edits', 'slug' => 'genesis-simple-edits', @@ -126,12 +141,6 @@ function register_required_plugins() { 'required' => true, ), - array( - 'name' => 'Genesis Featured Widget Amplified', - 'slug' => 'genesis-featured-widget-amplified', - 'required' => true, - ), - array( 'name' => 'Respond.js', 'slug' => 'respondjs', @@ -144,6 +153,12 @@ function register_required_plugins() { 'required' => true, ), + array( + 'name' => 'Simple Section Navigation', + 'slug' => 'simple-section-navigation', + 'required' => true, + ), + array( 'name' => 'Types - Custom Fields and Custom Post Types Management', 'slug' => 'types', @@ -196,7 +211,7 @@ function register_required_plugins() { tgmpa( $plugins, $config ); } -add_action( 'tgmpa_register', 'register_required_plugins' ); +add_action( 'tgmpa_register', 'trestle_register_required_plugins' ); /*=========================================== @@ -253,6 +268,11 @@ function trestle_nav_modifications() { add_action( 'init', 'trestle_nav_modifications' ); +/*=========================================== + * Actions & Filters +===========================================*/ + + /*=========================================== * Footer ===========================================*/ @@ -260,6 +280,8 @@ function trestle_custom_footer($output) { return $output . '
[footer_childtheme_link before=""] by MIGHTYminnow
'; } add_filter( 'genesis_footer_output', 'trestle_custom_footer' ); + + /*=========================================== * Shortcodes ===========================================*/ \ No newline at end of file diff --git a/images/application_pdf.gif b/images/application_pdf.gif new file mode 100644 index 0000000..5bfad3c Binary files /dev/null and b/images/application_pdf.gif differ diff --git a/images/doc.png b/images/doc.png new file mode 100644 index 0000000..e49b202 Binary files /dev/null and b/images/doc.png differ diff --git a/images/email.png b/images/email.png new file mode 100644 index 0000000..9fd938e Binary files /dev/null and b/images/email.png differ diff --git a/images/external.png b/images/external.png new file mode 100644 index 0000000..28631e5 Binary files /dev/null and b/images/external.png differ diff --git a/images/facebook.gif b/images/facebook.gif new file mode 100644 index 0000000..1efa587 Binary files /dev/null and b/images/facebook.gif differ diff --git a/images/pdf.png b/images/pdf.png new file mode 100644 index 0000000..ad9e2f4 Binary files /dev/null and b/images/pdf.png differ diff --git a/images/sidebar-doc.png b/images/sidebar-doc.png new file mode 100644 index 0000000..037b7ef Binary files /dev/null and b/images/sidebar-doc.png differ diff --git a/images/word.png b/images/word.png new file mode 100644 index 0000000..3c99bd2 Binary files /dev/null and b/images/word.png differ diff --git a/includes/admin.php b/includes/admin/admin.php similarity index 100% rename from includes/admin.php rename to includes/admin/admin.php diff --git a/includes/class-tgm-plugin-activation.php b/includes/classes/class-tgm-plugin-activation.php similarity index 100% rename from includes/class-tgm-plugin-activation.php rename to includes/classes/class-tgm-plugin-activation.php diff --git a/includes/js/trestle-jquery.js b/includes/js/trestle-jquery.js new file mode 100644 index 0000000..ba8e2e9 --- /dev/null +++ b/includes/js/trestle-jquery.js @@ -0,0 +1,53 @@ +// as the page loads, cal these scripts +jQuery(document).ready(function() { + + var h = window.location.host.toLowerCase(); + jQuery("a[href^='http']:not([href*='" + h + "']), a[href$='.pdf'], a[hrefjQuery$='.mp3'], a[href$='.m4a'], a[href$='.wav']").attr("target", "_blank"); + + // External Links + jQuery("a[href^='http://']:not([href*='" + h + "'])").addClass("externalLink"); + jQuery("a[href^='https://']:not([href*='" + h + "'])").addClass("externalLink"); + jQuery("img").parent().removeClass("externalLink"); + + // Add classes to different types of media links + jQuery('a[href^="mailto:"]').addClass('emailLink'); + jQuery('a[href*=".pdf"]').attr({"target":"_blank"}).addClass('pdfLink'); + jQuery('a[href*=".doc"]').attr({"target":"_blank"}).addClass('docLink'); + jQuery('img').parent('a').addClass('imageLink'); + + // Add classes to parts of lists + jQuery('li:last-child').addClass('last'); + jQuery('li:first-child').addClass('first'); + jQuery('ul, ol').parent('li').addClass('parent'); + + // Mobile navigation button + jQuery('#menu-button').click(function() { + var button = jQuery(this); + button.toggleClass('open'); + jQuery('.menu-primary').slideToggle(); + }); + + // Mobile navigation icons + var closedIcon = '+'; + var openIcon = '-'; + + jQuery('.genesis-nav-menu .parent:not(.current-menu-item, .current_page_item, .current_page_parent, .current_page_ancestor) > a').after('' + closedIcon + ''); + jQuery('.genesis-nav-menu .parent.current-menu-item > a, .genesis-nav-menu .parent.current_page_item > a, .genesis-nav-menu .parent.current_page_parent > a, .genesis-nav-menu .parent.current_page_ancestor > a').after('' + openIcon + ''); + + // Mobile navigation expand/contract functionality + jQuery('.sub-icon').click(function() { + var icon = jQuery(this); + icon.next('ul').slideToggle(); + if ( icon.text().indexOf( closedIcon ) !== -1 ) + icon.text(openIcon); + else if ( icon.text().indexOf( openIcon ) !== -1 ) + icon.text(closedIcon); + }); + +}); /* end of as page load scripts */ + + +// executes when complete page is fully loaded, including all frames, objects and images +jQuery(window).load(function() { + +}); \ No newline at end of file diff --git a/style.css b/style.css index 5a87d32..9656bf3 100644 --- a/style.css +++ b/style.css @@ -173,6 +173,40 @@ a img { margin-bottom: -0.4rem; } +a.emailLink:before { + content: url(/wp-content/themes/trestle/images/email.png); + margin: 0 4px 0 0; + white-space: nowrap; +} + +a.pdfLink:before { + content: url(/wp-content/themes/trestle/images/pdf.png); + margin: 0 4px 0 0; + white-space: nowrap; +} + +a.docLink:before { + content: url(/wp-content/themes/trestle/images/doc.png); + margin: 0 4px 0 0; + white-space: nowrap; +} + +a.externalLink:after { + content: url(/wp-content/themes/trestle/images/external.png); + margin: 0 0 0 4px; + white-space: nowrap; +} + +a.imageLink, +a.imageLink:hover { + border-bottom: none !important; + text-decoration: none !important; +} + +a.imageLink:before { + display: none; +} + a:hover { color: #333; } @@ -199,19 +233,21 @@ blockquote::before { } blockquote { - margin: 40px 40px 24px; - margin: 4rem 4rem 2.4rem; + margin: 20px 40px 24px 55px; + margin: 2rem 4rem 2.4rem 5.5rem; } blockquote::before { content: "\201C"; display: block; - font-size: 30px; - font-size: 3rem; + font-family: Georgia; + font-size: 60px; + font-size: 6rem; + line-height: 1; height: 0; - left: -20px; + left: -30px; position: relative; - top: -10px; + top: 0px; } .entry-content code { @@ -300,8 +336,8 @@ textarea { color: #999; font-size: 14px; font-size: 1.4rem; - padding: 15px; - padding: 1.5rem; + padding: 16px; + padding: 1.6rem; width: 100%; } @@ -327,7 +363,7 @@ input[type="submit"], .button, .entry-content .button { background-color: #333; - border: none; + border: 1px solid #333; box-shadow: none; color: #fff; cursor: pointer; @@ -344,6 +380,7 @@ input:hover[type="submit"], .button:hover, .entry-content .button:hover { background-color: #f15123; + border-color: #f15123; } .entry-content .button:hover { @@ -931,8 +968,7 @@ Site Navigation .genesis-nav-menu .sub-menu a, .genesis-nav-menu ul a { - border: 1px solid #eee; - border-bottom: none; + border-top: 1px solid #eee; padding: 10px 20px; padding: 1rem 2rem; position: relative; diff --git a/trestle.sublime-project b/trestle.sublime-project new file mode 100644 index 0000000..92d0344 --- /dev/null +++ b/trestle.sublime-project @@ -0,0 +1,8 @@ +{ + "folders": + [ + { + "path": "/Users/Mickey/Sites/MNC" + } + ] +} diff --git a/trestle.sublime-workspace b/trestle.sublime-workspace new file mode 100644 index 0000000..da814b5 --- /dev/null +++ b/trestle.sublime-workspace @@ -0,0 +1,1070 @@ +{ + "auto_complete": + { + "selected_items": + [ + [ + "geneis", + "genesis-nav-menu" + ], + [ + "gene", + "genesis-nav-menu" + ], + [ + "curr", + "current_page_ancestor" + ], + [ + "margin-", + "margin-top" + ], + [ + "get_stylesh", + "get_stylesheet_uri" + ], + [ + "wp_enqu", + "wp_enqueue_script" + ], + [ + "tex", + "text-align" + ], + [ + "comm-h", + "comm-section-header Comment - Section header comment" + ], + [ + "comm-s", + "comm-subsection Comment - Subsection comment" + ], + [ + "wp_en", + "wp_enqueue_style" + ], + [ + "wp_enqueue_", + "wp_enqueue_scripts" + ], + [ + "comm", + "comm-section-header Comment - Section header comment" + ], + [ + "rec", + "recaptcha_table" + ], + [ + "block", + "blockquote" + ], + [ + "box", + "box CSS - box-sizing: border-box;" + ], + [ + "med", + "med CSS - @media {}" + ], + [ + "back", + "background-color" + ], + [ + "ex", + "exclude_ids" + ], + [ + "backgrou", + "background-color" + ], + [ + "text", + "text-align" + ], + [ + "menu", + "menu-button" + ], + [ + "font", + "font-family" + ], + [ + "font-", + "font-size" + ], + [ + "mar", + "margin-top" + ], + [ + "trans", + "transition CSS - transition: ;" + ], + [ + "bac", + "background-color" + ], + [ + "ba", + "background-color" + ], + [ + "Font", + "FontAwesome" + ], + [ + "po", + "post_terms" + ], + [ + "terms", + "terms_to_check" + ], + [ + "fon", + "font-family" + ], + [ + "no", + "normal" + ], + [ + "medi", + "media-list" + ], + [ + "backg", + "background-color" + ], + [ + "backgr", + "background-color" + ], + [ + "in", + "inl CSS - display: inline-block;" + ], + [ + "content-sideba", + "content-sidebar-wrap" + ], + [ + "tran", + "transparent" + ], + [ + "inline", + "inline-block" + ], + [ + "list-st", + "list-style-type" + ], + [ + "bacl", + "background-color" + ], + [ + "tra", + "transparent" + ], + [ + "max-", + "max-width" + ], + [ + "max-w", + "max-width" + ], + [ + "blac", + "black-studio-tinymce-20" + ], + [ + "ez", + "ez-home-top-3" + ], + [ + "ez-", + "ez-home-top-2" + ], + [ + "border", + "border-box" + ], + [ + "id", + "idClass" + ], + [ + "fu", + "function" + ], + [ + "body", + "bodyClasses" + ], + [ + "m", + "middle" + ], + [ + "20px", + "20px" + ], + [ + "case-st", + "case-study-category" + ], + [ + "tabe", + "table-cell" + ], + [ + "san", + "sans-serif" + ], + [ + "list-", + "list-style-type" + ], + [ + "ser", + "services" + ], + [ + "table-", + "table-cell" + ], + [ + "rig", + "right" + ], + [ + "gfo", + "gform_wrapper" + ], + [ + "first", + "first-child" + ], + [ + "abs", + "absolute" + ], + [ + "rel", + "relative" + ], + [ + "backgour", + "background-color" + ], + [ + "current", + "current_page_item" + ], + [ + "table", + "table-cell" + ], + [ + "di", + "display" + ], + [ + "fir", + "first-child" + ], + [ + "blo", + "block" + ], + [ + "gform", + "gform_body" + ], + [ + "bottom", + "margin-bottom" + ], + [ + "bor", + "border" + ], + [ + "j", + "jQuery" + ], + [ + "im", + "background-image" + ] + ] + }, + "buffers": + [ + ], + "build_system": "", + "command_palette": + { + "height": 27.0, + "selected_items": + [ + [ + "Snippet: heade", + "Snippet: header comment" + ], + [ + "instal", + "Package Control: Install Package" + ], + [ + "sftp", + "Set Syntax: SFTP Output Panel" + ], + [ + "mini", + "Minify Javascript" + ], + [ + "ins", + "Package Control: Install Package" + ], + [ + "livereload: en", + "LiveReload: Enable/disable plug-ins" + ], + [ + "pack", + "Package Control: List Packages" + ], + [ + "pakc", + "Package Control: Disable Package" + ], + [ + "packa", + "Package Control: List Packages" + ], + [ + "package", + "Package Control: List Packages" + ], + [ + "install", + "Package Control: Install Package" + ], + [ + "loc", + "Local History: Incremental Diff" + ], + [ + "local ", + "Local History: Open" + ], + [ + "hi", + "Local History: Compare" + ], + [ + "local", + "Local History: Compare" + ], + [ + "loca", + "Local History: Compare" + ], + [ + "insta", + "Package Control: Install Package" + ], + [ + "inst", + "Package Control: Install Package" + ], + [ + "clip", + "Clipboard History" + ], + [ + "Snippet: gd", + "Snippet: Cross-browser vertical linear gradient" + ], + [ + "remov", + "Package Control: Remove Package" + ], + [ + "remo", + "Package Control: Remove Package" + ], + [ + "prefixr", + "Preferences: Prefixr Key Bindings – Default" + ], + [ + "list", + "Package Control: List Packages" + ], + [ + "packages", + "Package Control: List Packages" + ], + [ + "css", + "Set Syntax: CSS" + ], + [ + "snippet", + "Snippet: Lorem ipsum" + ], + [ + "snippe", + "Snippet: #!/usr/bin/env" + ], + [ + "align", + "Preferences: Alignment Key Bindings – Default" + ], + [ + "prefix", + "Preferences: Alignment File Settings – Syntax Specific – User" + ], + [ + "ali", + "Preferences: Alignment Key Bindings – Default" + ] + ], + "width": 593.0 + }, + "console": + { + "height": 146.0 + }, + "distraction_free": + { + "menu_visible": true, + "show_minimap": false, + "show_open_files": false, + "show_tabs": false, + "side_bar_visible": false, + "status_bar_visible": false + }, + "file_history": + [ + "/Users/Mickey/Sites/MNC/wp-content/themes/trestle/style.css", + "/var/folders/7c/wy3nqkpx2k36t1rn81tcd2tr0000gq/T/sublime-sftp-browse-1381162921/mapped/mnc/wp-content/themes/genesis/lib/structure/header.php", + "/Users/Mickey/Sites/MNC/wp-content/themes/genesis/lib/structure/footer.php", + "/Users/Mickey/Sites/MNC/wp-content/themes/Mm-mobile-first-genesis-theme/includes/class-tgm-plugin-activation.php", + "/Users/Mickey/Sites/MNC/wp-content/plugins/genesis-nav-menu-amplified/admin.php", + "/Users/Mickey/Sites/MNC/wp-content/themes/genesis/header.php", + "/Users/Mickey/Sites/MNC/wp-config.php", + "/Users/Mickey/Sites/MNC/wp-content/plugins/genesis-nav-menu-amplified/structure.php", + "/Users/Mickey/Sites/MNC/wp-content/themes/genesis/lib/structure/menu.php", + "/Users/Mickey/Sites/MNC/wp-content/themes/Mm-mobile-first-genesis-theme/includes/mm-jquery.js", + "/Users/Mickey/Sites/MNC/wp-content/themes/genesis/footer.php", + "/Users/Mickey/Sites/MNC/wp-content/themes/Mm-mobile-first-genesis-theme/includes/admin.php", + "/Users/Mickey/Sites/MNC/wp-content/themes/Mm-mobile-first-genesis-theme/functions.php", + "/Users/Mickey/Sites/MNC/wp-content/themes/Mm-mobile-first-genesis-theme/style.css", + "/Users/Mickey/Sites/MNC/wp-content/themes/Mm-mobile-first-genesis-theme/includes/jquery.js", + "/Users/Mickey/Library/Application Support/Sublime Text 2/Packages/User/header comment.sublime-snippet", + "/Users/Mickey/Sites/MNC/wp-content/themes/genesis-mobile-first-mnc/functions.php", + "/Users/Mickey/Sites/MNC/sftp-config.json", + "/Users/Mickey/Sites/MNC/wp-content/themes/genesis-mobile-first-mnc/style.css", + "/Users/Mickey/Sites/MNC/wp-content/themes/genesis-mobile-first-mnc/screenshot.png", + "/Users/Mickey/Library/Application Support/Sublime Text 2/Packages/User/SFTP.sublime-settings", + "/Users/Mickey/Library/Application Support/Sublime Text 2/Packages/SFTP/SFTP.sublime-settings", + "/Users/Mickey/Sites/Drake's/wp-content/themes/drakes/functions.php", + "/Users/Mickey/Sites/Drake's/wp-content/themes/drakes/style.css", + "/Users/Mickey/Sites/Drake's/wp-content/themes/drakes/jquery-scripts.js", + "/Users/Mickey/Sites/Drake's/wp-config.php", + "/Users/Mickey/Sites/Drake's/wp-content/plugins/age-verify/age-verify.php", + "/Users/Mickey/Sites/Drake's/wp-content/plugins/age-verify/functions.php", + "/Users/Mickey/Sites/Drake's/wp-content/uploads/dynamik-gen/theme/custom-functions.php", + "/Users/Mickey/Sites/Drake's/wp-content/themes/drakes/page_archive.php", + "/Users/Mickey/Sites/Drake's/sftp-config.json", + "/Users/Mickey/Sites/Drake's/wp-content/plugins/flickr-gallery/flightbox/jquery.flightbox.js", + "/Users/Mickey/Sites/Drake's/wp-content/plugins/flickr-gallery/phpFlickr.php", + "/Users/Mickey/Sites/Drake's/wp-content/themes/drakes/html5-placeholder-polyfill.min.js", + "/Users/Mickey/Sites/Drake's/wp-content/themes/drakes/html5-placeholder-polyfill.js", + "/Users/Mickey/Sites/Drake's/wp-content/uploads/dynamik-gen/404.php", + "/Users/Mickey/Sites/1 General/CODE/wp_list_pages exclude:include based on title.php", + "/var/folders/7c/wy3nqkpx2k36t1rn81tcd2tr0000gq/T/sublime-sftp-browse-1371760971/mapped/drakes.mightyminnow.com/wp-content/themes/genesis/page_archive.php", + "/var/folders/7c/wy3nqkpx2k36t1rn81tcd2tr0000gq/T/sublime-sftp-browse-1371760913/mapped/drakes.mightyminnow.com/wp-content/themes/dynamik-gen/archive.php", + "/var/folders/7c/wy3nqkpx2k36t1rn81tcd2tr0000gq/T/sublime-sftp-browse-1371752460/mapped/drakes.mightyminnow.com/.htaccess", + "/Users/Mickey/Sites/Drake's/wp-content/plugins/genesis-nav-menu-amplified/structure.php", + "/Users/Mickey/Sites/Drake's/wp-content/themes/drakes/functions-wp_nav_menu.php", + "/Users/Mickey/Sites/Drake's/wp-content/plugins/responsive-select-menu/responsive-select-menu.php", + "/var/folders/7c/wy3nqkpx2k36t1rn81tcd2tr0000gq/T/sublime-sftp-browse-1370303068/mapped/drakes.mightyminnow.com/wp-content/plugins/genesis-nav-menu-amplified/plugin.php", + "/var/folders/7c/wy3nqkpx2k36t1rn81tcd2tr0000gq/T/sublime-sftp-browse-1370295189/mapped/drakes.mightyminnow.com/wp-content/plugins/responsive-select-menu/responsive-select-menu.php", + "/var/folders/7c/wy3nqkpx2k36t1rn81tcd2tr0000gq/T/sublime-sftp-browse-1369952510/mapped/drakes.mightyminnow.com/wp-content/plugins/responsive-select-menu/responsive-select-menu.php", + "/var/folders/7c/wy3nqkpx2k36t1rn81tcd2tr0000gq/T/sublime-sftp-browse-1369952568/mapped/drakes.mightyminnow.com/wp-content/plugins/responsive-select-menu/sparkoptions/sparkoptions.js", + "/Users/Mickey/Sites/Drake's/wp-content/themes/drakes/header.php", + "/Users/Mickey/Sites/Drake's/wp-content/themes/genesis/page_blog.php", + "/Users/Mickey/Sites/Drake's/wp-content/themes/genesis/lib/structure/post.php", + "/var/folders/7c/wy3nqkpx2k36t1rn81tcd2tr0000gq/T/sublime-sftp-browse-1369176882/mapped/drakes.mightyminnow.com/wp-content/themes/genesis/lib/structure/header.php", + "/Users/Mickey/Sites/Drake's/wp-content/themes/genesis/single.php", + "/Users/Mickey/Sites/Drake's/wp-content/themes/bones-genesis-master/functions.php", + "/Users/Mickey/Sites/Drake's/wp-content/themes/bones-genesis-master/style.css", + "/var/folders/7c/wy3nqkpx2k36t1rn81tcd2tr0000gq/T/sublime-sftp-browse-1368743266/mapped/drakes.mightyminnow.com/wp-content/themes/genesis/page.php", + "/Users/Mickey/Sites/Mm - Dev/sftp-config.json", + "/Users/Mickey/Sites/Mm - Dev/wp-content/uploads/dynamik-gen/theme/custom.css", + "/Users/Mickey/Sites/Allbright Design/Templates/MIGHTYminnow Template/index.html", + "/Users/Mickey/Sites/Mm - Dev/wp-content/uploads/dynamik-gen/theme/custom.php", + "/Users/Mickey/Sites/Mm - Dev/Dynamik Theme/mightyminnow/style.css", + "/Users/Mickey/Sites/Mm - Dev/wp-content/uploads/dynamik-gen/theme/jquery-scripts.js", + "/Users/Mickey/Sites/Mm - Dev/wp-content/uploads/dynamik-gen/theme/images/favicon.ico", + "/Users/Mickey/Desktop/