Skip to content

Commit

Permalink
docs(home): fix center
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Stanislawski committed Dec 23, 2015
1 parent af6db39 commit bc12b23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docs/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ layout: default
%p#top The easiest way to add search to your documentation.
.jumbotron-left-column
%div.index-container
%svg.index
= File.read('img/illus-index.svg')
%img.index{:src => "./img/illus-index.svg"}
%div.ripple
.spacer30
.text-center
Expand Down
6 changes: 3 additions & 3 deletions docs/js/animation.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
document.addEventListener("DOMContentLoaded", function(){
var box = getIndexDomPosition();

var center = [box[0], box[1] + 40];
var center = [box[0] + 60, box[1] + 20];

var particles = [];
for(var i=0; i<10; i++) {
Expand Down Expand Up @@ -92,7 +92,7 @@ document.addEventListener("DOMContentLoaded", function(){
}

function getIndexDomPosition() {
var position = document.querySelector('#index').getBBox();
return [position.x , position.y ];
var position = jQuery('.index').position();
return [position.left, position.top];
}
});

0 comments on commit bc12b23

Please sign in to comment.