Skip to content
Browse files

Fixed some bugs and added some clearfixes to styles

  • Loading branch information...
1 parent 011ca1b commit 43190faf905387ed1d3e29652396f5142f4ebfe4 @sebnitu committed
Showing with 40 additions and 18 deletions.
  1. +1 −2 README.md
  2. +13 −0 bd.styles.css
  3. +19 −15 bd.ui.js
  4. +2 −0 bootstrap.js
  5. +5 −1 demo.html
View
3 README.md
@@ -1,9 +1,8 @@
# BaseDemo
BaseDemo is just a basic template that can be used for creating demos for your development projects. It also works great for [GitHub Pages](http://pages.github.com/). This is an example of what you could do with this template and some content types.
-*By Sebastian Nitu*
+By Sebastian Nitu
-Plugin URI: [https://github.com/sebnitu/BaseDemo](https://github.com/sebnitu/BaseDemo)
Author URI: [http://sebnitu.com/](http://sebnitu.com/)
Online Demo: [http://sebnitu.github.com/BaseDemo/](http://sebnitu.github.com/BaseDemo/)
View
13 bd.styles.css
@@ -114,6 +114,11 @@ h2 {
text-transform: uppercase;
letter-spacing: 1px;
}
+h3 {
+ font-size: 16px;
+ color: #303030;
+ margin: 20px 0 10px 0;
+}
p {
margin: 15px 0;
}
@@ -218,6 +223,9 @@ table tr:nth-child(even) td {
-ms-transform:rotate(45deg);
filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1.5);
}
+.ie9 .sep .arrow {
+ display: none;
+}
.sep .left-arrow {
left: -12px;
}
@@ -395,8 +403,13 @@ table tr:nth-child(even) td {
@Main
---------------------------------------------*/
+.description:before, .description:after {
+ content: "\0020"; display: block; height: 0; visibility: hidden;
+}
+.description:after { clear: both; }
.description {
padding: 1% 6% 2%;
+ zoom: 1;
}
.description h2 {
background: #dd390d;
View
34 bd.ui.js
@@ -14,41 +14,45 @@
When Document is Ready (no conflict mode)
---------------------------------------------*/
-(function($) {
+(function ($) {
+
+ $(document).ready(function () {
+
+ $('.demo').each(function () {
- $(document).ready(function() {
-
- $('.demo').each(function() {
-
var tabs = $(this).find('.tabs a'),
panels = $(this).find('.panel').hide(),
hash = window.location.hash;
-
+
$(this).find('.tabs a:first').addClass('active');
$(this).find('.panel:first').show();
-
- tabs.click(function() {
+
+ tabs.click(function () {
var active = $(this).attr("href");
-
+
// Toggle active class
tabs.parent().removeClass('active');
$(this).parent().addClass('active');
-
+
// Toggle selected panel
panels.hide();
$(active).show();
-
+
// Prevent default behavior
return false;
});
-
+
});
-
+
var nav = $('.nav'),
footer = $('.footer');
-
+
nav.find('.download a').prepend('<img src="' + myScriptSrc + 'bd.download.png">');
- footer.append('<p>Powered by <a href="https://github.com/sebnitu/BaseDemo">BaseDemo</a>. Code responsibly.</p>');
+
+ // For some reason IE 8 and below does not like this rule
+ if ($.browser.msie && ($.browser.version < 9.0) ) { } else {
+ footer.append('<p>Powered by <a href="https://github.com/sebnitu/BaseDemo">BaseDemo</a>. Code responsibly.</p>');
+ }
});
View
2 bootstrap.js
@@ -30,6 +30,8 @@ document.write(unescape('%3Clink rel="stylesheet" media="all" href="' + myScript
!window.jQuery && document.write(unescape('%3Cscript src="' + myScriptSrc + 'bd.jquery.min.js"%3E%3C/script%3E'));
// Included baseDemo JavaScript
document.write(unescape('%3Cscript src="' + myScriptSrc + 'bd.ui.js"%3E%3C/script%3E'));
+// Mobile viewport optimized
+document.write(unescape('%3Cmeta name="viewport" content="width=device-width, initial-scale=1.0"%3E'));
/*-------------------------------------------
Fin
View
6 demo.html
@@ -1,5 +1,9 @@
<!DOCTYPE html>
-<html>
+<!--[if lt IE 7]><html class="ie9 ie8 ie7 ie6" lang="en"><![endif]-->
+<!--[if IE 7]><html class="ie9 ie8 ie7" lang="en"><![endif]-->
+<!--[if IE 8]><html class="ie9 ie8" lang="en"><![endif]-->
+<!--[if IE 9]><html class="ie9" lang="en"><![endif]-->
+<!--[if gt IE 9]><!--><html lang="en"><!--<![endif]-->
<head>
<title>BaseDemo - {{project-name}}</title>

0 comments on commit 43190fa

Please sign in to comment.
Something went wrong with that request. Please try again.