Skip to content

Commit

Permalink
Add top level bowerrc, bower.json, and update .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Jan 15, 2014
1 parent 274ade9 commit 8b28700
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "js/bower_components"
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
node_modules
bower_components
components
polymer-all
_site
.DS_Store
*.pyc
.sass-cache
*.vulcanized.html
*.sublime-*
3 changes: 3 additions & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@
<script src="/js/jquery-1.10.2.min.js"></script>
<script src="/bootstrap/js/bootstrap.min.js"></script>
<!-- <script src="/css/flatui/js/bootstrap.min.js"></script> -->

<script src="/js/bower_components/smoothscroll/smoothscroll.js"></script>

<script src="/js/app.js"></script>
26 changes: 26 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "polymer-site",
"version": "0.0.0",
"homepage": "https://github.com/Polymer/docs",
"authors": [
"Eric Bidelman <[email protected]>"
],
"description": "Polymer website",
"keywords": [
"polymer",
"web components",
"documentation"
],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"smoothscroll": "~0.0.2"
}
}
18 changes: 13 additions & 5 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,20 @@ $(document).ready(function() {
// Insure add current page to history so back button has an URL for popstate.
history.pushState({url: document.location.href}, document.title,
document.location.href);
});

document.querySelector('[data-twitter-follow]').addEventListener('click', function(e) {
document.addEventListener('click', function(e) {
var target = e.target.parentElement;
if (target.classList.contains('bar')) {
exports.scrollTo(0, target.offsetTop, {behavior: 'smooth'});
e.preventDefault();
var target = e.target.localName != 'a' ? e.target.parentElement : e.target;
exports.open(target.href, '', 'width=550,height=520');
});
}
});

document.querySelector('[data-twitter-follow]').addEventListener('click', function(e) {
e.preventDefault();
var target = e.target.localName != 'a' ? e.target.parentElement : e.target;
exports.open(target.href, '', 'width=550,height=520');
});

// -------------------------------------------------------------------------- //
Expand All @@ -239,6 +247,6 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga
// ---------------

console && console.log("%cWelcome to Polymer!\n%cweb components are the <bees-knees>",
"font-size:1.5em;color:navy;", "color:#ffcc00;font-size:1em;");
"font-size:1.5em;color:#4558c9;", "color:#d61a7f;font-size:1em;");

})(window);

0 comments on commit 8b28700

Please sign in to comment.