[ADD] Added the max content width for 960gs + clear div

This commit is contained in:
Joanthan Liuti
2011-04-01 11:32:40 +02:00
parent 5872c57923
commit 816b1ab28c
12 changed files with 53 additions and 21 deletions

View File

@@ -11,5 +11,6 @@
<?php get_sidebar(); ?> <?php get_sidebar(); ?>
</div> </div>
</aside><!-- /#sidebar --> </aside><!-- /#sidebar -->
<?php echo get_roots_960gs_cleardiv() ?>
</div><!-- /#content --> </div><!-- /#content -->
<?php get_footer(); ?> <?php get_footer(); ?>

View File

@@ -25,6 +25,7 @@
<?php } ?> <?php } ?>
</div> </div>
<?php echo get_roots_960gs_cleardiv() ?>
</footer> </footer>
</div><!-- /#wrap --> </div><!-- /#wrap -->
<?php wp_footer(); ?> <?php wp_footer(); ?>

View File

@@ -10,5 +10,6 @@
<?php get_sidebar(); ?> <?php get_sidebar(); ?>
</div> </div>
</aside><!-- /#sidebar --> </aside><!-- /#sidebar -->
<?php echo get_roots_960gs_cleardiv() ?>
</div><!-- /#content --> </div><!-- /#content -->
<?php get_footer(); ?> <?php get_footer(); ?>

View File

@@ -10,15 +10,26 @@ include_once('includes/roots-htaccess.php'); // h5bp htaccess
// set the value of the main container class depending on the selected grid framework // set the value of the main container class depending on the selected grid framework
$roots_selected_css_framework = get_option('roots_css_framework'); $roots_selected_css_framework = get_option('roots_css_framework');
if (!defined('CONTAINER_CLASS')){ if (!defined('CONTAINER_CLASS')){
if ($roots_selected_css_framework === 'blueprint') if ($roots_selected_css_framework === 'blueprint'){
define('CONTAINER_CLASS', 'span-24'); define('CONTAINER_CLASS', 'span-24');
elseif ($roots_selected_css_framework === '960gs_12') define('IS_960_GS',False);
}
elseif ($roots_selected_css_framework === '960gs_12'){
define('CONTAINER_CLASS', 'container_12'); define('CONTAINER_CLASS', 'container_12');
elseif ($roots_selected_css_framework === '960gs_16') define('IS_960_GS',True);
}
elseif ($roots_selected_css_framework === '960gs_16'){
define('CONTAINER_CLASS', 'container_16'); define('CONTAINER_CLASS', 'container_16');
elseif ($roots_selected_css_framework === '960gs_24') define('IS_960_GS',True);
}
elseif ($roots_selected_css_framework === '960gs_24'){
define('CONTAINER_CLASS', 'container_24'); define('CONTAINER_CLASS', 'container_24');
else define('CONTAINER_CLASS', ''); define('IS_960_GS',True);
}
else {
define('CONTAINER_CLASS', '');
define('IS_960_GS',False);
}
} }
@@ -46,10 +57,13 @@ EOD;
} }
} }
function get_roots_960gs_cleardiv() {
if (IS_960_GS) return "<div class=\"clear\" ></div>";
else return "";
}
// set the maximum 'Large' image width to the Blueprint grid maximum width // set the maximum 'Large' image width to the Blueprint grid maximum width
if (!isset($content_width)) $content_width = 950; if (!isset($content_width)) $roots_selected_css_framework === 'blueprint' ? $content_width = 950 : $content_width = 940;
// tell the TinyMCE editor to use editor-style.css // tell the TinyMCE editor to use editor-style.css
// if you have issues with getting the editor to show your changes then use the following line: // if you have issues with getting the editor to show your changes then use the following line:

View File

@@ -11,12 +11,17 @@
<meta name="viewport" content="width=device-width; initial-scale=1.0"> <meta name="viewport" content="width=device-width; initial-scale=1.0">
<?php echo get_roots_css_framework_stylesheets(); ?> <?php echo get_roots_css_framework_stylesheets(); ?>
<?php if (class_exists('RGForms')) { ?>
<link rel="stylesheet" href="<?php echo plugins_url(); ?>/gravityforms/css/forms.css"> <?php if (class_exists('RGForms')) { ?>
<?php } ?> <link rel="stylesheet" href="<?php echo plugins_url(); ?>/gravityforms/css/forms.css">
<?php } ?>
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/style.css"> <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/style.css">
<!--[if lt IE 8]><link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/blueprint/ie.css"><![endif]-->
<?php if(!IS_960_GS) { ?>
<!--[if lt IE 8]><link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/blueprint/ie.css"><![endif]-->
<?php } ?>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> Feed" href="<?php site_url(); ?>/feed/"> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> Feed" href="<?php site_url(); ?>/feed/">
<script src="<?php echo get_stylesheet_directory_uri(); ?>/js/libs/modernizr-1.7.min.js"></script> <script src="<?php echo get_stylesheet_directory_uri(); ?>/js/libs/modernizr-1.7.min.js"></script>
@@ -26,14 +31,14 @@
<?php wp_head(); ?> <?php wp_head(); ?>
<script src="<?php echo get_stylesheet_directory_uri(); ?>/js/scripts.js"></script> <script src="<?php echo get_stylesheet_directory_uri(); ?>/js/scripts.js"></script>
<?php if (get_option('roots_google_analytics') !== "") { ?> <?php if (get_option('roots_google_analytics') !== "") { ?>
<script> <script>
var _gaq=[["_setAccount","<?php echo get_option('roots_google_analytics') ?>"],["_trackPageview"]]; var _gaq=[["_setAccount","<?php echo get_option('roots_google_analytics') ?>"],["_trackPageview"]];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1; (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js"; g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
s.parentNode.insertBefore(g,s)}(document,"script")); s.parentNode.insertBefore(g,s)}(document,"script"));
</script> </script>
<?php } ?> <?php } ?>
</head> </head>
<body <?php $page_slug = $post->post_name; body_class($page_slug); ?>> <body <?php $page_slug = $post->post_name; body_class($page_slug); ?>>
<div id="wrap" class="container" role="document"> <div id="wrap" class="container" role="document">
@@ -47,4 +52,7 @@
<?php wp_nav_menu(array('theme_location' => 'utility_navigation')); ?> <?php wp_nav_menu(array('theme_location' => 'utility_navigation')); ?>
</nav> </nav>
</div> </div>
<?php echo get_roots_960gs_cleardiv() ?>
</header> </header>

View File

@@ -11,5 +11,6 @@
<?php get_sidebar(); ?> <?php get_sidebar(); ?>
</div> </div>
</aside><!-- /#sidebar --> </aside><!-- /#sidebar -->
<?php echo get_roots_960gs_cleardiv() ?>
</div><!-- /#content --> </div><!-- /#content -->
<?php get_footer(); ?> <?php get_footer(); ?>

View File

@@ -14,5 +14,6 @@ get_header(); ?>
<?php get_sidebar(); ?> <?php get_sidebar(); ?>
</div> </div>
</aside><!-- /#sidebar --> </aside><!-- /#sidebar -->
<?php echo get_roots_960gs_cleardiv() ?>
</div><!-- /#content --> </div><!-- /#content -->
<?php get_footer(); ?> <?php get_footer(); ?>

View File

@@ -20,5 +20,6 @@ get_header(); ?>
<?php get_sidebar(); ?> <?php get_sidebar(); ?>
</div> </div>
</aside><!-- /#sidebar --> </aside><!-- /#sidebar -->
<?php echo get_roots_960gs_cleardiv() ?>
</div><!-- /#content --> </div><!-- /#content -->
<?php get_footer(); ?> <?php get_footer(); ?>

View File

@@ -21,5 +21,6 @@ get_header(); ?>
<?php get_sidebar(); ?> <?php get_sidebar(); ?>
</div> </div>
</aside><!-- /#sidebar --> </aside><!-- /#sidebar -->
<?php echo get_roots_960gs_cleardiv() ?>
</div><!-- /#content --> </div><!-- /#content -->
<?php get_footer(); ?> <?php get_footer(); ?>

View File

@@ -10,5 +10,6 @@
<?php get_sidebar(); ?> <?php get_sidebar(); ?>
</div> </div>
</aside><!-- /#sidebar --> </aside><!-- /#sidebar -->
<?php echo get_roots_960gs_cleardiv() ?>
</div><!-- /#content --> </div><!-- /#content -->
<?php get_footer(); ?> <?php get_footer(); ?>

View File

@@ -11,5 +11,6 @@
<?php get_sidebar(); ?> <?php get_sidebar(); ?>
</div> </div>
</aside><!-- /#sidebar --> </aside><!-- /#sidebar -->
<?php echo get_roots_960gs_cleardiv() ?>
</div><!-- /#content --> </div><!-- /#content -->
<?php get_footer(); ?> <?php get_footer(); ?>

View File

@@ -9,6 +9,7 @@
<div class="container"> <div class="container">
<?php get_sidebar(); ?> <?php get_sidebar(); ?>
</div> </div>
</aside><!-- /#sidebar --> </aside><!-- /#sidebar -->
<?php echo get_roots_960gs_cleardiv() ?>
</div><!-- /#content --> </div><!-- /#content -->
<?php get_footer(); ?> <?php get_footer(); ?>