Skip to content

Commit

Permalink
refactor: refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Aziz Rakhim committed Jul 16, 2023
1 parent 0b5fce6 commit b9d9c7d
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 110 deletions.
1 change: 0 additions & 1 deletion src/components/About.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import { Tilt } from "react-tilt";
import { motion } from "framer-motion";

Expand Down
6 changes: 1 addition & 5 deletions src/components/Contact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ const Contact = () => {

setLoading(true);

// template_z4fxm39
// service_shal8ho
// frw9wN4zpY-axT1k2

emailjs
.send(
"service_shal8ho",
Expand Down Expand Up @@ -123,7 +119,7 @@ const Contact = () => {

<motion.div
variants={slideIn("right", "tween", 0.2, 1)}
className="xl:flex-1 xl:h-auto md:h-[550px] h-[350px]"
className="xl:flex-1 xl:h-auto md:h-[550px] h-[350px] cursor-pointer"
>
<EarthCanvas />
</motion.div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Experience.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ExperienceCard = ({ experience }) => (
<div>
<h3 className="text-white text-[24px] font-bold">{experience.title}</h3>
<p
className="text-secondary text-[16p] font-semibold"
className="text-secondary text-[16px] font-semibold"
style={{ margin: 0 }}
>
{experience.company_name}
Expand Down
1 change: 0 additions & 1 deletion src/components/Loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const Loader = () => {

return (
<Html>
<span className="canvas-load"></span>
<p
style={{
fontSize: 14,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react";
import { useState } from "react";
import { Link } from "react-router-dom";

import { styles } from "../styles";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tech.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Tech = () => {
return (
<div className="flex flex-row flex-wrap justify-center gap-10">
{technologies.map((technology) => (
<div className="w-28 h-28" key={technology.name}>
<div className="w-28 h-28 cursor-pointer" key={technology.name}>
<BallCanvas icon={technology.icon} />
</div>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Works.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const ProjectCard = ({
>
<img
src={github}
alt="github"
alt="website"
className="w-1/2 h-1/2 object-contain"
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/canvas/Ball.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Suspense } from "react";
import { Suspense } from "react";
import { Canvas } from "@react-three/fiber";
import {
Decal,
Expand Down Expand Up @@ -38,7 +38,7 @@ const Ball = (props) => {

const BallCanvas = ({ icon }) => {
return (
<Canvas frameloop="demand" gl={{ preserveDrawingBuffer: true }}>
<Canvas frameloop="always" gl={{ preserveDrawingBuffer: true }}>
<Suspense fallback={<CanvasLoader />}>
<OrbitControls enableZoom={false} />
<Ball imgUrl={icon} />
Expand Down
1 change: 1 addition & 0 deletions src/components/canvas/Computers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const ComputerCanvas = () => {
shadows
camera={{ position: [20, 3, 5], fov: 25 }}
gl={{ preserveDrawingBuffer: true }}
className="cursor-pointer "
>
<Suspense fallback={<CanvasLoader />}>
<OrbitControls
Expand Down
2 changes: 1 addition & 1 deletion src/components/canvas/Earth.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Suspense } from "react";
import { Canvas } from "@react-three/fiber";
import { OrbitControls, Preload, useGLTF } from "@react-three/drei";
import { OrbitControls, useGLTF } from "@react-three/drei";

import CanvasLoader from "../Loader";

Expand Down
89 changes: 0 additions & 89 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,92 +113,3 @@
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

/* canvas- styles */
.canvas-loader {
font-size: 10px;
width: 1em;
height: 1em;
border-radius: 50%;
position: relative;
text-indent: -9999em;
animation: mulShdSpin 1.1s infinite ease;
transform: translateZ(0);
}

@keyframes mulShdSpin {
0%,
100% {
box-shadow: 0em -2.6em 0em 0em #ffffff,
1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2),
2.5em 0em 0 0em rgba(255, 255, 255, 0.2),
1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2),
0em 2.5em 0 0em rgba(255, 255, 255, 0.2),
-1.8em 1.8em 0 0em rgba(255, 255, 255, 0.2),
-2.6em 0em 0 0em rgba(255, 255, 255, 0.5),
-1.8em -1.8em 0 0em rgba(255, 255, 255, 0.7);
}
12.5% {
box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.7),
1.8em -1.8em 0 0em #ffffff, 2.5em 0em 0 0em rgba(255, 255, 255, 0.2),
1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2),
0em 2.5em 0 0em rgba(255, 255, 255, 0.2),
-1.8em 1.8em 0 0em rgba(255, 255, 255, 0.2),
-2.6em 0em 0 0em rgba(255, 255, 255, 0.2),
-1.8em -1.8em 0 0em rgba(255, 255, 255, 0.5);
}
25% {
box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.5),
1.8em -1.8em 0 0em rgba(255, 255, 255, 0.7), 2.5em 0em 0 0em #ffffff,
1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2),
0em 2.5em 0 0em rgba(255, 255, 255, 0.2),
-1.8em 1.8em 0 0em rgba(255, 255, 255, 0.2),
-2.6em 0em 0 0em rgba(255, 255, 255, 0.2),
-1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2);
}
37.5% {
box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2),
1.8em -1.8em 0 0em rgba(255, 255, 255, 0.5),
2.5em 0em 0 0em rgba(255, 255, 255, 0.7), 1.75em 1.75em 0 0em #ffffff,
0em 2.5em 0 0em rgba(255, 255, 255, 0.2),
-1.8em 1.8em 0 0em rgba(255, 255, 255, 0.2),
-2.6em 0em 0 0em rgba(255, 255, 255, 0.2),
-1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2);
}
50% {
box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2),
1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2),
2.5em 0em 0 0em rgba(255, 255, 255, 0.5),
1.75em 1.75em 0 0em rgba(255, 255, 255, 0.7), 0em 2.5em 0 0em #ffffff,
-1.8em 1.8em 0 0em rgba(255, 255, 255, 0.2),
-2.6em 0em 0 0em rgba(255, 255, 255, 0.2),
-1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2);
}
62.5% {
box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2),
1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2),
2.5em 0em 0 0em rgba(255, 255, 255, 0.2),
1.75em 1.75em 0 0em rgba(255, 255, 255, 0.5),
0em 2.5em 0 0em rgba(255, 255, 255, 0.7), -1.8em 1.8em 0 0em #ffffff,
-2.6em 0em 0 0em rgba(255, 255, 255, 0.2),
-1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2);
}
75% {
box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2),
1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2),
2.5em 0em 0 0em rgba(255, 255, 255, 0.2),
1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2),
0em 2.5em 0 0em rgba(255, 255, 255, 0.5),
-1.8em 1.8em 0 0em rgba(255, 255, 255, 0.7), -2.6em 0em 0 0em #ffffff,
-1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2);
}
87.5% {
box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2),
1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2),
2.5em 0em 0 0em rgba(255, 255, 255, 0.2),
1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2),
0em 2.5em 0 0em rgba(255, 255, 255, 0.2),
-1.8em 1.8em 0 0em rgba(255, 255, 255, 0.5),
-2.6em 0em 0 0em rgba(255, 255, 255, 0.7), -1.8em -1.8em 0 0em #ffffff;
}
}
14 changes: 7 additions & 7 deletions src/main.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
import './index.css'
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App.jsx";
import "./index.css";

ReactDOM.createRoot(document.getElementById('root')).render(
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)
</React.StrictMode>
);

0 comments on commit b9d9c7d

Please sign in to comment.