Skip to content

Commit

Permalink
fixes css
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyrauch committed Sep 30, 2013
1 parent 5884ed7 commit 57a2116
Show file tree
Hide file tree
Showing 6 changed files with 174 additions and 121 deletions.
23 changes: 16 additions & 7 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,25 @@
* @package Symbol
* @since Symbol 1.0
*/
global $theme_options;
$themename = get_option( 'stylesheet' );
$themename = preg_replace("/\W/", "_", strtolower($themename) );
$theme_options = get_option ($themename);
?>

</div><!-- #main .site-main -->

<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">

<?php if ($theme_options['footer_text']): ?>
<?php echo $theme_options['footer_text'] ?>
<?php else: ?>
Theme by <a href="http://themeskult.com">Themes Kult</a>
<?php endif ?>

<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<?php do_action( 'symbol_credits' ); ?>

</div><!-- .site-info -->
</footer><!-- #colophon .site-footer -->
</div><!-- .site-info -->
</footer><!-- #colophon .site-footer -->

</div><!-- #page .hfeed .site -->
<!-- .snap-content -->

Expand Down
62 changes: 61 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,76 @@ function symbol_scripts() {
}
}
add_action( 'wp_enqueue_scripts', 'symbol_scripts' );
add_action('admin_head', 'load_theme_scripts');

function of_stylesheet() {

add_action('admin_head', 'load_theme_scripts');
global $theme_options;
$themename = get_option( 'stylesheet' );
$themename = preg_replace("/\W/", "_", strtolower($themename) );
$theme_options = get_option ($themename);

$color = $theme_options['site_color'];

?>
<style type="text/css">
body{
color: <?php echo $theme_options['text_color']; ?>
}
h1,h2,h3,h4,h5,h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a{
color: <?php echo $theme_options['titles_color']; ?>
}
#page{
background-color: <?php echo $theme_options['background']['color'] ?>;
background-image: url(<?php echo $theme_options['background']['image'] ?>);
background-repeat: <?php echo $theme_options['background']['repeat'] ?>;
background-attachment: <?php echo $theme_options['background']['attachment'] ?>;
}

header.site-header h1 a {
background-image: url(<?php echo $theme_options['header_background_image'] ?>);
}

header.site-header nav {
background: <?php echo $theme_options['navigation_background_color'] ?>;
}

header.site-header nav ul li a{
color: <?php echo $theme_options['navigation_text_color'] ?>;
}

article blockquote,
article .entry-content a:hover,
article a:hover,
.wrap nav a:hover, #page
{border-color: <?php echo $color ?>;}

article h1 a:hover { color: <?php echo $color ?>}

nav.pagination a:hover,
#respond #submit, ::selection
{background-color: <?php echo $color ?>;}

<?php if($color): ?>
header.site-header h1.site-title a{background-color: <?php echo $color ?>;}
<?php endif; ?>

<?php if (get_header_image()): ?>
header.site-header h1.site-title a{background-image: url(<?php echo get_header_image() ?> );}
<?php endif ?>

</style>
<?php
}

require( get_template_directory() . '/inc/plugins/nav-menu-images/nav-menu-images.php' );

if (get_option('licence_symbol')) {


add_action( 'wp_head', 'of_stylesheet' );


// Re-define the options-framework URL
define( 'OPTIONS_FRAMEWORK_URL', get_template_directory_uri() . '/inc/options-framework/' );

Expand Down
32 changes: 0 additions & 32 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,9 @@
<![endif]-->

<?php
global $theme_options;

$themename = get_option( 'stylesheet' );
$themename = preg_replace("/\W/", "_", strtolower($themename) );

$options = get_option ( $themename );
wp_head();
?>

<style>
article blockquote,
article .entry-content a:hover,
article a:hover,
.wrap nav a:hover, body
{border-color: <?php echo $color ?> !important;}

article h1 a:hover { color: <?php echo $color ?> !important}

nav.pagination a:hover,
#respond #submit, ::selection
{background-color: <?php echo $color ?>;}

<?php if($color): ?>
header.site-header h1.site-title a{background-color: <?php echo $color ?> !important;}
<?php endif; ?>

<?php if (get_header_image()): ?>
header.site-header h1.site-title a{background-image: url(<?php echo get_header_image() ?> ) !important;}
<?php endif ?>

<?php if (get_option('header_image')): ?>
header.site-header h1.site-title a{background-image: url(http://the-notepad.s3-website-us-east-1.amazonaws.com/header_images/<?php echo get_option('header_image') ?> ) !important;}
<?php endif ?>
</style>

</head>

<body <?php body_class(); ?>>
Expand Down
63 changes: 25 additions & 38 deletions options.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function optionsframework_options() {

// Background Defaults
$background_defaults = array(
'color' => '',
'color' => '#fff',
'image' => '',
'repeat' => 'repeat',
'position' => 'top center',
Expand Down Expand Up @@ -105,73 +105,60 @@ function optionsframework_options() {
'name' => __('Basic Settings', 'options_check'),
'type' => 'heading');

$options[] = array(
'name' => __('Site Color', 'options_check'),
'desc' => __('No color selected by default.', 'options_check'),
'id' => 'site_color',
'std' => '#feb83e',
'type' => 'color' );

$options[] = array(
'name' => __('Titles Color', 'options_check'),
'desc' => __('No color selected by default.', 'options_check'),
'id' => 'titles_color',
'std' => '#000',
'type' => 'color' );

$options[] = array(
'name' => __('Text Color', 'options_check'),
'desc' => __('No color selected by default.', 'options_check'),
'id' => 'text_color',
'std' => '#4d4d4d',
'type' => 'color' );

$options[] = array(
'name' => __('Background', 'options_check'),
'desc' => __('Change the background CSS.', 'options_check'),
'id' => 'background',
'std' => $background_defaults,
'type' => 'background' );

$options[] = array(
'name' => __('Container Width', 'options_check'),
'desc' => __('Container width in pixels.', 'options_check'),
'id' => 'container_width',
'std' => '560px',
'class' => 'mini',
'type' => 'text');

$options[] = array(
'name' => __('Header Image', 'options_check'),
'desc' => __('This creates a full size uploader that previews the image.', 'options_check'),
'id' => 'header_background_image',
'type' => 'upload');

$options[] = array(
'name' => __('Avatar Image', 'options_check'),
'desc' => __('This creates a full size uploader that previews the image.', 'options_check'),
'id' => 'avatar_image',
'type' => 'upload');

$options[] = array(
'name' => __('Biography', 'options_check'),
'desc' => __('Default Biography.', 'options_check'),
'id' => 'biography',
'std' => 'Default Biography',
'type' => 'textarea');


$options[] = array(
'name' => __('Navigation Background Color', 'options_check'),
'desc' => __('No color selected by default.', 'options_check'),
'id' => 'navigation_background_color',
'std' => '',
'std' => '#f1f1f1',
'type' => 'color' );

$options[] = array(
'name' => __('Navigation Text Color', 'options_check'),
'desc' => __('No color selected by default.', 'options_check'),
'id' => 'navigation_text_color',
'std' => '',
'std' => '#333',
'type' => 'color' );

$options[] = array(
'name' => __('Biography Background Color', 'options_check'),
'desc' => __('No color selected by default.', 'options_check'),
'id' => 'biography_background_color',
'std' => '',
'type' => 'color' );

$options[] = array(
'name' => __('Biography Box Text Color', 'options_check'),
'desc' => __('No color selected by default.', 'options_check'),
'id' => 'biography_text_color',
'std' => '',
'type' => 'color' );

$options[] = array(
'name' => __('Footer Text', 'options_check'),
'id' => 'footer_text',
'std' => 'Footer Text',
'type' => 'text');

return $options;
}
46 changes: 27 additions & 19 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ a {
display: block;
width: 44px;
height: 44px;
top: 20px;
top: 19px;
left: 20px;
position: fixed;
right: 20px;
Expand Down Expand Up @@ -149,6 +149,15 @@ img {
#page {
border-top: 4px solid #feb83e;
}
footer.site-footer {
padding: 20px;
font-size: 12px;
background: #f1f1f1;
text-align: center;
}
footer.site-footer a {
font-weight: bold;
}
/* =Header
-------------------------------------------------------------- */
header.site-header {
Expand All @@ -167,7 +176,7 @@ header.site-header h1 a {
background: #feb83e url("images/logo.png") center no-repeat;
border: 1px solid rgba(0,0,0,0.1);
border-top: 0;
background-size: auto 70%;
background-size: cover;
height: 150px;
text-indent: -10000em;
display: block;
Expand All @@ -183,7 +192,7 @@ header.site-header nav ul {
margin: 0;
padding: 0;
}
header.site-header nav a {
header.site-header nav ul li a {
border: 1px solid #ccc;
overflow: hidden;
border-top: 0;
Expand All @@ -193,8 +202,8 @@ header.site-header nav a {
font-size: 11px;
color: #333;
}
header.site-header nav a i,
header.site-header nav a img {
header.site-header nav ul li a i,
header.site-header nav ul li a img {
background: url("images/icon-page.png") center no-repeat;
display: inline-block;
opacity: 0.4;
Expand All @@ -203,22 +212,22 @@ header.site-header nav a img {
height: 18px;
margin: auto;
}
header.site-header nav a img {
header.site-header nav ul li a img {
display: block;
}
header.site-header nav a.current_page_item {
background: #fff;
}
header.site-header nav a:hover {
header.site-header nav ul li a:hover {
background: #eee;
}
header.site-header nav a:hover span {
header.site-header nav ul li a:hover span {
color: #000;
}
header.site-header nav a:hover i,
header.site-header nav a:hover img {
header.site-header nav ul li a:hover i,
header.site-header nav ul li a:hover img {
opacity: 1;
}
header.site-header nav ul li.current_page_item a {
background: #fff;
}
body.admin-bar header.site-header,
body {
border-top: 1px solid #fff;
Expand All @@ -228,13 +237,8 @@ body {
border-bottom: 1px solid #ebebeb;
padding: 32px 0;
}
#begin a,
.site-navigation.post-navigation a {
color: #999;
}
#begin time,
.site-navigation.post-navigation time {
color: #999;
font-weight: bold;
}
.site-main {
Expand Down Expand Up @@ -264,7 +268,7 @@ article.post,
article.attachment,
article.page {
border-bottom: 1px solid #ebebeb;
padding: 50px 0;
padding: 30px 0 50px 0;
font-size: 18px;
line-height: 30px;
/* Images */
Expand Down Expand Up @@ -773,6 +777,10 @@ nav.paging-navigation .nav-next,
}
header.site-header nav ul li a {
border: 0;
padding-left: 20px;
padding-right: 20px;
margin-right: 5px;
margin-left: 5px;
}
.center-content,
#disqus_thread {
Expand Down
Loading

0 comments on commit 57a2116

Please sign in to comment.