Update portfolio

This commit is contained in:
schmelczerandras 2020-08-30 14:20:49 +02:00
parent 7e75685b0e
commit 0a71a1ae34
7 changed files with 256 additions and 268 deletions

View file

@ -1,9 +1,26 @@
import { create } from './page/index';
import { portfolio } from './portfolio';
import './static/no-change/favicon.ico';
import './static/no-change/og-image.jpg';
import './styles.scss';
import { create } from './portfolio';
create(portfolio);
const initialize = () => {
create();
addSupportForTabNavigation();
removeUnnecessaryOutlines();
};
const addSupportForTabNavigation = () =>
(document.onkeydown = e => {
if (e.key === ' ') {
(document.activeElement as HTMLElement)?.click();
e.preventDefault();
}
});
const removeUnnecessaryOutlines = () =>
(document.onclick = e => {
(e.target as HTMLElement)?.blur();
});
initialize();

View file

@ -1,37 +0,0 @@
import { Portfolio } from '../model/portfolio';
import { PageBackground } from './background/background';
import { PageHeader } from './about/about';
import { PageTimeline } from './timeline/timeline';
import { PageFooter } from './footer/footer';
import { PageImageViewer } from './image-viewer/image-viewer';
import { ContainerPage } from '../framework/container-page';
export const create = ({ header, timeline, footer }: Portfolio) => {
const pageHeader = new PageHeader(header);
const pageTimeline = new PageTimeline(timeline);
const pageFooter = new PageFooter(footer);
new ContainerPage(document.body.querySelector('main'), [
new PageImageViewer(),
pageHeader,
pageTimeline,
pageFooter,
new PageBackground(pageHeader, [pageTimeline], pageFooter),
]).setAsMain();
addSupportForTabNavigation();
removeUnnecessaryOutlines();
};
const addSupportForTabNavigation = () =>
(document.onkeydown = e => {
if (e.key === ' ') {
(document.activeElement as HTMLElement)?.click();
e.preventDefault();
}
});
const removeUnnecessaryOutlines = () =>
(document.onclick = e => {
(e.target as HTMLElement)?.blur();
});

View file

@ -1,9 +1,11 @@
import { Portfolio } from './model/portfolio';
import { Text } from './framework/primitives/implementations/text';
import { Image } from './framework/primitives/implementations/image';
import { Video } from './framework/primitives/implementations/video';
import { Anchor } from './framework/primitives/implementations/anchor';
import { PageFooter } from './page/footer/footer';
import { PageHeader } from './page/about/about';
import { PageTimeline } from './page/timeline/timeline';
import { PageImageViewer } from './page/image-viewer/image-viewer';
import { last } from './framework/helper/last';
import me from './static/media/me.jpg';
@ -20,28 +22,31 @@ import color from './static/media/color.jpg';
import platform from './static/media/platform.png';
import photos from './static/media/photos.jpg';
import led from './static/media/led.jpg';
import cvHungarian from './static/cv/schmelczer_andras_cv.pdf';
import cvEnglish from './static/cv/andras_schmelczer_cv.pdf';
import cvEnglish from './static/cv/cv_andras_schmelczer.pdf';
import ledMP4 from './static/media/led.mp4';
import ledWEBM from './static/media/led.webm';
import { ContainerPage } from './framework/container-page';
import { PageBackground } from './page/background/background';
export const portfolio: Portfolio = {
header: {
export const create = () => {
const page = {
imageViewer: new PageImageViewer(),
header: new PageHeader({
name: `András Schmelczer`,
picture: new Image(me, `a picture of me`),
about: [
new Text(
`I have always been fascinated by the engineering feats that surround us.
When I realized that someday I might be able to contribute to these achievements,
I knew that is what I need to aim for. As I am starting my sixth semester at the
I knew that is what I need to aim for. As I am starting my last semester at the
Budapest University of Technology and Economics, I feel I am getting closer to it every day.`
),
new Text(
`You can see some of the more interesting projects I have worked on below.`
),
],
},
timeline: {
}),
timeline: new PageTimeline({
showMoreText: `Show details`,
showLessText: `Show less`,
elements: [
@ -279,19 +284,22 @@ export const portfolio: Portfolio = {
],
},
],
},
footer: {
}),
footer: new PageFooter({
title: `Learn more`,
curiumVitaes: [
{ name: `Curriculum vitae (en)`, url: cvEnglish },
{ name: `Önéletrajz (hu)`, url: cvHungarian },
],
curiumVitaes: [{ name: `Curriculum vitae`, url: cvEnglish }],
email: `andras@schmelczer.dev`,
lastEditText: `Last modified on `,
lastEdit: new Date(2020, 3, 21), // months are 0 indexed
lastEdit: new Date(2020, 8 + 1, 30), // months are 0 indexed
gitHub: new Anchor(
`https://github.com/schmelczerandras/timeline`,
`Find this on GitHub`
),
},
}),
};
new ContainerPage(document.body.querySelector('main'), [
...Object.values(page),
new PageBackground(page.header, [page.timeline], page.footer),
]).setAsMain();
};

Binary file not shown.