Skip to content

Commit

Permalink
Add typewriter-effect library and update Header component
Browse files Browse the repository at this point in the history
  • Loading branch information
preston176 committed Feb 21, 2024
1 parent ddcdbb5 commit deec01f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
29 changes: 28 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"react-router-dom": "^6.22.1",
"react-scroll": "^1.9.0",
"react-slideshow-image": "^4.3.0",
"react-social-icons": "^6.12.0"
"react-social-icons": "^6.12.0",
"typewriter-effect": "^2.21.0"
},
"devDependencies": {
"@types/react": "^18.2.55",
Expand Down
3 changes: 1 addition & 2 deletions src/Components/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { ThemeContext } from '@emotion/react';
const Header = () => {
const links = [
{ name: 'About', link: 'about' },
{ name: 'Pricing', link: 'projects' },
{ name: 'Login', link: 'contact' },
{ name: 'Generate Image', link: 'generate_image' },
];

const [open, setOpen] = useState(false);
Expand Down
9 changes: 8 additions & 1 deletion src/Components/Hero/Hero.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useContext } from 'react'
import ImageSlider from '../ImageSlider/ImageSlider'
import defaultImage from '../../assets/defaultImage.jpg'
import { Link } from 'react-router-dom'
import Typewriter from 'typewriter-effect';

const Hero = ({ isDarkMode }) => {

Expand All @@ -17,7 +18,13 @@ const Hero = ({ isDarkMode }) => {
<div className={`${isDarkMode ? ThemeStyles.dark : ThemeStyles.light} mb-4 mt-8 flex flex-col justify-evenly items-center h-[40vh] rounded-3xl`}>


<h2 className='bg-gradient-to-r from-red-500 to-blue-500 text-transparent bg-clip-text laptop:text-[60px] font-mono p-4 md:text-[76px] sm:text-[46px] mobile:text-[28px] small_mobile:text-[25px] text-center' >Create Stunning Images with AI</h2>
<h2 className='bg-gradient-to-r from-red-500 to-blue-500 text-transparent bg-clip-text laptop:text-[60px] font-mono p-4 md:text-[76px] sm:text-[46px] mobile:text-[28px] small_mobile:text-[25px] text-center' ><Typewriter
options={{
strings: ['Create Stunning Images in Seconds', 'Describe and Create any Content in Seconds', 'AI Powered', 'Free to Use'],
autoStart: true,
loop: true,
}}
/></h2>



Expand Down

0 comments on commit deec01f

Please sign in to comment.