File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export const Welcome: React.FC = () => {
2121 < div className = "flex flex-col items-center justify-center py-8 " >
2222 { /* Scrapbook Letter Section */ }
2323 < div className = "max-w-4xl w-full px-4 pr-8 overflow-hidden" >
24- < ScrapbookText text = "WELCOME TO" letterSize = { 112 } mobileLetterSize = { 48 } />
24+ < ScrapbookText text = "WELCOME TO" letterSize = { 112 } mobileLetterSize = { 48 } playAnimationOnMount = { true } />
2525 </ div >
2626
2727 { /* Laurier Computing Society Text */ }
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ interface ScrapbookTextProps {
1616 mobileLetterSize ?: number ; // Size in pixels for mobile, default is letterSize * 0.5
1717 className ?: string ;
1818 letterClassName ?: string ;
19+ playAnimationOnMount ?: boolean ; // If true, animate even if element is already visible on page load
1920}
2021
2122// Supported letters - only these have assets
@@ -153,6 +154,7 @@ export const ScrapbookText: React.FC<ScrapbookTextProps> = ({
153154 mobileLetterSize,
154155 className = '' ,
155156 letterClassName = '' ,
157+ playAnimationOnMount = false ,
156158} ) => {
157159 // Track window width for responsive sizing
158160 // Uses two breakpoints: sm (640px) and md (768px)
@@ -236,8 +238,8 @@ export const ScrapbookText: React.FC<ScrapbookTextProps> = ({
236238 scale = { transform . scale }
237239 size = { responsiveLetterSize }
238240 letterClassName = { letterClassName }
239- isVisible = { isVisible }
240- skipAnimation = { skipAnimation }
241+ isVisible = { playAnimationOnMount ? true : isVisible }
242+ skipAnimation = { playAnimationOnMount ? false : skipAnimation }
241243 />
242244 ) ;
243245 } ) }
You can’t perform that action at this time.
0 commit comments