-
Notifications
You must be signed in to change notification settings - Fork 0
WIP: Restyling #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
WIP: Restyling #15
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| import { FullPageBlurScroll, UnderConstruction } from '~/components'; | ||
| import { Home } from '~/routes'; | ||
|
|
||
| const Page: React.FC = () => <Home />; | ||
| const Page: React.FC = () => ( | ||
| <FullPageBlurScroll blur> | ||
| <Home /> | ||
| <UnderConstruction /> | ||
| </FullPageBlurScroll> | ||
| ); | ||
|
|
||
| export default Page; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| 'use client'; | ||
|
|
||
| import { motion, useInView } from 'framer-motion'; | ||
| import { Children, type ReactNode, type RefObject, useRef } from 'react'; | ||
| import { cn } from '~/lib/ui'; | ||
|
|
||
| type BlurPageProps = { | ||
| children: ReactNode; | ||
| scrollRef: RefObject<HTMLDivElement | null>; | ||
| blur?: boolean; | ||
| }; | ||
|
|
||
| const BlurPage = ({ children, scrollRef, blur }: BlurPageProps) => { | ||
| const pageRef = useRef<HTMLDivElement>(null); | ||
| const isInView = useInView(pageRef, { | ||
| amount: 0.5, | ||
| root: scrollRef, | ||
| }); | ||
|
|
||
| return ( | ||
| <motion.div | ||
| animate={{ | ||
| filter: blur && !isInView ? 'blur(10px)' : 'blur(0px)', | ||
| }} | ||
| className='min-h-screen w-full snap-start snap-always' | ||
| initial={false} | ||
| ref={pageRef} | ||
| transition={{ | ||
| duration: 0.5, | ||
| ease: [0.25, 0.46, 0.45, 0.94], | ||
| type: 'tween', | ||
| }} | ||
| > | ||
| {children} | ||
| </motion.div> | ||
| ); | ||
| }; | ||
|
|
||
| type FullPageBlurScrollProps = { | ||
| children: ReactNode; | ||
| className?: string; | ||
| blur?: boolean; | ||
| }; | ||
|
|
||
| export const FullPageBlurScroll = ({ | ||
| children, | ||
| className, | ||
| blur, | ||
| }: FullPageBlurScrollProps) => { | ||
| const scrollRef = useRef<HTMLDivElement>(null); | ||
| const pages = Children.toArray(children); | ||
|
|
||
| return ( | ||
| <div | ||
| className={cn( | ||
| 'h-screen min-h-screen overflow-y-auto overflow-x-hidden snap-y snap-mandatory', | ||
| className, | ||
| )} | ||
| ref={scrollRef} | ||
| > | ||
| {pages.map((page, index) => ( | ||
| <BlurPage | ||
| blur={blur} | ||
| key={`scroll-page-${index + 1}`} | ||
| scrollRef={scrollRef} | ||
| > | ||
| {page} | ||
| </BlurPage> | ||
| ))} | ||
| </div> | ||
| ); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { | ||
| IconBrandGithub, | ||
| IconBrandLinkedin, | ||
| IconMail, | ||
| } from '@tabler/icons-react'; | ||
| import { EMAIL, GITHUB, LINKED_IN } from '~/constants'; | ||
|
|
||
| export const Header = () => { | ||
| return ( | ||
| <div className='flex justify-between w-full px-6 py-4'> | ||
| <div className='flex gap-4'> | ||
| <a href={GITHUB} target='_blank'> | ||
| <IconBrandGithub color='#FFFFFF' size={40} stroke={1.2} /> | ||
| </a> | ||
| <a href={LINKED_IN} target='_blank'> | ||
| <IconBrandLinkedin color='#FFFFFF' size={40} stroke={1.2} /> | ||
| </a> | ||
| <a href={EMAIL} target='_blank'> | ||
| <IconMail color='#FFFFFF' size={40} stroke={1.2} /> | ||
| </a> | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||||||||||||||||||||||||
| import { Card, TextType } from '~/ui'; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| export const Intro = () => { | ||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||
| <Card className='min-w-xl shadow-xl md:max-w-xl my-4 mx-12 sm:mx-2 md:mx-auto'> | ||||||||||||||||||||||||||||
| <div className='p-12 flex flex-col text-black text-2xl'> | ||||||||||||||||||||||||||||
| <p>Hey I'm Ben! It's great to meet you!</p> | ||||||||||||||||||||||||||||
| <div className='flex flex-row'> | ||||||||||||||||||||||||||||
| <p>I'm a passionate </p> | ||||||||||||||||||||||||||||
| <TextType | ||||||||||||||||||||||||||||
| className='underline underline-offset-4 decoration-2 text-bold' | ||||||||||||||||||||||||||||
| deletingSpeed={30} | ||||||||||||||||||||||||||||
| text={['Frontend', 'Backend', 'React', 'Java']} | ||||||||||||||||||||||||||||
| textColors={['#4720ff', '#4249fD', '#94249F', '#jfgwF89']} | ||||||||||||||||||||||||||||
| typingSpeed={60} | ||||||||||||||||||||||||||||
|
Comment on lines
+10
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Check if file exists and read the relevant section
if [ -f "src/components/Intro/Intro.tsx" ]; then
echo "=== File exists, reading lines 10-15 ==="
sed -n '10,15p' "src/components/Intro/Intro.tsx" | cat -n
else
echo "File not found, searching for Intro.tsx"
find . -name "Intro.tsx" -type f
fiRepository: bprosen/Website Length of output: 428 🏁 Script executed: # Validate the hex color format
python3 << 'EOF'
import re
color = '#jfgwF89'
# Valid hex colors: # followed by 3, 4, 6, or 8 hex digits (0-9, a-f, A-F)
hex_pattern = r'^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$'
if re.match(hex_pattern, color):
print(f"✓ {color} is a VALID hex color")
else:
print(f"✗ {color} is an INVALID hex color")
print(f" Issues: Contains non-hex characters ('j' and 'w' are not valid hex digits)")
EOFRepository: bprosen/Website Length of output: 170 🏁 Script executed: # Look for Tailwind config files
find . -name "tailwind.config.*" -type fRepository: bprosen/Website Length of output: 41 🏁 Script executed: # Search for any definition of text-bold in the codebase
rg "text-bold" --type ts --type tsx --type js --type jsxRepository: bprosen/Website Length of output: 86 🏁 Script executed: # Check if there's a custom CSS or Tailwind setup that might define text-bold
find . -name "*.css" -o -name "globals.css" | head -10Repository: bprosen/Website Length of output: 80 🏁 Script executed: # Search for text-bold across all files
rg "text-bold"Repository: bprosen/Website Length of output: 165 🏁 Script executed: # Read globals.css to check for custom Tailwind config
cat -n "./src/app/globals.css"Repository: bprosen/Website Length of output: 5366 🏁 Script executed: # Also check if there's a tailwind config in root
ls -la | grep -i tailwindRepository: bprosen/Website Length of output: 41 🌐 Web query:
💡 Result: Tailwind CSS doesn’t have a <p class="font-bold">Bold text</p>Related weights include Citations:
Replace invalid Tailwind class and remove invalid color value. Suggested fix- <TextType
- className='underline underline-offset-4 decoration-2 text-bold'
+ <TextType
+ className='underline underline-offset-4 decoration-2 font-bold'
deletingSpeed={30}
text={['Frontend', 'Backend', 'React', 'Java']}
- textColors={['#4720ff', '#4249fD', '#94249F', '#jfgwF89']}
+ textColors={['#4720ff', '#4249fD', '#94249F']}
typingSpeed={60}
/>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||
| <div> Software Developer</div> | ||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||
| </Card> | ||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { IconChevronDown } from '@tabler/icons-react'; | ||
|
|
||
| export const ScrollDownIndicator = () => { | ||
| return ( | ||
| <div className='flex justify-center pb-4'> | ||
| <IconChevronDown color='#ffffff' size={50} /> | ||
| </div> | ||
| ); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,6 @@ | ||
| export * from './FullPageScroll/FullPageScroll'; | ||
| export * from './FullPageScroll/FullPageScroll'; | ||
| export * from './Header/Header'; | ||
| export * from './Intro/Intro'; | ||
| export * from './ScrollDownIndicator/ScrollDownIndicator'; | ||
| export * from './UnderConstruction/UnderConstruction'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from './urls'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| export const GITHUB = 'https://github.com/bprosen'; | ||
| export const LINKED_IN = 'https://www.linkedin.com/in/ben-edgar-prosen/'; | ||
| export const EMAIL = 'mailto:benedgarprosen@gmail.com'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,12 @@ | ||
| import { UnderConstruction } from '~/components'; | ||
| import { VantaNet } from '~/ui'; | ||
| import { isMobile } from '~/utils/utils'; | ||
|
|
||
| export const Home = async () => { | ||
| const mobile = await isMobile(); | ||
| import { Intro, ScrollDownIndicator } from '~/components'; | ||
|
|
||
| export const Home = () => { | ||
| return ( | ||
| <VantaNet | ||
| backgroundColor='var(--primary)' | ||
| className='flex flex-col items-center justify-center h-screen' | ||
| gyroControls={mobile} | ||
| maxDistance={mobile ? 20.0 : 18} | ||
| mouseControls={!mobile} | ||
| spacing={mobile ? 18.0 : 15.0} | ||
| touchControls={mobile} | ||
| > | ||
| <UnderConstruction /> | ||
| </VantaNet> | ||
| <div className='min-h-screen flex flex-col'> | ||
| <div className='flex-1 flex items-center justify-center'> | ||
| <Intro /> | ||
| </div> | ||
| <ScrollDownIndicator /> | ||
| </div> | ||
| ); | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add accessible labels and
rel="noopener noreferrer"to external links.The icon-only links lack accessible names, making them unannounced to screen reader users. Additionally,
target="_blank"links should includerel="noopener noreferrer"as a security best practice.Proposed fix
Note: The
mailto:link doesn't needtarget="_blank"since it opens the email client rather than a new browser tab.📝 Committable suggestion
🤖 Prompt for AI Agents