initial commit

This commit is contained in:
Juthatip McDevitt 2024-04-11 14:54:35 -05:00
parent defbd53cbb
commit ea2b8f4649
20 changed files with 5848 additions and 0 deletions

View file

@ -0,0 +1,21 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}

24
awwwards_ss3/.gitignore vendored Normal file
View file

@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

2
awwwards_ss3/README.md Normal file
View file

@ -0,0 +1,2 @@
# In this project, we recreate the design of REJOUICE® (https://www.rejouice.com/) by using Vite + React.
#### Start project --> npm run dev

16
awwwards_ss3/index.html Normal file
View file

@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Epilogue:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Awwwards | REJOUICE®</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>

5425
awwwards_ss3/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

33
awwwards_ss3/package.json Normal file
View file

@ -0,0 +1,33 @@
{
"name": "awwwards_ss3",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"framer-motion": "^11.0.27",
"gsap": "^3.12.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^5.0.1",
"react-router-dom": "^6.22.3"
},
"devDependencies": {
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"vite": "^5.2.0"
}
}

View file

@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

18
awwwards_ss3/src/App.jsx Normal file
View file

@ -0,0 +1,18 @@
import Home from "./components/Home"
import Header from "./components/Header"
import PreLoader from "./components/preloader/PreLoader"
function App() {
return (
<div>
<PreLoader/>
<Header/>
<Home/>
</div>
)
}
export default App

View file

@ -0,0 +1,45 @@
import { useState } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import Navbar from './Navbar';
const Header = () => {
const [isActive, setIsActive] = useState(false);
const [changeColor, setChangeColor] = useState(false);
const handleClick = () => {
setChangeColor(!changeColor)
}
const opacity = {
initial: {
opacity: 0
},
open: {
opacity: 1,
transition: {duration: 0.35}
},
closed: {
opacity: 0,
transition: {duration: 0.35}
}
}
return (
<div onClick={handleClick} className={`w-[100%] fixed ${(changeColor === true) ? 'bg-[#FF5F38] ' : 'bg-[#222222] delay-[0.9s] transition duration-[1] ease-in'}`}>
<div className="flex items-center justify-between">
<p className="capitalize text-2xl px-14 pt-20">The venture agency.</p>
<div className="flex items-center gap-2 cursor-pointer ">
<div onClick={() => {setIsActive(!isActive)}} className="relative flex items-center h-[100%] px-14 pt-20">
<motion.p variants={opacity} animate={!isActive ? "open" : "closed"} className="text-2xl">Menu</motion.p>
<motion.p variants={opacity} animate={isActive ? "open" : "closed"} className="text-2xl absolute opacity-0">Close</motion.p>
</div>
</div>
</div>
<AnimatePresence mode='wait'>
{isActive && <Navbar/>}
</AnimatePresence>
</div>
)
}
export default Header

View file

@ -0,0 +1,11 @@
const Home = () => {
return (
<div>
<div></div>
</div>
)
}
export default Home

View file

@ -0,0 +1,58 @@
import { motion } from 'framer-motion';
const NavBody = ({links, selectedLink, setSelectedLink}) => {
const translate = {
initial: {
y: "100%",
opacity: 0
},
enter: (i) => ({
y: 0,
opacity: 1,
transition: {duration: 1, ease: [0.76, 0, 0.24, 1], delay: i[0]}
}),
exit: (i) => ({
y: "100%",
opacity: 0,
transition: {duration: 0.7, ease: [0.76, 0, 0.24, 1], delay: i[1]}
})
}
const getChars = (word) => {
let chars = [];
word.split("").forEach( (char, i) => {
chars.push(
<motion.span
custom={[i * 0.02, (word.length - i) * 0.01]}
variants={translate} initial="initial"
animate="enter"
exit="exit"
key={char + i}>
{char}
</motion.span>
)
})
return chars;
}
return (
<div className="">
{
links.map((link, index) => {
const { title, href } = link;
return <a key={index} href={href}> {/*This a tag can change to be Link to take to pages*/}
<motion.p onMouseOver={() => {setSelectedLink({isActive: true, index})}} onMouseLeave={() => {setSelectedLink({isActive: false, index})}}
animate={selectedLink.isActive && selectedLink.index != index ? "open" : "closed"} className='flex overflow-hidden text-[32px] font-semibold text-black'>
{getChars(title)}
</motion.p>
</a>
})
}
</div>
)
}
export default NavBody

View file

@ -0,0 +1,16 @@
import { FaXTwitter } from "react-icons/fa6";
const NavFooter = () => {
return (
<div className="footer flex justify-between px-14">
<p>Tomorrows Brands, Today.</p>
<div className="flex items-center gap-4">
<a href=""><FaXTwitter/></a>
<a href="">Instagram</a>
<a href="">LinkedIn</a>
</div>
</div>
)
}
export default NavFooter

View file

@ -0,0 +1,65 @@
import { useState } from 'react';
import { motion } from 'framer-motion';
import NavBody from "./NavBody"
import NavFooter from "./NavFooter"
const links = [
{
title: "Home",
href: "/"
},
{
title: "Work",
href: "/"
},
{
title: "Services & Models",
href: "/"
},
{
title: "About",
href: "/"
},
{
title: "Contact",
href: "/"
}
]
const Navbar = () => {
const [selectedLink, setSelectedLink] = useState({isActive: false, index: 0});
const transition = {duration: 1, ease: [0.76, 0, 0.24, 1]}
const height = {
initial: {
height: 0
},
enter: {
height: "auto",
transition
},
exit: {
height: 0,
transition
}
}
return (
<motion.div variants={height} initial="initial" animate="enter" exit="exit" className="overflow-hidden bg-[#FF5F38] flex flex-col">
<div className="px-14 grid grid-cols-2">
<div>
<p>rejouice</p>
<img src="https://images.unsplash.com/photo-1711843250654-43310460b3f8?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt=""
className='img-container w-[450px] h-[300px] object-cover relative'/>
</div>
<div>
<NavBody links={links} selectedLink={selectedLink} setSelectedLink={setSelectedLink}/>
</div>
</div>
<NavFooter/>
</motion.div>
)
}
export default Navbar

View file

@ -0,0 +1,22 @@
import { useEffect } from "react"
import {preLoaderAnim} from "../preloader/PreloadAnimatiom"
const PreLoader = () => {
useEffect(() => {
preLoaderAnim()
}, []);
return (
<div className="preloader h-[100vh] w-[100%] flex justify-center items-center overflow-hidden bg-[#0E0E0E] fixed bottom-0 left-0 right-0 z-50">
<div className="texts-container flex justify-between items-center text-4xl font-serif overflow-hidden gap-1">
<p>Tomorrows </p>
<p>Brands, </p>
<p>Today.</p>
</div>
</div>
)
}
export default PreLoader

View file

@ -0,0 +1,36 @@
import gsap from "gsap";
const tl = gsap.timeline();
export const preLoaderAnim = () => {
tl.to(".texts-container", {
duration: 0,
opacity: 1,
ease: "Power3.easeOut",
})
.from(".texts-container p", {
duration: 1.5,
delay: 1,
y: 70,
skewY: 10,
stagger: 0.4,
ease: "Power3.easeOut",
})
.to(".texts-container p", {
duration: 1,
y: 70,
skewY: -20,
stagger: 0.2,
ease: "Power3.easeOut",
})
.to(".preloader", {
duration: 1.5,
height: "0vh",
ease: "Power3.easeOut",
},
)
.to(".preloader", {
duration: 0,
css: { display: "none" },
});
};

View file

@ -0,0 +1,19 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
body{
background-color: #222222;
color: white;
font-family: "Epilogue", sans-serif;
}
.img-container{
display: none;
}
@media (min-width: 1000px) {
.img-container{
display: block;
}
}

10
awwwards_ss3/src/main.jsx Normal file
View file

@ -0,0 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)

View file

@ -0,0 +1,13 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
},
},
plugins: [],
}

View file

@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})