Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Merge pull request #98 from jmr06005/master
Browse files Browse the repository at this point in the history
Update to the home page template to set defaults for widget area rows an...
  • Loading branch information
jmr06005 committed Jan 15, 2015
2 parents dc9703b + 8fa0274 commit c23ddba
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 227 deletions.
183 changes: 0 additions & 183 deletions css/admin-style.css
Original file line number Diff line number Diff line change
@@ -1,183 +0,0 @@
/* - - - - - - - - - - - - - - - - - - -
== Admin Style
- - - - - - - - - - - - - - - - - - - */
#wpadminbar {
background-color: #000E2F;
}

#accordion-section-layout_builder {
/* Homepage Layout builder */
}
#accordion-section-layout_builder .customize-control-hidden * {
display: none;
}
#accordion-section-layout_builder .sliderDeleteRow {
float: right;
}
#accordion-section-layout_builder .sliders {
padding: 2.5em 0;
}
#accordion-section-layout_builder .slider-wrap {
float: left;
width: 100%;
padding: 5px 0;
clear: left;
}
#accordion-section-layout_builder .slider-wrap a:focus {
outline: thin dotted;
outline-color: #2ea2cc;
}
#accordion-section-layout_builder .slider,
#accordion-section-layout_builder .sliderAddColumn {
float: left;
}
#accordion-section-layout_builder .slider {
width: 195px;
margin-right: 15px;
}
#accordion-section-layout_builder .sliderAddColumn {
padding: 0px !important;
height: auto !important;
}
#accordion-section-layout_builder .ui-slider-horizontal {
height: 3.5em !important;
background-color: #eeeeee !important;
background-image: linear-gradient(90deg, transparent 50%, rgba(255, 255, 255, 0.5) 50%) !important;
background-size: 20px 50px !important;
}
#accordion-section-layout_builder .ui-slider .ui-slider-handle {
width: 0.01em !important;
height: 3.9em !important;
padding: 0 !important;
}
#accordion-section-layout_builder .ui-slider .ui-slider-handle:focus {
width: 0.05em !important;
height: 3.7em !important;
border: 1px solid #2ea2cc;
}
#accordion-section-layout_builder .ui-slider .ui-slider-handle:before {
content: "";
display: block;
position: relative;
top: -24px;
left: -13px;
width: 20px;
height: 20px;
margin-left: 3px;
border-radius: 3px;
background: grey;
}
#accordion-section-layout_builder .ui-slider .ui-slider-handle:focus:before {
position: relative;
top: -24px;
left: -12px;
background: #2ea2cc;
}
#accordion-section-layout_builder .ui-slider .ui-slider-handle:after {
content: "";
display: block;
position: relative;
top: -24px;
left: -8px;
width: 0;
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-top: 8px solid grey;
}
#accordion-section-layout_builder .ui-slider .ui-slider-handle:focus:after {
position: relative;
top: -24px;
left: -7px;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-top: 8px solid #2ea2cc;
}
#accordion-section-layout_builder .ui-slider .ui-slider-handle:hover {
cursor: -webkit-grab;
}
#accordion-section-layout_builder .ui-slider .ui-slider-handle:active {
cursor: -webkit-grabbing;
}
#accordion-section-layout_builder .ui-slider .ui-slider-handle:focus {
background-image: none;
background: #2ea2cc !important;
width: 2px !important;
}
#accordion-section-layout_builder .wp-core-ui .button.sliderDeleteColumn {
background: #2ea2cc;
border-color: #0074a2;
-webkit-box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.5), 0 1px 0 rgba(0, 0, 0, 0.15);
box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.5), 0 1px 0 rgba(0, 0, 0, 0.15);
color: #fff;
}
#accordion-section-layout_builder .wp-core-ui .button.sliderDeleteColumn .dashicons-minus {
padding: 4px;
}
#accordion-section-layout_builder .wp-core-ui .button.sliderAddColumn .dashicons-plus {
padding: 14px 4px;
}

#sidebar-manager #home0,
#sidebar-manager #home1,
#sidebar-manager #home2,
#sidebar-manager #home3,
#sidebar-manager #home4,
#sidebar-manager #home5,
#sidebar-manager #home6,
#sidebar-manager #home7,
#sidebar-manager #home8,
#sidebar-manager #home9,
#sidebar-manager #home10,
#sidebar-manager #home11,
#sidebar-manager #home12,
#sidebar-manager #home13,
#sidebar-manager #home14,
#sidebar-manager #home15,
#sidebar-manager #home16,
#sidebar-manager #home17,
#sidebar-manager #home18,
#sidebar-manager #home19,
#sidebar-manager #home20,
#sidebar-manager #home21,
#sidebar-manager #home22,
#sidebar-manager #home23,
#sidebar-manager #home24,
#sidebar-manager #home25,
#sidebar-manager #home26,
#sidebar-manager #home27,
#sidebar-manager #home28,
#sidebar-manager #home29,
#sidebar-manager #home30,
#sidebar-manager #home31,
#sidebar-manager #home32,
#sidebar-manager #home33,
#sidebar-manager #home34,
#sidebar-manager #home35,
#sidebar-manager #home36,
#sidebar-manager #home37,
#sidebar-manager #home38,
#sidebar-manager #home39,
#sidebar-manager #home40,
#sidebar-manager #home41,
#sidebar-manager #home42,
#sidebar-manager #home43,
#sidebar-manager #home44,
#sidebar-manager #home45,
#sidebar-manager #home46,
#sidebar-manager #home47,
#sidebar-manager #home48,
#sidebar-manager #home49,
#sidebar-manager #home50,
#sidebar-manager #home51,
#sidebar-manager #home52,
#sidebar-manager #home53,
#sidebar-manager #home54,
#sidebar-manager #home55,
#sidebar-manager #home56,
#sidebar-manager #home57,
#sidebar-manager #home58,
#sidebar-manager #home59,
#sidebar-manager #home60 {
display: none;
}
84 changes: 42 additions & 42 deletions inc/scripts-and-styles.php
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<?php
function cs_scripts() {

wp_enqueue_style( 'cs-glyph', network_home_url().'wp-content/global/glyphicons_pro/glyphicons/web/html_css/css/glyphicons.css');
wp_enqueue_style( 'cs-glyph-filetypes', network_home_url().'wp-content/global/glyphicons_pro/glyphicons_filetypes/web/html_css/css/glyphicons-filetypes.css');
wp_enqueue_style( 'cs-glyph-halflings', network_home_url().'wp-content/global/glyphicons_pro/glyphicons_halflings/web/html_css/css/glyphicons-halflings.css');
wp_enqueue_style( 'cs-glyph-social', network_home_url().'wp-content/global/glyphicons_pro/glyphicons_social/web/html_css/css/glyphicons-social.css');
wp_enqueue_style( 'cs-style', get_stylesheet_uri(), array( 'cs-glyph' ));

wp_enqueue_script( 'cs-bootstrap-js', network_home_url().'wp-content/global/bootstrap-3.2.0-dist/js/bootstrap.min.js', array( 'jquery' ));
wp_enqueue_script( 'cs-modernizr', get_template_directory_uri() . '/js/cs-modernizr.js', array( 'jquery' ));
wp_enqueue_script( 'cs', get_template_directory_uri() . '/js/cs.js', array( 'jquery' ));
wp_enqueue_script( 'cs-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'cs-bootstrap-js'), '20120206', true );
wp_enqueue_script( 'cs-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );

$outboundtracking = get_option( 'outbound_tracking','');
if($outboundtracking == 'yes') wp_enqueue_script('uc-link-tracking', get_bloginfo('template_url').'/js/linktracking.js', array('jquery'));

if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}

add_action( 'wp_enqueue_scripts', 'cs_scripts' );


function load_custom_wp_admin_style($hook) {
wp_register_style( 'custom_wp_admin_css', get_template_directory_uri() . '/css/admin-style.css', false, '1.0.0' );
wp_enqueue_style( 'custom_wp_admin_css' );


wp_register_script('uc-admin-js', get_template_directory_uri() . '/js/admin-style.js', false, '1.0.0');
wp_enqueue_script('uc-admin-js');

if( 'widgets.php' != $hook )
return;
wp_register_style( 'css-widgets-area', get_template_directory_uri().'/css/widgets-area.php' );
wp_enqueue_style( 'css-widgets-area' );
}
add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );


<?php
function cs_scripts() {

wp_enqueue_style( 'cs-glyph', network_home_url().'wp-content/global/glyphicons_pro/glyphicons/web/html_css/css/glyphicons.css');
wp_enqueue_style( 'cs-glyph-filetypes', network_home_url().'wp-content/global/glyphicons_pro/glyphicons_filetypes/web/html_css/css/glyphicons-filetypes.css');
wp_enqueue_style( 'cs-glyph-halflings', network_home_url().'wp-content/global/glyphicons_pro/glyphicons_halflings/web/html_css/css/glyphicons-halflings.css');
wp_enqueue_style( 'cs-glyph-social', network_home_url().'wp-content/global/glyphicons_pro/glyphicons_social/web/html_css/css/glyphicons-social.css');
wp_enqueue_style( 'cs-style', get_stylesheet_uri(), array( 'cs-glyph' ));

wp_enqueue_script( 'cs-bootstrap-js', network_home_url().'wp-content/global/bootstrap-3.2.0-dist/js/bootstrap.min.js', array( 'jquery' ));
wp_enqueue_script( 'cs-modernizr', get_template_directory_uri() . '/js/cs-modernizr.js', array( 'jquery' ));
wp_enqueue_script( 'cs', get_template_directory_uri() . '/js/cs.js', array( 'jquery' ));
wp_enqueue_script( 'cs-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'cs-bootstrap-js'), '20120206', true );
wp_enqueue_script( 'cs-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );

$outboundtracking = get_option( 'outbound_tracking','');
if($outboundtracking == 'yes') wp_enqueue_script('uc-link-tracking', get_bloginfo('template_url').'/js/linktracking.js', array('jquery'));

if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}

add_action( 'wp_enqueue_scripts', 'cs_scripts' );


function load_custom_wp_admin_style($hook) {
wp_register_style( 'custom_wp_admin_css', get_template_directory_uri() . '/css/admin-style.css' );
wp_enqueue_style( 'custom_wp_admin_css' );


wp_register_script('uc-admin-js', get_template_directory_uri() . '/js/admin-style.js' );
wp_enqueue_script('uc-admin-js');

if( 'widgets.php' != $hook )
return;
wp_register_style( 'css-widgets-area', get_template_directory_uri().'/css/widgets-area.php' );
wp_enqueue_style( 'css-widgets-area' );
}
add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );


?>
4 changes: 2 additions & 2 deletions page-home.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @package cornerstone
*/
$rows = get_theme_mod('homepagerows');
$rows = get_theme_mod('homepagerows', '2');
$count = 1;
get_header(); ?>

Expand All @@ -15,7 +15,7 @@
<?php for($i=0; $i<$rows; $i++){ /* Begin Homepage Builder... */?>
<div class="row">
<?php
$widths = get_theme_mod('homepage_'.$i);
$widths = get_theme_mod('homepage_'.$i, '12');
$widths = explode(',',$widths);
if(count($widths) == 1) $widths[0] = 12;
foreach($widths as $width){
Expand Down

0 comments on commit c23ddba

Please sign in to comment.