First version uploaded to sdf

This commit is contained in:
Warwick 2020-11-12 15:24:09 +00:00
parent 3dd74fe4a1
commit 6f479b33eb
9 changed files with 142 additions and 25 deletions

View file

@ -4,18 +4,26 @@
"description": "Portfolio Site", "description": "Portfolio Site",
"main": "src/index.jsx", "main": "src/index.jsx",
"scripts": { "scripts": {
"start": "parcel index.html" "start": "parcel index.html",
"build": "parcel build index.html"
}, },
"author": "", "author": "",
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.3", "@babel/core": "^7.12.3",
"@babel/plugin-transform-react-jsx": "^7.12.1", "@babel/plugin-transform-react-jsx": "^7.12.5",
"cssnano": "^4.1.10",
"parcel-bundler": "^1.12.4" "parcel-bundler": "^1.12.4"
}, },
"dependencies": { "dependencies": {
"@material-ui/core": "^4.11.0", "@material-ui/core": "^4.11.0",
"preact": "^10.5.5" "@types/react": "^16.9.56",
"fontsource-roboto": "^3.0.3",
"preact": "^10.5.5",
"preact-async-route": "^2.2.1",
"preact-router": "^3.2.1",
"react": "^16.14.0",
"react-dom": "^16.14.0"
}, },
"skipLibCheck": true, "skipLibCheck": true,
"alias": { "alias": {

55
src/Contact.jsx Normal file
View file

@ -0,0 +1,55 @@
import { h, render, Component } from "preact";
import Header from "./Header";
import {
Container,
Card,
CardHeader,
CardContent,
Typography,
List,
ListItem,
ListItemText,
Link,
} from "@material-ui/core";
class Contact extends Component {
render() {
return (
<span>
<Header />
<Container maxWidth="md">
<p />
<Card>
<CardHeader title="Contact" />
<CardContent>
<ListItemText>
LinkedIn:{" "}
<Link
rel="noopener"
href="https://www.linkedin.com/in/warwick-new-96491a147/ "
>
https://www.linkedin.com/in/warwick-new-96491a147/
</Link>
</ListItemText>
<ListItemText>
Email:{" "}
<Link rel="noopener" href="mailto:warwick.l.e.new@gmail.com">
warwick.l.e.new@gmail.com
</Link>
</ListItemText>
<ListItemText>
Phone Number:{" "}
<Link rel="noopener" href="tel:07445728181">
07445 728 181
</Link>
</ListItemText>
</CardContent>
</Card>
</Container>
</span>
);
}
}
export default Contact;

View file

@ -12,6 +12,7 @@ import {
Button, Button,
} from "@material-ui/core"; } from "@material-ui/core";
import Monq from "../static/images/Monq.jpg"; import Monq from "../static/images/Monq.jpg";
import Graphics from "../static/images/Graphics.png";
class GameProjects extends Component { class GameProjects extends Component {
constructor(props) { constructor(props) {
@ -34,13 +35,13 @@ levels to show that off nor create a hook to keep people interested in the game.
{ {
header: "Graphics", header: "Graphics",
subheader: "Bsc (hons) Computing for Games - Falmouth University", subheader: "Bsc (hons) Computing for Games - Falmouth University",
image: undefined, image: Graphics,
imageAltText: "Need up to date image", imageAltText: "Generated terrain",
content: `This is where I learned how to create a graphics engine from content: `This is where I learned how to create a graphics engine from
scratch using OpenGL and was the project which I enjoyed the most during my scratch using OpenGL and was the project which I enjoyed the most during my
bachelors degree. I especially enjoyed how deep I jumped into C++ to improve it's bachelors degree. I especially enjoyed how deep I jumped into C++ to improve it's
memory footprint returning to this project in my final year of university.`, memory footprint returning to this project in my final year of university.`,
buttonText: "Need link", buttonText: undefined,
buttonLink: undefined, buttonLink: undefined,
}, },
]; ];

View file

@ -8,7 +8,7 @@ import {
Button, Button,
} from "@material-ui/core"; } from "@material-ui/core";
import CV from "../static/cv.pdf"; import CV from "../static/cv.pdf";
import PortfolioVideo from "../static/video/Portfolio.mp4"; import PortfolioVideo from "../static/video/Portfolio.webm";
class Greeting extends Component { class Greeting extends Component {
render() { render() {
@ -23,8 +23,8 @@ class Greeting extends Component {
width: "100%", width: "100%",
left: "50%", left: "50%",
right: "50%", right: "50%",
top: "50%", top: "25%",
height: "100%", height: "50%",
objectFit: "cover", objectFit: "cover",
transform: "translate(-50%,-50%)", transform: "translate(-50%,-50%)",
zIndex: "-1", zIndex: "-1",
@ -32,7 +32,7 @@ class Greeting extends Component {
//width="100%" //width="100%"
//height="315" //height="315"
> >
<source src={PortfolioVideo} type="video/mp4" /> <source src={PortfolioVideo} type="video/webm" />
</video> </video>
<Container maxWidth="sm"> <Container maxWidth="sm">
<p /> <p />

View file

@ -1,14 +1,42 @@
import { h, render, Component } from "preact"; import { h, render, Component } from "preact";
import { AppBar, Toolbar, Container, Typography } from "@material-ui/core"; import {
AppBar,
Toolbar,
Container,
Typography,
Button,
Box,
Link,
} from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
class Header extends Component { class Header extends Component {
constructor(props) {
super(props);
this.styles = makeStyles({
toolbarButtons: {
marginLeft: "auto",
},
});
}
render() { render() {
const classes = this.styles();
return ( return (
<AppBar position="sticky"> <AppBar position="sticky">
<Toolbar> <Toolbar>
<Container maxWidth="lg"> <Link color="inherit" href="/">
<Typography>Warwick New</Typography> <Typography style={{ flex: 1 }}>Warwick New</Typography>
</Container> </Link>
<Box />
<Button
variant="contained"
href="/contact"
color="secondary"
style={{ marginLeft: "auto" }}
>
Contact Me
</Button>
</Toolbar> </Toolbar>
</AppBar> </AppBar>
); );

23
src/Home.jsx Normal file
View file

@ -0,0 +1,23 @@
import { h, render, Component } from "preact";
import { Container } from "@material-ui/core";
import Header from "./Header";
import Greeting from "./Greeting";
import WebProjects from "./WebProjects";
import GameProjects from "./GameProjects";
class Home extends Component {
render() {
return (
<span>
<Header />
<Greeting />
<Container maxWidth="md">
<WebProjects />
</Container>
<GameProjects />
</span>
);
}
}
export default Home;

View file

@ -1,24 +1,26 @@
import { h, render, Component } from "preact"; import { h, render, Component } from "preact";
import { Container, Grid, Button, Typography } from "@material-ui/core"; import Router from "preact-router";
import AsyncRoute from "preact-async-route";
import { ThemeProvider } from "@material-ui/core/styles"; import { ThemeProvider } from "@material-ui/core/styles";
import CssBaseline from "@material-ui/core/CssBaseline"; import CssBaseline from "@material-ui/core/CssBaseline";
import Home from "./Home";
import theme from "./theme"; import theme from "./theme";
import Header from "./Header"; import "fontsource-roboto";
import Greeting from "./Greeting";
import WebProjects from "./WebProjects";
import GameProjects from "./GameProjects";
class App extends Component { class App extends Component {
render() { render() {
return ( return (
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<CssBaseline /> <CssBaseline />
<Header /> <Router>
<Greeting /> <Home path="/" />
<Container maxWidth="md"> <AsyncRoute
<WebProjects /> path="/contact"
</Container> getComponent={() =>
<GameProjects /> import("./Contact.jsx").then((module) => module.default)
}
/>
</Router>
</ThemeProvider> </ThemeProvider>
); );
} }

BIN
static/images/Graphics.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

BIN
static/video/Portfolio.webm Normal file

Binary file not shown.