@@ -15,7 +15,7 @@ import {
1515import { Repos } from "./assets/Data.tsx" ;
1616import HeroMainText from "./assets/HeroMainText.tsx" ;
1717import Section from "./assets/Section.tsx" ;
18- import MousePositionProvider from "./assets/MousePositionProvider .tsx" ;
18+ import GradientOutline from "./assets/GradientOutline .tsx" ;
1919
2020export interface ProjectWrapper {
2121 name : string
@@ -36,7 +36,6 @@ function App() {
3636
3737 return (
3838 < >
39- < MousePositionProvider />
4039 < NavBar searchCallback = { setSearch } />
4140
4241 < HeroElement search = { search } />
@@ -47,10 +46,12 @@ function App() {
4746
4847 < div className = "flex flex-col items-center bg-repeat point_back content-wrap" id = "repos" >
4948 < div className = "mt-20 flex flex-col items-center w-[100%]" >
50- { repos . map ( ( repo : ProjectWrapper , index : number ) => < RepoCard repo = { repo } key = { index } visible = { shouldShow ( repo ) } /> ) }
49+ { repos . map ( ( repo : ProjectWrapper , index : number ) => < RepoCard repo = { repo } key = { index }
50+ visible = { shouldShow ( repo ) } /> ) }
5151 </ div >
5252 </ div >
5353
54+
5455 < FooterRenderer />
5556 </ >
5657 )
@@ -64,30 +65,69 @@ function HeroElement(props: Props) {
6465 if ( props . search === "" ) {
6566 return (
6667 < >
67- < div className = "hero bg-base-200 min-h-screen" >
68+ < div className = "hero bg-gradient-to-br from- base-200 to-base-300 min-h-screen " >
6869 < div className = "hero-content text-center" >
69- < div className = "max-w-md flex flex-col items-center justify-center" >
70+ < div className = "max-w-md flex flex-col items-center justify-center lg:mr-52 " >
7071 < div className = "mb-10 avatar online" >
7172 < div className = "w-20 rounded-full" >
72- < img src = "https://avatars.githubusercontent.com/u/74710895" alt = "Profile Picture" className = "rounded-full w-20" />
73+ < img src = "https://avatars.githubusercontent.com/u/74710895" alt = "Profile Picture"
74+ className = "rounded-full w-20" />
7375 </ div >
7476 </ div >
7577
76- < h1 className = "text-5xl font-bold" > < FontAwesomeIcon icon = { faFire } className = "mr-2" size = "xs" /> Hey there, i'm</ h1 >
78+ < h1 className = "text-5xl font-bold" > < FontAwesomeIcon icon = { faFire } className = "mr-2"
79+ size = "xs" /> Hey there, i'm</ h1 >
7780
78- < HeroMainText />
81+ < HeroMainText />
7982 < p className = "py-6" >
80- I'm a < strong className = "text-primary" > { renderAge ( ) } </ strong > year old software developer
83+ I'm a < strong className = "text-primary" > { renderAge ( ) } </ strong > year old software
84+ developer
8185 from < strong className = "text-primary" > Austria</ strong > .
8286 I'm passionate about open
8387 source and love to contribute to it's community. I'm also a huge fan of the < strong
8488 className = "text-primary" > Kotlin</ strong > language.
8589 </ p >
8690
8791 < button className = "btn btn-primary" onClick = { ( ) => {
88- document . getElementById ( "skills" ) ! . scrollIntoView ( )
89- } } > < FontAwesomeIcon icon = { faCompass } /> Explore</ button >
92+ scrollToElementWithOffset ( "skills" )
93+ } } > < FontAwesomeIcon icon = { faCompass } /> Explore
94+ </ button >
9095 </ div >
96+
97+ < GradientOutline circleWidth = "250px" borderRadius = "1.5rem" className = "hidden lg:block" >
98+ < div className = "mockup-code bg-base-100 border border-base-300 w-full text-start" >
99+ < pre data-prefix = "$" > < code > npm run dev</ code > </ pre >
100+ < pre > < code > </ code > </ pre >
101+
102+ < div className = "flex" >
103+ < pre className = "text-success no-pr" > < code > VITE v5.4.8</ code > </ pre >
104+ < pre className = "no-pr" > < code > ready in</ code > </ pre >
105+ < pre className = "text-base-content" > < code > 257 ms</ code > </ pre >
106+ </ div >
107+
108+ < pre > < code > </ code > </ pre >
109+
110+ < div className = "flex" >
111+ < pre className = "text-success no-pr" > < code > ➜</ code > </ pre >
112+ < pre className = "text-base-content no-pr" > < code > Local:</ code > </ pre >
113+ < pre className = "text-blue-500 underline" > < code > http://localhost:5173/</ code > </ pre >
114+ </ div >
115+ < div className = "flex" >
116+ < pre className = "text-success no-pr" > < code > ➜</ code > </ pre >
117+ < pre className = "no-pr" > < code > Network: use</ code > </ pre >
118+ < pre className = "text-base-content no-pr" > < code > --host</ code > </ pre >
119+ < pre className = "" > < code > to expose</ code > </ pre >
120+ </ div >
121+ < div className = "flex" >
122+ < pre className = "text-success no-pr" > < code > ➜</ code > </ pre >
123+ < pre className = "no-pr" > < code > press</ code > </ pre >
124+ < pre className = "text-base-content no-pr" > < code > h + enter</ code > </ pre >
125+ < pre className = "" > < code > to show help</ code > </ pre >
126+ </ div >
127+ </ div >
128+
129+ </ GradientOutline >
130+
91131 </ div >
92132
93133 < div className = "flex flex-col h-screen justify-end" >
@@ -100,6 +140,22 @@ function HeroElement(props: Props) {
100140 } else return ( < > </ > )
101141}
102142
143+ function scrollToElementWithOffset ( elementId : string ) {
144+ const element = document . getElementById ( elementId ) ;
145+ const offsetElement = document . getElementById ( "navbar_anchor" ) ;
146+ const offsetHeight = offsetElement ?. offsetHeight || 0 ;
147+
148+ if ( element ) {
149+ const elementPosition = element . offsetTop ;
150+ requestAnimationFrame ( ( ) => {
151+ window . scrollTo ( {
152+ top : elementPosition - offsetHeight ,
153+ behavior : "smooth" ,
154+ } ) ;
155+ } ) ;
156+ }
157+ }
158+
103159function renderAge ( ) {
104160 // Calculate age from 27.5.2009
105161 const birthday = new Date ( 2009 , 4 , 27 ) ;
0 commit comments