diff --git a/css/style.css b/css/style.css index c62d957..57dc4e7 100644 --- a/css/style.css +++ b/css/style.css @@ -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 diff --git a/includes/css/admin.css b/includes/css/admin.css index 64b9ddd..37cda68 100644 --- a/includes/css/admin.css +++ b/includes/css/admin.css @@ -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 { diff --git a/includes/css/options.css b/includes/css/options.css new file mode 100644 index 0000000..cb3414e --- /dev/null +++ b/includes/css/options.css @@ -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; } \ No newline at end of file diff --git a/includes/images/icon-roots.png b/includes/img/icon-roots.png similarity index 100% rename from includes/images/icon-roots.png rename to includes/img/icon-roots.png diff --git a/includes/js/options.js b/includes/js/options.js new file mode 100644 index 0000000..087401d --- /dev/null +++ b/includes/js/options.js @@ -0,0 +1,7 @@ +jQuery.noConflict(); + +jQuery(document).ready(function(){ + + jQuery("#tabs").tabs(); + +}); \ No newline at end of file diff --git a/includes/js/scripts.js b/includes/js/scripts.js index d3d84a2..bd51904 100644 --- a/includes/js/scripts.js +++ b/includes/js/scripts.js @@ -2,8 +2,6 @@ jQuery.noConflict(); jQuery(document).ready(function(){ - jQuery("#tabs").tabs(); - // var editor = CodeMirror.fromTextArea('content', { // height: "350px", // parserfile: "parsexml.js", diff --git a/includes/roots-admin.php b/includes/roots-admin.php index dbaad90..6cfed7e 100644 --- a/includes/roots-admin.php +++ b/includes/roots-admin.php @@ -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_script('roots_codemirror', "$site_url/wp-content/themes/roots/includes/js/codemirror/codemirror.js"); + //wp_enqueue_script('roots_codemirror'); + + 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 diff --git a/includes/roots-options.php b/includes/roots-options.php index 4d6d57f..728aca0 100644 --- a/includes/roots-options.php +++ b/includes/roots-options.php @@ -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(); - + // 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() { ?> - - + \ No newline at end of file diff --git a/searchform.php b/searchform.php index 7efa83c..702e135 100644 --- a/searchform.php +++ b/searchform.php @@ -1,5 +1,5 @@
\ No newline at end of file