Remove all frameworks except Bootstrap (#251)

- Remove all frameworks except Bootstrap

- Remove roots-options.php and replace with a more simple
  roots-config.php

- Include all Bootstrap Javascript plugins by default in
  js/plugins.js

- Use Bootstrap Responsive and Topbar navigation by default

- Use Bootstrap markup on forms, page titles, image galleries,
  alerts and errors, post and comment navigation

- Remove Roots styles from style.css and introduce app.css for
  site-specific CSS. Remove almost all previous default Roots
  styles.

- Add latest updates from H5BP project
This commit is contained in:
Ben Word
2012-02-03 12:10:44 -07:00
parent 7266dae71b
commit 3c3b71fac0
143 changed files with 7480 additions and 17483 deletions

View File

@@ -6,71 +6,6 @@ function roots_scripts() {
wp_register_script('roots_script', ''.$template_uri.'/js/script.js', false, null, false);
wp_enqueue_script('roots_plugins');
wp_enqueue_script('roots_script');
if (roots_current_framework() === '1140') {
wp_register_script('css3-mediaqueries', ''.$template_uri.'/js/libs/css3-mediaqueries.js', false, null, false);
wp_enqueue_script('css3-mediaqueries');
}
if (roots_current_framework() === 'adapt') {
wp_register_script('adapt', ''.$template_uri.'/js/libs/adapt.min.js', false, null, false);
wp_enqueue_script('adapt');
}
if (roots_current_framework() === 'foundation') {
wp_register_script('foundation-jquery-reveal', ''.$template_uri.'/js/foundation/jquery.reveal.js', false, null, false);
wp_register_script('foundation-jquery-orbit', ''.$template_uri.'/js/foundation/jquery.orbit-1.3.0.js', false, null, false);
wp_register_script('foundation-forms-jquery', ''.$template_uri.'/js/foundation/forms.jquery.js', false, null, false);
wp_register_script('foundation-jquery-customforms', ''.$template_uri.'/js/foundation/jquery.customforms.js', false, null, false);
wp_register_script('foundation-jquery-placeholder', ''.$template_uri.'/js/foundation/jquery.placeholder.min.js', false, null, false);
wp_register_script('foundation-app', ''.$template_uri.'/js/foundation/app.js', false, null, false);
wp_enqueue_script('foundation-jquery-reveal');
wp_enqueue_script('foundation-jquery-orbit');
wp_enqueue_script('foundation-forms-jquery');
wp_enqueue_script('foundation-jquery-customforms');
wp_enqueue_script('foundation-jquery-placeholder');
wp_enqueue_script('foundation-app');
}
if (roots_current_framework() === 'bootstrap' || roots_current_framework() === 'bootstrap_less') {
global $roots_options;
$roots_bootstrap_js = $roots_options['bootstrap_javascript'];
$roots_bootstrap_less_js = $roots_options['bootstrap_less_javascript'];
$template_uri = get_template_directory_uri();
if (roots_current_framework() === 'bootstrap_less') {
wp_register_script('bootstrap-less', ''.$template_uri.'/js/bootstrap/less-1.2.1.min.js', false, null, false);
wp_enqueue_script('bootstrap-less');
}
if ($roots_bootstrap_js === true || $roots_bootstrap_less_js === true) {
$roots_options['bootstrap_less_javascript'] = false;
$roots_options['bootstrap_javascript'] = false;
wp_register_script('bootstrap-transition', ''.$template_uri.'/js/bootstrap/bootstrap-transition.js', false, null, false);
wp_register_script('bootstrap-alert', ''.$template_uri.'/js/bootstrap/bootstrap-alert.js', false, null, false);
wp_register_script('bootstrap-modal', ''.$template_uri.'/js/bootstrap/bootstrap-modal.js', false, null, false);
wp_register_script('bootstrap-dropdown', ''.$template_uri.'/js/bootstrap/bootstrap-dropdown.js', false, null, false);
wp_register_script('bootstrap-scrollspy', ''.$template_uri.'/js/bootstrap/bootstrap-scrollspy.js', false, null, false);
wp_register_script('bootstrap-tab', ''.$template_uri.'/js/bootstrap/bootstrap-tab.js', false, null, false);
wp_register_script('bootstrap-tooltip', ''.$template_uri.'/js/bootstrap/bootstrap-tooltip.js', false, null, false);
wp_register_script('bootstrap-popover', ''.$template_uri.'/js/bootstrap/bootstrap-popover.js', false, null, false);
wp_register_script('bootstrap-button', ''.$template_uri.'/js/bootstrap/bootstrap-button.js', false, null, false);
wp_register_script('bootstrap-collapse', ''.$template_uri.'/js/bootstrap/bootstrap-collapse.js', false, null, false);
wp_register_script('bootstrap-carousel', ''.$template_uri.'/js/bootstrap/bootstrap-carousel.js', false, null, false);
wp_register_script('bootstrap-typehead', ''.$template_uri.'/js/bootstrap/bootstrap-typehead.js', false, null, false);
wp_enqueue_script('bootstrap-modal');
wp_enqueue_script('bootstrap-alert');
wp_enqueue_script('bootstrap-modal');
wp_enqueue_script('bootstrap-dropdown');
wp_enqueue_script('bootstrap-scrollspy');
wp_enqueue_script('bootstrap-tab');
wp_enqueue_script('bootstrap-tooltip');
wp_enqueue_script('bootstrap-popover');
wp_enqueue_script('bootstrap-button');
wp_enqueue_script('bootstrap-collapse');
wp_enqueue_script('bootstrap-carousel');
wp_enqueue_script('bootstrap-typehead');
}
}
}
add_action('wp_enqueue_scripts', 'roots_scripts');
@@ -99,8 +34,8 @@ function roots_print_scripts() {
echo "\t" . implode("\n\t", $scripts) . "\n";
$template_uri = get_template_directory_uri();
echo "\t<script defer src=\"$template_uri/js/plugins.js\"></script>\n";
echo "\t<script defer src=\"$template_uri/js/script.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/plugins.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/script.js\"></script>\n";
$wp_scripts->reset();
return $wp_scripts->done;