reorganized directory structure, css mods, functions mods

This commit is contained in:
Mickey Kay
2013-10-09 10:48:26 -07:00
parent cd0e30ceef
commit af8523ac3b
15 changed files with 1213 additions and 24 deletions
+35 -13
View File
@@ -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 . '<p>[footer_childtheme_link before=""] by <a href="http://mightyminnow.com">MIGHTYminnow</a></p>';
}
add_filter( 'genesis_footer_output', 'trestle_custom_footer' );
/*===========================================
* Shortcodes
===========================================*/
Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+53
View File
@@ -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('<a class="sub-icon" href="javascript:void()">' + closedIcon + '</a>');
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('<a class="sub-icon" href="javscript: void()">' + openIcon + '</a>');
// 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() {
});
+47 -11
View File
@@ -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;
+8
View File
@@ -0,0 +1,8 @@
{
"folders":
[
{
"path": "/Users/Mickey/Sites/MNC"
}
]
}
File diff suppressed because it is too large Load Diff