fixes #1 -- also minor changes to style.css and searchform.php

This commit is contained in:
Ben Word
2011-03-31 20:56:19 -06:00
parent b15f084601
commit 80704070ea
9 changed files with 71 additions and 61 deletions

View File

@@ -13,8 +13,6 @@ h1, h2, h3, h4, h5, h6 { text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); }
ul.none { margin: 0 0 1.5em 0; padding: 0; list-style: none; }
.icon { vertical-align: middle; }
.large { line-height: 1.5em; }
.center { text-align: center; }
.aligncenter { display: block; margin: 0 auto; }
img.left, p img.left, .alignleft { margin: 0 1.5em 1.5em 0; float: left; }
img.right, p img.right, .alignright { margin: 0 0 1.5em 1.5em; float: right; }
@@ -68,7 +66,6 @@ textarea { overflow: auto; }
/* Grid */
#wrap { }
hr { background: #ddd; color: #ddd; }
/* HEADER
@@ -398,6 +395,7 @@ img.ui-datepicker-trigger { vertical-align: middle; }
/* Search */
#searchform #s { padding: 5px; }
#searchform #searchsubmit { -moz-appearance: textfield; -webkit-appearance: textfield; }
/* INTERNET EXPLORER

View File

@@ -1,43 +1,6 @@
@import url("//ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/smoothness/jquery-ui.css");
.clearfix:before,
.clearfix:after {
content: ".";
display: block;
height: 0;
overflow: hidden;
}
.clearfix:before, .clearfix:after { content: "."; display: block; height: 0; overflow: hidden; }
.clearfix:after { clear: both; }
.clearfix { zoom: 1; } /* IE < 8 */
/* theme options */
#tabs { margin-top: 1em; }
body.toplevel_page_roots .ui-widget { font-size: 1em !important; font-family: inherit !important; }
body.toplevel_page_roots .ui-widget-header {
/* match #wp-head */
background: #d9d9d9;
background: -moz-linear-gradient(bottom, #d7d7d7, #e4e4e4) !important;
background: -webkit-gradient(linear, left bottom, left top, from(#d7d7d7), to(#e4e4e4)) !important;
}
body.toplevel_page_roots .ui-state-default,
body.toplevel_page_roots .ui-widget-content .ui-state-default,
body.toplevel_page_roots .ui-widget-header .ui-state-default {
/* match #adminmenu a.menu-top */
background: url(../images/menu-bits.gif) repeat-x scroll left -379px #F1F1F1 !important;
}
body.toplevel_page_roots .ui-state-active,
body.toplevel_page_roots .ui-widget-content .ui-state-active,
body.toplevel_page_roots .ui-widget-header .ui-state-active { background: #fff !important; }
ul.options li { clear: both; margin-bottom: 8px; }
ul.options label.settings-label { font-size: 1em; font-weight: 700; float: left; width: 250px; margin: 3px 0 0 0; }
ul.options input.text { float: left; width: 300px; }
ul.options span.note { clear: both; float: left; margin: 2px 0 8px 250px; display: block; font-size: 0.8em; line-height: 1.5em; }
ul.options div.address { float: left; }
ul.options div.address label { clear: both; float: left; width: 160px; margin: 3px 10px 0 0; }
ul.options div.address input.text { float: left; width: 200px; }
.clearfix { zoom: 1; }
/* search engines blocked message to match .button-primary */
#privacy-on-link {

28
includes/css/options.css Normal file
View File

@@ -0,0 +1,28 @@
/* theme options */
#tabs { margin-top: 1em; }
body.toplevel_page_roots .ui-widget { font-size: 1em !important; font-family: inherit !important; }
body.toplevel_page_roots .ui-widget-header {
/* match #wp-head */
background: #d9d9d9;
background: -moz-linear-gradient(bottom, #d7d7d7, #e4e4e4) !important;
background: -webkit-gradient(linear, left bottom, left top, from(#d7d7d7), to(#e4e4e4)) !important;
}
body.toplevel_page_roots .ui-state-default,
body.toplevel_page_roots .ui-widget-content .ui-state-default,
body.toplevel_page_roots .ui-widget-header .ui-state-default {
/* match #adminmenu a.menu-top */
background: url(../images/menu-bits.gif) repeat-x scroll left -379px #F1F1F1 !important;
}
body.toplevel_page_roots .ui-state-active,
body.toplevel_page_roots .ui-widget-content .ui-state-active,
body.toplevel_page_roots .ui-widget-header .ui-state-active { background: #fff !important; }
ul.options li { clear: both; margin-bottom: 8px; }
ul.options label.settings-label { font-size: 1em; font-weight: 700; float: left; width: 250px; margin: 3px 0 0 0; }
ul.options input.text { float: left; width: 300px; }
ul.options span.note { clear: both; float: left; margin: 2px 0 8px 250px; display: block; font-size: 0.8em; line-height: 1.5em; }
ul.options div.address { float: left; }
ul.options div.address label { clear: both; float: left; width: 160px; margin: 3px 10px 0 0; }
ul.options div.address input.text { float: left; width: 200px; }

View File

Before

Width:  |  Height:  |  Size: 659 B

After

Width:  |  Height:  |  Size: 659 B

7
includes/js/options.js Normal file
View File

@@ -0,0 +1,7 @@
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery("#tabs").tabs();
});

View File

@@ -2,8 +2,6 @@ jQuery.noConflict();
jQuery(document).ready(function(){
jQuery("#tabs").tabs();
// var editor = CodeMirror.fromTextArea('content', {
// height: "350px",
// parserfile: "parsexml.js",

View File

@@ -5,17 +5,17 @@ add_action('admin_init', 'roots_admin_init');
function roots_admin_init() {
$site_url = site_url();
$theme_name = next(explode('/themes/', get_template_directory()));
//wp_register_script('roots_codemirror', "$site_url/wp-content/themes/roots/includes/js/codemirror/codemirror.js");
//wp_enqueue_script('roots_codemirror');
$theme_name = next(explode('/themes/', get_template_directory()));
wp_register_style('roots_admin_css', "$site_url/wp-content/themes/$theme_name/includes/css/admin.css");
wp_enqueue_style('roots_admin_css');
wp_register_script('roots_admin_js', "$site_url/wp-content/themes/$theme_name/includes/js/scripts.js");
wp_enqueue_script('roots_admin_js');
wp_enqueue_script('jquery-ui-tabs');
wp_register_style('roots_admin', "$site_url/wp-content/themes/$theme_name/includes/css/admin.css");
wp_register_script('roots_admin', "$site_url/wp-content/themes/$theme_name/includes/js/scripts.js");
wp_enqueue_style('roots_admin');
wp_enqueue_script('roots_admin');
}
// check to see if the tagline is set to default

View File

@@ -4,17 +4,34 @@
add_action('admin_menu', 'roots_create_menu');
function roots_create_menu() {
$icon = get_template_directory_uri() . '/includes/images/icon-roots.png';
$icon = get_template_directory_uri() . '/includes/img/icon-roots.png';
// create menu
$theme_name = get_current_theme();
add_object_page($theme_name . ' Settings', $theme_name, 'administrator', 'roots', 'roots_settings_page', $icon);
// call register settings function
add_action('admin_init', 'roots_register_settings');
// add js
wp_enqueue_script('jquery-ui-tabs');
// add css
add_action('admin_print_styles-toplevel_page_roots', 'roots_admin_styles');
}
function roots_admin_styles() {
$site_url = site_url();
$theme_name = next(explode('/themes/', get_template_directory()));
wp_register_style('roots_options_css', "$site_url/wp-content/themes/$theme_name/includes/css/options.css");
wp_enqueue_style('roots_options_css');
wp_register_script('roots_options_js', "$site_url/wp-content/themes/$theme_name/includes/js/options.js");
wp_enqueue_script('roots_options_js');
wp_register_style('jquery-ui-css', "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/smoothness/jquery-ui.css");
wp_enqueue_style('jquery-ui-css');
}
function roots_register_settings() {
@@ -111,5 +128,4 @@ function roots_settings_page() { ?>
</form>
</div>
<?php } ?>

View File

@@ -1,5 +1,5 @@
<form role="search" method="get" id="searchform" action="<?php echo home_url('/'); ?>">
<label class="screen-reader-text" for="s">Search for:</label>
<label class="visuallyhidden" for="s">Search for:</label>
<input type="search" value="" name="s" id="s" placeholder="Search <?php bloginfo('name'); ?>">
<input type="submit" id="searchsubmit" value="Search" class="button">
</form>