File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,37 @@ const Hero = () => {
225
225
} ;
226
226
} , [ ] ) ;
227
227
228
+ useEffect ( ( ) => {
229
+ const handleResize = ( ) => {
230
+ const headline = document . getElementById ( "heroHeadline" ) ;
231
+ if ( ! headline ) return ;
232
+
233
+ headline . innerHTML = `
234
+ Transform your vision into
235
+ <br />
236
+ <span class='text-indigo-600 dark:text-indigo-400'>
237
+ intelligent
238
+ </span> solutions
239
+ ` ;
240
+
241
+ if ( window . innerWidth <= 640 ) {
242
+ headline . innerHTML = `
243
+ <span style="display: inline-block; white-space: nowrap;">Transform your</span>
244
+ <span style="display: inline-block; white-space: nowrap;"> vision into</span>
245
+ <br />
246
+ <span class='text-indigo-600 dark:text-indigo-400' style="display: inline-block; white-space: nowrap;">intelligent</span>
247
+ <span style="display: inline-block; white-space: nowrap;"> solutions</span>
248
+ ` ;
249
+ }
250
+ } ;
251
+
252
+ // Run on mount and resize
253
+ handleResize ( ) ;
254
+ window . addEventListener ( "resize" , handleResize ) ;
255
+
256
+ return ( ) => window . removeEventListener ( "resize" , handleResize ) ;
257
+ } , [ ] ) ;
258
+
228
259
return (
229
260
< section
230
261
id = 'hero'
Original file line number Diff line number Diff line change @@ -1536,4 +1536,25 @@ button:hover,
1536
1536
1537
1537
.loading-screen * {
1538
1538
cursor : none !important ;
1539
+ }
1540
+
1541
+ /* hero headline character breaking */
1542
+ # heroHeadline {
1543
+ word-break : normal;
1544
+ overflow-wrap : normal;
1545
+ hyphens : none;
1546
+ white-space : normal;
1547
+ }
1548
+
1549
+ @media (max-width : 640px ) {
1550
+ # heroHeadline {
1551
+ font-size : 2.25rem ;
1552
+ line-height : 1.2 ;
1553
+ }
1554
+ }
1555
+
1556
+ @media (max-width : 480px ) {
1557
+ # heroHeadline {
1558
+ font-size : 2rem ;
1559
+ }
1539
1560
}
You can’t perform that action at this time.
0 commit comments