4 |
5 | Append On Mousemove | Javascript
6 |
7 |
8 |
9 |
27 |
28 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Alan Binu
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/LoaderLogo.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./heart.css";
3 |
4 | class LogoLoader extends React.Component {
5 | render() {
6 | document.addEventListener("mousemove", function (e) {
7 | var body = document.querySelector("body");
8 | var heart = document.createElement("span1");
9 | var x = e.offsetX;
10 | var y = e.offsetY;
11 | heart.style.left = x + "px";
12 | heart.style.top = y + "px";
13 | var size = Math.random() * 100;
14 | heart.style.width = 20 + size + "px";
15 | heart.style.height = 20 + size + "px";
16 | // if(window.location.href=="https://alanbinu-portfolio.web.app/#/" || window.location.href=="https://alanbinu-portfolio.web.app/#/splash"){
17 | // body.appendChild(heart);
18 | // }
19 | if(window.location.href=="http://localhost:3000/#/" || window.location.href=="http://localhost:3000/#/splash"){
20 | body.appendChild(heart);
21 | }
22 | setTimeout(function () {
23 | heart.remove();
24 | }, 2000);
25 | });
26 |
27 | const theme = this.props.theme;
28 | return (
29 | <>
30 |