Skip to content

Commit

Permalink
Merge pull request #25 from ugwulo/adding-cursor-animation
Browse files Browse the repository at this point in the history
Adding cursor animation
  • Loading branch information
grace-omotoso committed Jul 23, 2021
2 parents db57e69 + c3e5bd9 commit f25e15b
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -69,4 +69,4 @@ DEPENDENCIES
webrick (~> 1.7)

BUNDLED WITH
2.2.3
2.2.3
1 change: 1 addition & 0 deletions _includes/header.html
Expand Up @@ -29,6 +29,7 @@
src="https://jsxss.com/assets/xss.js"
crossorigin="anonymous"
></script>
<script src="/assets/scripts/script.js"></script>

<!-- Bootstrap CSS -->
<link
Expand Down
22 changes: 21 additions & 1 deletion _sass/all.scss
Expand Up @@ -130,7 +130,6 @@ a {
display: none;
top: 0;
left: 0;
cursor: pointer;
}
.project:hover {
background-color: #1c539f;
Expand All @@ -145,4 +144,25 @@ a {

.arrow {
float: right;
cursor:pointer;
}
.circle {
position: absolute;
border: solid 2px #1c539f;
width: 10px;
height: 10px;
border-radius: 50%;
background-color: white;

}
.circle::after{
content: "";
width:50px;
height:50px;
position:absolute;
border: solid 4px #1c539f;
border-radius: 50%;
opacity: .8;
top: -23px;
right:-21px;
}
1 change: 1 addition & 0 deletions _sass/contact.scss
Expand Up @@ -43,6 +43,7 @@
outline: none;
opacity: 0.8;
transition: 0.5s;
position:relative;
}
button:hover {
opacity: 1.5;
Expand Down
1 change: 1 addition & 0 deletions _sass/footer.scss
Expand Up @@ -15,6 +15,7 @@
display: flex;
justify-content: center;
padding: 20px 0;
position:relative;
}

.footer-icons a {
Expand Down
1 change: 1 addition & 0 deletions _sass/navbar.scss
Expand Up @@ -23,6 +23,7 @@ nav {
border: 1px solid white;
font-weight: 600;
color: #1c539f;
position:relative;
}

.resume-button:hover {
Expand Down
17 changes: 17 additions & 0 deletions assets/scripts/script.js
@@ -0,0 +1,17 @@
jQuery(document).ready(function() {

var mouseX = 0, mouseY = 0;
var xp = 0, yp = 0;

$(document).mousemove(function(e){
mouseX = e.pageX - 10;
mouseY = e.pageY - 10;
});

setInterval(function(){
xp += ((mouseX - xp)/6);
yp += ((mouseY - yp)/6);
$("#circle").css({left: xp +'px', top: yp +'px'});
}, 20);

});
2 changes: 2 additions & 0 deletions index.html
Expand Up @@ -5,6 +5,8 @@
{% include header.html %}

<body>
<span id="circle" class="circle"></span>

{% include navbar.html %}

{% include profile.html %}
Expand Down

0 comments on commit f25e15b

Please sign in to comment.