Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Better JavaScript inclusion
Removed config.js and main.js and altered other JavaScript files so
that their mere inclusion invokes their functionality. If functionality
provided by a particular JS file isn't required, then simply don't
include  them in your project. Any Bootstrap dependencies are
documented in the _scripts.html partial.
  • Loading branch information
aaronallport committed Jun 11, 2013
1 parent 779f3e7 commit 804b8c8
Show file tree
Hide file tree
Showing 20 changed files with 103 additions and 235 deletions.
11 changes: 6 additions & 5 deletions Build/README.html
Expand Up @@ -12,13 +12,13 @@ <h2>1. Getting started with Rock Hammer</h2>

<p>For styling, Rock Hammer uses <a href="http://sass-lang.com">Sass</a>. Hammer For Mac compiles Sass into CSS so you won’t need the Terminal. In most cases, you’ll need to edit just three .scss files to get started:</p>

<h3>rockhammer.scss</h3>
<h3>_imports.scss</h3>

<p>Configure which Sass partials you need for your individual project. We’ve included some of the most useful parts of Bootstrap, but if you don’t need styles for a carousel or a hero box, there’s no sense in including them. Comment out the partials you don’t need //</p>
<p>Configure which Sass partials you need for your individual project. We’ve included some of the most useful parts of Bootstrap, but if you don’t need styles for a carousel or a hero box, there’s no sense in including them. Comment out the partials you don’t need with // at the the beginning of the line on which that partial appears.</p>

<h3>lte-ie8.scss</h3>

<p>For versions of Microsoft Internet Explorer that didn’t implement CSS3 Media Queries, this file contains compiled styles from all stylesheets inside Media Queries. Use this file to also serve styles specifically to Internet Explorer 8 and before. We’re looking into a more streamlined Sass solution. One that doesn’t require a degree in geology.</p>
<p>For versions of Microsoft Internet Explorer that didn’t implement CSS3 Media Queries, this file contains compiled styles from all stylesheets, including those inside Media Queries. These are served up using a completely configurable, conditional class to identify those styles and only apply them to Internet Explorer 8 and before. Use this file to also serve styles specifically to Internet Explorer 8 and before.</p>

<h3>_config.scss</h3>

Expand Down Expand Up @@ -76,7 +76,7 @@ <h2>2. Rock Hammer’s structure</h2>

<p>2.6. Layout for structural styles. Use it in combination with breakpoint files _bp2 – bp6 as required.</p>

<p>2.7. Speaking of breakpoints, there are six placeholder breakpoint files included. Use them as you need. The defaults are:</p>
<p>2.7. Speaking of breakpoints, there are six placeholder breakpoint values included. Use and change them as you need in conjunction with the media-query-bp mixin within your SASS selectors. The defaults are:</p>

<ul>
<li>$bp2 480px 30em </li>
Expand All @@ -86,7 +86,7 @@ <h2>2. Rock Hammer’s structure</h2>
<li>$bp6 1382px 86.375em </li>
</ul>

<p>2.8. Matching HTML partials and Sass partials for forms, tables, navigation and other commonly used interface elements derived from Bootstrap. If there are Bootstrap components you use regularly, add them to the partials folder. Don’t forget to reference them from rock-hammer.scss too.</p>
<p>2.8. Matching HTML partials and Sass partials for forms, tables, navigation and other commonly used interface elements derived from Bootstrap. If there are Bootstrap components you use regularly, add them to the partials folder. Don’t forget to reference them from _imports.scss too. Certain Bootstrap plugins require JavaScript to work correctly, so ensure that the required JavaScript files are referenced correctly from the _scripts.html partial. There are a couple of dependencies with Bootstrap plugins, but these are explained in the comments found in _scripts.html.</p>

<p>2.9. Matching HTML partials and Sass partials for responsive navigation patterns. We’ve included three popular patterns but feel free to add more. Brad Frost’s <a href="http://bradfrost.github.com/this-is-responsive/patterns.html#navigation">Responsive Patterns</a> is a cracking place to start.</p>

Expand All @@ -101,6 +101,7 @@ <h2>2. Rock Hammer’s structure</h2>
<ul>
<li>Copy the HTML from your chosen pattern into the &lt;body&gt; of a new template</li>
<li>Uncomment the pattern you’ve chosen in rock-hammer.scss</li>
<li>Uncomment the pattern you’ve chosen in _scripts.html</li>
</ul>

<h2>3. Using Only the Build Folder</h2>
Expand Down
6 changes: 3 additions & 3 deletions Build/css/lte-ie8.css
Expand Up @@ -154,14 +154,14 @@ h3,
.h3 {
font-size: 20.8px;
font-size: 2.08rem;
line-height: 2.25em;
margin-bottom: 1.15385em; }
line-height: 1.3;
margin-bottom: 1em; }

h4,
.h4 {
font-size: 20px;
font-size: 2rem;
line-height: 1.875em;
line-height: 1.25;
margin-bottom: 1.5em; }

h5,
Expand Down
6 changes: 3 additions & 3 deletions Build/css/rock-hammer.css
Expand Up @@ -159,14 +159,14 @@ h3,
.h3 {
font-size: 20.8px;
font-size: 2.08rem;
line-height: 2.25em;
margin-bottom: 1.15385em; }
line-height: 1.3;
margin-bottom: 1em; }

h4,
.h4 {
font-size: 20px;
font-size: 2rem;
line-height: 1.875em;
line-height: 1.25;
margin-bottom: 1.5em; }

h5,
Expand Down
20 changes: 13 additions & 7 deletions Build/index.html
Expand Up @@ -2151,10 +2151,21 @@ <h2>Popover</h2>
</footer>
</div><!-- container -->

<!-- Load libraries and plugins -->
<!-- Load libraries -->
<script src='js/vendor/jquery-1.8.3-min.js'></script>
<script src='js/vendor/jquery/jquery.scrollTo.min.js'></script>
<script src='js/vendor/bootstrap-min.js'></script>

<!-- Load plugins (including a file turns functionality on) -->
<!-- Load bootstrap-transition first so that nice glides/fades
etc for the other bootstrap plugins work -->
<script src='js/vendor/bootstrap/bootstrap-transition.js'></script>
<script src='js/vendor/bootstrap/bootstrap-carousel.js'></script>
<script src='js/vendor/bootstrap/bootstrap-tooltip.js'></script>
<!-- Popover has a dependency on tooltip, so make sure and include
bootstrap-tooltip regardless in order for popovers to work -->
<script src='js/vendor/bootstrap/bootstrap-popover.js'></script>
<script src='js/vendor/bootstrap/bootstrap-modal.js'></script>
<script src='js/vendor/bootstrap/bootstrap-collapse.js'></script>

<!-- Functionality only used by Rock Hammer -->
<script src='js/navigation-manager.js'></script>
Expand All @@ -2164,11 +2175,6 @@ <h2>Popover</h2>
<script src='js/nav-patterns/left-nav-flyout.js'></script>
<script src='js/nav-patterns/responsive-nav.min.js'></script>

<!-- Load configuration and initialise JavaScripts.
Look in config.js to see how to turn items on/off -->
<script src='js/config.js'></script>
<script src='js/main.js'></script>

<script>
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
Expand Down
58 changes: 0 additions & 58 deletions Build/js/config.js

This file was deleted.

40 changes: 0 additions & 40 deletions Build/js/main.js

This file was deleted.

7 changes: 7 additions & 0 deletions Build/js/nav-patterns/responsive-nav.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Build/js/navigation-manager.js
Expand Up @@ -48,4 +48,10 @@ NavigationManager = {
this.initialiseBackToTopLinks(backToTopTarget);
this.supressDeadLinks();
}
};
};

// Entry point for Nav Manager JS Code
$(document).ready(function() {
// Initialise the navigation manager object
NavigationManager.init("navigation-toggle", "rock-hammer");
});
6 changes: 5 additions & 1 deletion Build/js/vendor/bootstrap/bootstrap-carousel.js
Expand Up @@ -182,4 +182,8 @@
e.preventDefault()
})

}(window.jQuery);
}(window.jQuery);

$(document).ready(function() {
$(".carousel").carousel();
});
6 changes: 5 additions & 1 deletion Build/js/vendor/bootstrap/bootstrap-popover.js
Expand Up @@ -111,4 +111,8 @@
return this
}

}(window.jQuery);
}(window.jQuery);

$(document).ready(function() {
$("a[data-toggle=popover]").popover().click(function(e) {e.preventDefault()});
});
6 changes: 5 additions & 1 deletion Build/js/vendor/bootstrap/bootstrap-tooltip.js
Expand Up @@ -284,4 +284,8 @@
return this
}

}(window.jQuery);
}(window.jQuery);

$(document).ready(function() {
$(".tooltips").tooltip({selector: "a[data-toggle=tooltip]"});
});
13 changes: 7 additions & 6 deletions README.md
Expand Up @@ -16,13 +16,13 @@ Rock Hammer works with [Hammer For Mac](http://hammerformac.com). If you develop

For styling, Rock Hammer uses [Sass](http://sass-lang.com). Hammer For Mac compiles Sass into CSS so you won’t need the Terminal. In most cases, you’ll need to edit just three .scss files to get started:

### rockhammer.scss
### _imports.scss

Configure which Sass partials you need for your individual project. We’ve included some of the most useful parts of Bootstrap, but if you don’t need styles for a carousel or a hero box, there’s no sense in including them. Comment out the partials you don’t need //
Configure which Sass partials you need for your individual project. We’ve included some of the most useful parts of Bootstrap, but if you don’t need styles for a carousel or a hero box, there’s no sense in including them. Comment out the partials you don’t need with // at the the beginning of the line on which that partial appears.

### lte-ie8.scss

For versions of Microsoft Internet Explorer that didn’t implement CSS3 Media Queries, this file contains compiled styles from all stylesheets inside Media Queries. Use this file to also serve styles specifically to Internet Explorer 8 and before. We’re looking into a more streamlined Sass solution. One that doesn’t require a degree in geology.
For versions of Microsoft Internet Explorer that didn’t implement CSS3 Media Queries, this file contains compiled styles from all stylesheets, including those inside Media Queries. These are served up using a completely configurable, conditional class to identify those styles and only apply them to Internet Explorer 8 and before. Use this file to also serve styles specifically to Internet Explorer 8 and before.

### _config.scss

Expand Down Expand Up @@ -76,15 +76,15 @@ Rock Hammer includes Sass partials for the three components of ‘design atmosph

2.6. Layout for structural styles. Use it in combination with breakpoint files _bp2 – bp6 as required.

2.7. Speaking of breakpoints, there are six placeholder breakpoint files included. Use them as you need. The defaults are:
2.7. Speaking of breakpoints, there are six placeholder breakpoint values included. Use and change them as you need in conjunction with the media-query-bp mixin within your SASS selectors. The defaults are:

- $bp2 480px 30em
- $bp3 600px 37.5em
- $bp4 768px 48em
- $bp5 992px 62em
- $bp6 1382px 86.375em

2.8. Matching HTML partials and Sass partials for forms, tables, navigation and other commonly used interface elements derived from Bootstrap. If there are Bootstrap components you use regularly, add them to the partials folder. Don’t forget to reference them from rock-hammer.scss too.
2.8. Matching HTML partials and Sass partials for forms, tables, navigation and other commonly used interface elements derived from Bootstrap. If there are Bootstrap components you use regularly, add them to the partials folder. Don’t forget to reference them from _imports.scss too. Certain Bootstrap plugins require JavaScript to work correctly, so ensure that the required JavaScript files are referenced correctly from the _scripts.html partial. There are a couple of dependencies with Bootstrap plugins, but these are explained in the comments found in _scripts.html.

2.9. Matching HTML partials and Sass partials for responsive navigation patterns. We’ve included three popular patterns but feel free to add more. Brad Frost’s [Responsive Patterns](http://bradfrost.github.com/this-is-responsive/patterns.html#navigation) is a cracking place to start.

Expand All @@ -96,6 +96,7 @@ To use these navigation patterns:

- Copy the HTML from your chosen pattern into the <body> of a new template
- Uncomment the pattern you’ve chosen in rock-hammer.scss
- Uncomment the pattern you’ve chosen in _scripts.html



Expand Down Expand Up @@ -169,4 +170,4 @@ We built Rock Hammer to work with [Hammer For Mac](http://hammerformac.com). It
3. [jQuery](http://jquery.com)
4. [Modernizr](http://modernizr.com)
5. [Responsive Patterns](http://bradfrost.github.com/this-is-responsive/patterns.html)
6. [Selectivizr](http://selectivizr.com)
6. [Selectivizr](http://selectivizr.com)
58 changes: 0 additions & 58 deletions js/config.js

This file was deleted.

0 comments on commit 804b8c8

Please sign in to comment.