Initial Commit
This commit is contained in:
23
src/components/App.js
Normal file
23
src/components/App.js
Normal file
@@ -0,0 +1,23 @@
|
||||
//============================================================
|
||||
// Essential Imports
|
||||
//============================================================
|
||||
|
||||
import React from 'react';
|
||||
import { BrowserRouter, Routes, Route } from 'react-router-dom';
|
||||
|
||||
//============================================================
|
||||
// Pages
|
||||
//============================================================
|
||||
|
||||
import FrontPage from './pages/Front.page';
|
||||
|
||||
const App = () => {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<FrontPage />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
);
|
||||
};
|
||||
export default App;
|
||||
27
src/components/pages/Front.page.js
Normal file
27
src/components/pages/Front.page.js
Normal file
@@ -0,0 +1,27 @@
|
||||
//============================================================
|
||||
// Essential Imports
|
||||
//============================================================
|
||||
|
||||
import React from 'react';
|
||||
|
||||
//============================================================
|
||||
// Imported Components
|
||||
//============================================================
|
||||
|
||||
import AppearText from '../text/AppearText';
|
||||
|
||||
//============================================================
|
||||
// Component
|
||||
//============================================================
|
||||
|
||||
const FrontPage = () => {
|
||||
return (
|
||||
<div className="w-full h-screen flex justify-center items-center bg-polar-night-400">
|
||||
<div className="flex flex-col justify-center items-center">
|
||||
<AppearText className="font-mono text-7xl text-frost-400" text="JOHN COSTA" delay={100} />
|
||||
<AppearText className="font-mono text-5xl text-frost-200" text="DEVELOPER" delay={1200} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default FrontPage;
|
||||
33
src/components/text/AppearText.js
Normal file
33
src/components/text/AppearText.js
Normal file
@@ -0,0 +1,33 @@
|
||||
//============================================================
|
||||
// Essential Imports
|
||||
//============================================================
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import clsx from 'clsx';
|
||||
|
||||
//============================================================
|
||||
// Component
|
||||
//============================================================
|
||||
|
||||
const AppearText = ({ text, delay, className }) => {
|
||||
const [showText, setShowText] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
const timer = setTimeout(() => {
|
||||
setShowText('opacity-100');
|
||||
}, delay);
|
||||
|
||||
return () => {
|
||||
clearTimeout(timer);
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1 className={clsx('transition-all ease-in-out delay-1000 opacity-0', className, showText)}>
|
||||
{text}
|
||||
</h1>
|
||||
</>
|
||||
);
|
||||
};
|
||||
export default AppearText;
|
||||
Reference in New Issue
Block a user