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

Adding color options

  • Loading branch information
andrewmbacon
andrewmbacon committed Aug 12, 2015
1 parent 85ab9d4 commit 353299b60ca0e1bbced9749907cf15d512c89116

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -3,10 +3,20 @@

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'hale2015-style', get_template_directory_uri() . '/style.css' );

$stylesheet = get_theme_mod('themeColor');
if( $stylesheet ){
wp_enqueue_style( $stylesheet, get_stylesheet_directory_uri() . '/css/'.$stylesheet.'.css', array('cs-style') );
} else {
wp_enqueue_style( 'hale2015-blue', get_stylesheet_directory_uri() . '/css/hale2015-blue.css', array('cs-style') );
}
}







add_action( 'wp_print_styles', 'deregister_cs_styles', 100 );

function deregister_cs_styles() {
@@ -20,15 +30,70 @@ function deregister_cs_styles() {
};


function show_people(){
if ( !is_plugin_active('uc-people/uc-people.php') ) {
activate_plugin('uc-people/uc-people.php');
}
};
add_action( 'after_switch_theme', 'show_people' );

function my_deactivate_plugins(){
function hide_people(){
if ( is_plugin_active('uc-people/uc-people.php') ) {
deactivate_plugins('uc-people/uc-people.php');
}
};
add_action( 'switch_theme', 'hide_people' );
function hide_uup(){
global $wp_themes;

if ( is_plugin_active('uup/uup.php') ) {
deactivate_plugins('uup/uup.php');
}
remove_shortcode('uc_uup');
}
};
add_action( 'admin_init', 'my_deactivate_plugins' );
add_action( 'init', 'hide_uup' );
function tfc_remove_page_templates( $templates ) {
unset( $templates['page-user-profile.php'] );
unset( $templates['user-index-table.php'] );
unset( $templates['user-index.php'] );
return $templates;
}
add_filter( 'theme_page_templates', 'tfc_remove_page_templates' );


// Color Options

function husky2015_customize_register( $wp_customize ) {

$wp_customize->add_section( 'colors' , array(
'title' => __( 'Colors', 'husky2015' ),
'priority' => 30,
) );
$wp_customize->add_setting( 'themeColor',
array(
'default' => 'hale2015-blue',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
'transport' => 'refresh'
)
);

$wp_customize->add_control(
'color_control',
array(
'label' => __( 'Theme Color', 'husky2015' ),
'section' => 'colors',
'settings' => 'themeColor',
'type' => 'radio',
'choices' => array(
'hale2015-blue' => 'Blue',
'hale2015-red' => 'Red',
'hale2015-orange' => 'Orange',
'hale2015-green' => 'Green',
'hale2015-purple' => 'Purple',
),
)
);
}
add_action( 'customize_register', 'husky2015_customize_register' );

?>
@@ -1,17 +1,9 @@
/*
Theme Name: Hale 2015
Author: UConn Web Development Lab
Description: Parent theme for University of Connecticut
Version: 1
Template: cornerstone
*/
// bootstrap & cs overrides
@import "_variables.scss";



//== BOOTSTRAP vars

//== BOOTSTRAP vars
$link-color: $nav-color-base;
$brand-primary: #006dcc;
$brand-danger: #da4f49;
$brand-info: #49afcd;
@@ -21,72 +13,104 @@ $brand-success: #5bb75b;
$border-radius-base: 7px;

$body-bg: #f6f6f6;
$navbar-default-bg: transparent;

$navbar-default-link-color: rgba(17,23,57,.8);
$navbar-default-link-hover-color: rgba(17,23,57,1);
$btn-primary-border: darken($brand-primary, 15%) !default;
$btn-success-border: darken($brand-success, 15%) !default;
$btn-info-border: darken($brand-info, 15%) !default;
$btn-warning-border: darken($brand-warning, 15%) !default;
$btn-danger-border: darken($brand-danger, 15%) !default;

$navbar-default-link-hover-bg: transparent !default;
$navbar-default-link-active-bg: #e5e5e5;
$navbar-margin-bottom: 0;


$dropdown-link-hover-color: #fff;
$dropdown-link-hover-bg: $brand-primary;

//== Cornerstone Vars

$nav-secondary-pills-active-link-hover-bg:$nav-color-base;

$content-padding: 3em 8em;
$widget-head-size: 13px;
$widget-head-padding: 0.7em 1em;
$widget-border-color: #e0e0e0;
$widget-margin: 0 0 30px 0;

$btn-primary-border: darken($brand-primary, 15%) !default;
$footers-link-color: #707070;
$footers-link-hover: $brand-primary;

// imports bootsrtap, and all of cornerstone sass

$btn-success-border: darken($brand-success, 15%) !default;

$btn-info-border: darken($brand-info, 15%) !default;
//== Hale 2015 Only

$navtab-bg: #fff;

$btn-warning-border: darken($brand-warning, 15%) !default;

//== Color options

$btn-danger-border: darken($brand-danger, 15%) !default;





$nav-color-inverse: invert($nav-color-base);
$nav-color-inverse-grey: grayscale($nav-color-inverse);
$nav-color-desaturated: desaturate($nav-color-base, 30%);
$nav-color-desaturated-darker: darken($nav-color-desaturated, 20%);


//== Cornerstone Vars
$content-padding: 3em 8em;
$widget-head-size: 13px;
$widget-head-padding: 0.7em 1em;
$widget-border-color: #e0e0e0;
$widget-margin: 0 0 30px 0;

$footers-link-color: #707070;
$footers-link-hover: $brand-primary;
$navbar-default-bg: transparent;
$navbar-default-border: transparent;
$navbar-default-link-color: transparentize($nav-color-base, .15);
$navbar-default-link-hover-color: $nav-color-base;
$navbar-default-link-hover-bg: transparent;
$navbar-default-link-active-color: $nav-color-base;
$navbar-default-link-active-bg: #e5e5e5;



$navbar-margin-bottom: 0;


// imports bootsrtap, and all of cornerstone sass
@import "../../cornerstone/style.scss";

$dropdown-link-color: $nav-color-desaturated;
$dropdown-link-hover-color: darken($dropdown-link-color, 5%) ;
$dropdown-link-hover-bg: transparentize($nav-color-base, 0.85);


$dropdown-link-active-color: #fff;
$dropdown-link-active-bg: $nav-color-base;







@import "../../cornerstone/style.scss";
@import "_mixins.scss";









#masthead {

@include gradient(#ffffff, #e7e7e7);

#uc-site-header {
#uc-site-parent a {
color:#868695;
}
#uc-site-title a {
color:#0b1860;
color:#0b1860;
}



}
#nav-wrapper {

.navbar .nav>li>a {
text-shadow: 0 1px 0 rgba(255,255,255,.8);
font-weight:500;
@@ -101,6 +125,72 @@ $footers-link-hover: $brand-primary;
#primary-nav {
padding-left:0;
}

#nav-tabs {
padding-bottom: 0;
}

#nav-tabs .nav-tabs {
// all links


// effects only for the top tabs
& > li > a {
border-radius: $border-radius-base $border-radius-base 0 0;
border-bottom:1px solid transparent !important;
color:$navbar-default-link-color;

&:hover {
border-bottom-color:$nav-tabs-border-color !important;
}
}

& > li.active > a,
& > li.active > a:hover,
& > li.active > a:focus {
background-color:$navtab-bg;

bottom:0px;
border-bottom-color:transparent !important;
}


}

#tabs-bottom-wrapper {
background-color:$navtab-bg;
border-top:1px solid $nav-tabs-border-color;




}

#nav-tabs .navbar .nav {

& > li > a {
//color: $navbar-default-link-color;


}
& > li.active > a {
background-color:transparent!important;
color:darken($nav-color-base, 10%);
}

& > li:first-child a {
padding-left:$navbar-padding-horizontal;
}

}

#drop-multi .navbar-collapse,
#nav-dropdown .navbar-collapse {
padding-left:0;
}




}

@@ -222,4 +312,4 @@ $footers-link-hover: $brand-primary;
+ .az-letter {
//border-top:1px dotted #ccc;
}
*/
*/
@@ -0,0 +1,3 @@
// blue
$nav-color-base: #0f4786;
@import "_hale2015-common.scss";
@@ -0,0 +1,3 @@
// green
$nav-color-base: #0f861a;
@import "_hale2015-common.scss";
@@ -0,0 +1,3 @@
// orange
$nav-color-base: #e07502;
@import "_hale2015-common.scss";
@@ -0,0 +1,3 @@
// purple
$nav-color-base: #850f86;
@import "_hale2015-common.scss";
@@ -0,0 +1,3 @@
// red
$nav-color-base: #BD4147;
@import "_hale2015-common.scss";

0 comments on commit 353299b

Please sign in to comment.
You can’t perform that action at this time.