Skip to content

Commit

Permalink
created homepage and two placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
swstevens committed Jun 17, 2024
1 parent b47d976 commit a71891f
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/Desktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Desktop: React.FC<DesktopProps> = (props) => {
icon: string
};
} = {
About: {
Portfolio: {
key: 'About Me',
icon: 'assets/windowExplorerIcon.png',
},
Expand Down
42 changes: 42 additions & 0 deletions src/components/Home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React from "react";

export interface HomeProps {
setHome: () => void;
setAbout: () => void;
setExperience: () => void;
setProjects: () => void;
}

export const Home: React.FC<HomeProps> = (props) => {
return (
<div style={{height: '100%', width: '100%', flexDirection: 'column', alignItems:'center', justifyContent: 'center'}}>
<div style={styles.half}>
<img src="assets/headspin-square-unscreen.gif" alt="my head" style={styles.headspin}/>
</div>
<div style={styles.half}>
<h1>SHEA STEVENS</h1>
<div>
<p style={styles.hyperlink} onClick={() => props.setHome()}><u>Home</u></p>
<p style={styles.hyperlink} onClick={() => props.setAbout()}><u>About Me</u></p>
<p style={styles.hyperlink} onClick={() => props.setExperience()}><u>Experience</u></p>
<p style={styles.hyperlink} onClick={() => props.setProjects()}><u>Projects</u></p>
</div>
</div>
</div>
);
};

const styles: StyleSheetCSS = {
half: {
height: '50%',
width: '100%',
alignItems: 'center',
flexDirection: 'column',
},
hyperlink: {
color: 'blue',
cursor: 'pointer',
paddingLeft: '32px',
paddingRight: '32px',
}
}
26 changes: 21 additions & 5 deletions src/components/Portfolio.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
import React from "react";
import About from "./About";
import { Home } from "./Home";
import { useState } from "react";

const Portfolio = ()=> {
const [activePage, setActivePage] = useState('');
const setActive = (page:string) => {
setActivePage(page)
setActivePage(page);
};
const isActive = (page:string) => {
return activePage == page;
};
return (
<div className={'parent'} style={styles.parent}>
<>
{isActive('') &&
<Home
setHome={() => setActive('')}
setAbout={() => setActive('About')}
setExperience={() => setActive('Experience')}
setProjects={() => setActive('Projects')}
/>}

{!isActive('') && <div className={'parent'} style={styles.parent}>
<div style={styles.variableColumn}>
<div style={styles.fixedColumnLeft}>
<p style={styles.text}>SHEA_STEVENS</p>
Expand All @@ -23,10 +33,16 @@ const Portfolio = ()=> {
<div style={styles.fixedColumn}>
<img src="assets/headspin-square-unscreen.gif" alt="my head" style={styles.headspin}/>
<p>That's Me!</p>
<p style={styles.hyperlink} onClick={() => setActive('About')}><u>About Me</u></p>
<div style={{height:'64px'}}></div>
<p style={styles.hyperlink} onClick={() => setActive('')}><u>Home</u></p>
<p style={styles.hyperlink} onClick={() => setActive('About')}><u>About Me</u></p>
<p style={styles.hyperlink} onClick={() => setActive('Experience')}><u>Experience</u></p>
<p style={styles.hyperlink} onClick={() => setActive('Projects')}><u>Projects</u></p>


</div>
</div>
</div>}
</>
)
};

Expand Down Expand Up @@ -144,5 +160,5 @@ const styles: StyleSheetCSS = {
color: 'blue',
cursor: 'pointer',
paddingTop: '16px',
}
},
};
17 changes: 15 additions & 2 deletions src/components/Toolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TrackballControls } from "@react-three/drei";
import React, { useEffect } from "react";
import React, { useEffect, useState} from "react";

export interface ToolbarProps {
isMinimized: boolean,
Expand All @@ -10,7 +10,20 @@ export interface ToolbarProps {


const Toolbar: React.FC<ToolbarProps> = (props) => {
const d = new Date();

const [d, setD] = useState(new Date());

useEffect(
() => {
const intervalId = setInterval(() => {

setD(new Date());
}, 60000);
return () => {
clearInterval(intervalId)
}
}
)
return (
<div style={{width: '100%', paddingRight: '6px'}}>
<div style={styles.tabContainerOuter}>
Expand Down

0 comments on commit a71891f

Please sign in to comment.