From 57a21168fea6a826ed25ac1d5235020927a68511 Mon Sep 17 00:00:00 2001 From: Ricardo Rauch Date: Mon, 30 Sep 2013 05:09:32 -0300 Subject: [PATCH] fixes css --- footer.php | 23 +++++++++++------ functions.php | 62 ++++++++++++++++++++++++++++++++++++++++++++- header.php | 32 ------------------------ options.php | 63 +++++++++++++++++++--------------------------- style.css | 46 ++++++++++++++++++++-------------- style.styl | 69 +++++++++++++++++++++++++++++++++------------------ 6 files changed, 174 insertions(+), 121 deletions(-) diff --git a/footer.php b/footer.php index cd5f619..c9fc306 100755 --- a/footer.php +++ b/footer.php @@ -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); ?> - + + + diff --git a/functions.php b/functions.php index a6439f2..0b6bf0e 100755 --- a/functions.php +++ b/functions.php @@ -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']; + ?> + + - - > diff --git a/options.php b/options.php index 40acbd9..04b6f8b 100644 --- a/options.php +++ b/options.php @@ -53,7 +53,7 @@ function optionsframework_options() { // Background Defaults $background_defaults = array( - 'color' => '', + 'color' => '#fff', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', @@ -105,6 +105,27 @@ 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'), @@ -112,66 +133,32 @@ function optionsframework_options() { '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; } \ No newline at end of file diff --git a/style.css b/style.css index 1a72712..db24f60 100755 --- a/style.css +++ b/style.css @@ -96,7 +96,7 @@ a { display: block; width: 44px; height: 44px; - top: 20px; + top: 19px; left: 20px; position: fixed; right: 20px; @@ -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 { @@ -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; @@ -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; @@ -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; @@ -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; @@ -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 { @@ -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 */ @@ -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 { diff --git a/style.styl b/style.styl index 30f2676..227d2a7 100755 --- a/style.styl +++ b/style.styl @@ -116,7 +116,7 @@ a{ outline: none !important;} display: block; width: 44px; height: 44px; - top: 20px; + top: 19px; left: 20px; position: fixed; right: 20px; @@ -150,13 +150,28 @@ img #page border-top: 4px solid #feb83e; +footer.site-footer + padding: 20px; + font-size: 12px; + background: #f1f1f1; + text-align: center + a + font-weight: bold + /* =Header -------------------------------------------------------------- */ header.site-header background: #fff; position: fixed; top: 0px; z-index: 10000; left: 820px; width: 150px; h1 margin: 0; padding: 0; - a{background: #feb83e url('images/logo.png') center no-repeat; border: 1px solid rgba(0,0,0,.1); border-top: 0; background-size: auto 70%; height: 150px; text-indent: -10000em; display: block;} + a + background: #feb83e url('images/logo.png') center no-repeat; + border: 1px solid rgba(0,0,0,.1); + border-top: 0; + background-size: cover; + height: 150px; + text-indent: -10000em; + display: block; nav display: block; width: 100%; @@ -166,33 +181,35 @@ header.site-header ul margin: 0; padding: 0; - a - border: 1px solid #ccc; - overflow: hidden; - border-top: 0; - display: block; - padding: 10px 10px; - line-height: 18px; - font-size: 11px; - color: #333; - i, img{background: url('images/icon-page.png') center no-repeat; display: inline-block; opacity: .4; float: left; width: 18px; height: 18px; margin: auto;} - img{display: block;} - - &.current_page_item - background: white; - &:hover - background: #eee; - span - color: black; - i,img{opacity: 1;} + li + a + border: 1px solid #ccc; + overflow: hidden; + border-top: 0; + display: block; + padding: 10px 10px; + line-height: 18px; + font-size: 11px; + color: #333; + i, img{background: url('images/icon-page.png') center no-repeat; display: inline-block; opacity: .4; float: left; width: 18px; height: 18px; margin: auto;} + img{display: block;} + + &:hover + background: #eee; + span + color: black; + i,img{opacity: 1;} + + &.current_page_item a + background: white; body.admin-bar header.site-header, body border-top: 1px solid white; #begin, .site-navigation.post-navigation border-bottom: 1px solid #ebebeb; padding: 32px 0; - a{color: #999;} - time{ color: #999; font-weight: bold; } + time + font-weight: bold; .site-main @@ -212,7 +229,7 @@ body.admin-bar header.site-header, body 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; h1 @@ -446,6 +463,10 @@ nav.paging-navigation, #nav-below display: inline-block a border: 0; + padding-left: 20px; + padding-right: 20px; + margin-right: 5px; + margin-left: 5px; .center-content, #disqus_thread margin-left: auto;