diff --git a/.dockerignore b/.dockerignore new file mode 100755 index 0000000..3535a6b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +dist +target +package-lock.json +.* diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 16acd49..97122fc --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules dist +target package-lock.json diff --git a/.idea/CompiledCV.iml b/.idea/CompiledCV.iml old mode 100644 new mode 100755 diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml old mode 100644 new mode 100755 diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml old mode 100644 new mode 100755 diff --git a/.idea/dictionaries/Schme.xml b/.idea/dictionaries/Schme.xml old mode 100644 new mode 100755 diff --git a/.idea/dictionaries/andras.xml b/.idea/dictionaries/andras.xml old mode 100644 new mode 100755 diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml old mode 100644 new mode 100755 diff --git a/.idea/misc.xml b/.idea/misc.xml old mode 100644 new mode 100755 diff --git a/.idea/modules.xml b/.idea/modules.xml old mode 100644 new mode 100755 diff --git a/.idea/vagrant.xml b/.idea/vagrant.xml old mode 100644 new mode 100755 diff --git a/.idea/vcs.xml b/.idea/vcs.xml old mode 100644 new mode 100755 diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml old mode 100644 new mode 100755 diff --git a/.idea/workspace.xml b/.idea/workspace.xml old mode 100644 new mode 100755 index f06bc1e..292cb3d --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,21 +2,129 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -161,14 +275,22 @@ \ No newline at end of file diff --git a/.prettierrc b/.prettierrc old mode 100644 new mode 100755 diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..d4cb9c9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM node:latest as build + +WORKDIR /home/node +COPY . . +RUN npm install +RUN npm run build + +FROM nginx:alpine +COPY --from=build /home/node/dist/ /usr/share/nginx/html diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/custom.d.ts b/custom.d.ts old mode 100644 new mode 100755 diff --git a/package.json b/package.json old mode 100644 new mode 100755 index f28fae1..c7ebb43 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "private": true, "scripts": { "start": "webpack-dev-server --mode development", - "build": "webpack" + "build": "webpack", + "build-docker": "webpack && docker build -t portfolio . && docker save -o target/portfolio portfolio" }, "repository": { "type": "git", diff --git a/src/framework/container-page.ts b/src/framework/container-page.ts old mode 100644 new mode 100755 diff --git a/src/framework/events/event-broadcaster.ts b/src/framework/events/event-broadcaster.ts old mode 100644 new mode 100755 diff --git a/src/framework/events/page-event.ts b/src/framework/events/page-event.ts old mode 100644 new mode 100755 diff --git a/src/framework/framework.scss b/src/framework/framework.scss old mode 100644 new mode 100755 diff --git a/src/framework/helper/create-element.ts b/src/framework/helper/create-element.ts old mode 100644 new mode 100755 diff --git a/src/framework/helper/get-height.ts b/src/framework/helper/get-height.ts old mode 100644 new mode 100755 diff --git a/src/framework/helper/last.ts b/src/framework/helper/last.ts old mode 100644 new mode 100755 index fc4cdfb..4072ea6 --- a/src/framework/helper/last.ts +++ b/src/framework/helper/last.ts @@ -1,2 +1,2 @@ -export const last = (list: Array): T => +export const last = (list: ArrayLike): T => list.length >= 1 ? list[list.length - 1] : undefined; diff --git a/src/framework/helper/mix-colors.ts b/src/framework/helper/mix-colors.ts old mode 100644 new mode 100755 diff --git a/src/framework/helper/polyfills.ts b/src/framework/helper/polyfills.ts old mode 100644 new mode 100755 diff --git a/src/framework/helper/random.ts b/src/framework/helper/random.ts old mode 100644 new mode 100755 diff --git a/src/framework/helper/sum.ts b/src/framework/helper/sum.ts old mode 100644 new mode 100755 diff --git a/src/framework/model/misc.ts b/src/framework/model/misc.ts old mode 100644 new mode 100755 diff --git a/src/framework/page-element.ts b/src/framework/page-element.ts old mode 100644 new mode 100755 diff --git a/src/framework/primitives/implementations/anchor.ts b/src/framework/primitives/implementations/anchor.ts old mode 100644 new mode 100755 diff --git a/src/framework/primitives/implementations/image.ts b/src/framework/primitives/implementations/image.ts old mode 100644 new mode 100755 index e7ac759..de7c185 --- a/src/framework/primitives/implementations/image.ts +++ b/src/framework/primitives/implementations/image.ts @@ -3,6 +3,7 @@ import { html, ResponsiveImage } from '../../model/misc'; import { last } from '../../helper/last'; export class Image implements Primitive { + private static readonly IMAGE_SCREEN_RATIO = 0.8; public constructor( private readonly image: ResponsiveImage, private readonly alt: string @@ -13,6 +14,15 @@ export class Image implements Primitive { ${!disableInnerShadow ? `
` : ''} ${this.alt} diff --git a/src/framework/primitives/implementations/text.ts b/src/framework/primitives/implementations/text.ts old mode 100644 new mode 100755 diff --git a/src/framework/primitives/implementations/video.ts b/src/framework/primitives/implementations/video.ts old mode 100644 new mode 100755 diff --git a/src/framework/primitives/primitive.ts b/src/framework/primitives/primitive.ts old mode 100644 new mode 100755 diff --git a/src/framework/styles/animations/animations.scss b/src/framework/styles/animations/animations.scss old mode 100644 new mode 100755 diff --git a/src/framework/styles/animations/animations.ts b/src/framework/styles/animations/animations.ts old mode 100644 new mode 100755 diff --git a/src/framework/styles/dark-mode/dark-mode.scss b/src/framework/styles/dark-mode/dark-mode.scss old mode 100644 new mode 100755 diff --git a/src/framework/styles/dark-mode/dark-mode.ts b/src/framework/styles/dark-mode/dark-mode.ts old mode 100644 new mode 100755 diff --git a/src/framework/styles/index.scss b/src/framework/styles/index.scss old mode 100644 new mode 100755 diff --git a/src/framework/styles/wrapper.scss b/src/framework/styles/wrapper.scss old mode 100644 new mode 100755 index 7796af5..8a95081 --- a/src/framework/styles/wrapper.scss +++ b/src/framework/styles/wrapper.scss @@ -7,7 +7,7 @@ $large-screen-light-theme-variables: () !default; $large-screen-dark-theme-variables: () !default; @mixin on-small-screen() { - @media (max-width: $breakpoint-width) { + @media (max-width: $breakpoint-width - 1px) { @content; } } diff --git a/src/index.html b/src/index.html old mode 100644 new mode 100755 diff --git a/src/index.ts b/src/index.ts old mode 100644 new mode 100755 diff --git a/src/model/portfolio.ts b/src/model/portfolio.ts old mode 100644 new mode 100755 diff --git a/src/page/about/about.html.ts b/src/page/about/about.html.ts old mode 100644 new mode 100755 diff --git a/src/page/about/about.scss b/src/page/about/about.scss old mode 100644 new mode 100755 diff --git a/src/page/about/about.ts b/src/page/about/about.ts old mode 100644 new mode 100755 diff --git a/src/page/background/animation.ts b/src/page/background/animation.ts old mode 100644 new mode 100755 index 6a6224c..6357248 --- a/src/page/background/animation.ts +++ b/src/page/background/animation.ts @@ -7,9 +7,10 @@ export class Animation { private to: T, private intervalInMs: number, private interpolator: (from: T, to: T, q: number) => T, - private onChange?: (currentValue: T) => void - ) {} + ) { + this._value = from; + } public step(deltaTimeInMs: number) { if (this.elapsedTime === this.intervalInMs) { diff --git a/src/page/background/background.html.ts b/src/page/background/background.html.ts old mode 100644 new mode 100755 diff --git a/src/page/background/background.scss b/src/page/background/background.scss old mode 100644 new mode 100755 diff --git a/src/page/background/background.ts b/src/page/background/background.ts old mode 100644 new mode 100755 index 53c2106..0e38fae --- a/src/page/background/background.ts +++ b/src/page/background/background.ts @@ -142,7 +142,7 @@ export class PageBackground extends PageElement { blob.topLeft.add(Vec3.from(blob.size, 0)) ); - if (this.isInView(topLeft) || this.isInView(bottomRight)) { + if (this.isInView(topLeft, bottomRight)) { blob.draw(this.ctx, topLeft, bottomRight.subtract(topLeft)); } }); @@ -175,12 +175,12 @@ export class PageBackground extends PageElement { return new Vec2(p.x * m - z / 2, p.y * m - z / 2 + scrollPosition); } - private isInView(p: Vec2): boolean { + private isInView(topLeft: Vec2, bottomRight: Vec2): boolean { return ( - 0 <= p.x && - p.x <= this.canvas.width && - 0 <= p.y && - p.y <= this.canvas.height + ((0 <= topLeft.x && topLeft.x <= this.canvas.width) || + (0 <= bottomRight.x && bottomRight.x < this.canvas.width)) && + ((0 <= topLeft.y && topLeft.y <= this.canvas.height) || + (0 <= bottomRight.y && bottomRight.y <= this.canvas.height)) ); } diff --git a/src/page/background/blob.ts b/src/page/background/blob.ts old mode 100644 new mode 100755 diff --git a/src/page/background/vec2.ts b/src/page/background/vec2.ts old mode 100644 new mode 100755 diff --git a/src/page/background/vec3.ts b/src/page/background/vec3.ts old mode 100644 new mode 100755 diff --git a/src/page/content/content.html.ts b/src/page/content/content.html.ts old mode 100644 new mode 100755 diff --git a/src/page/content/content.scss b/src/page/content/content.scss old mode 100644 new mode 100755 diff --git a/src/page/content/content.ts b/src/page/content/content.ts old mode 100644 new mode 100755 diff --git a/src/page/footer/footer.html.ts b/src/page/footer/footer.html.ts old mode 100644 new mode 100755 diff --git a/src/page/footer/footer.scss b/src/page/footer/footer.scss old mode 100644 new mode 100755 diff --git a/src/page/footer/footer.ts b/src/page/footer/footer.ts old mode 100644 new mode 100755 diff --git a/src/page/image-viewer/image-viewer.html.ts b/src/page/image-viewer/image-viewer.html.ts old mode 100644 new mode 100755 diff --git a/src/page/image-viewer/image-viewer.scss b/src/page/image-viewer/image-viewer.scss old mode 100644 new mode 100755 diff --git a/src/page/image-viewer/image-viewer.ts b/src/page/image-viewer/image-viewer.ts old mode 100644 new mode 100755 index 39e8560..9db8e76 --- a/src/page/image-viewer/image-viewer.ts +++ b/src/page/image-viewer/image-viewer.ts @@ -28,10 +28,11 @@ export class PageImageViewer extends PageElement { private handleClick(event: Event) { const container = this.query('#container'); - Array.prototype.forEach.call(container.childNodes, (e: HTMLElement) => - e.remove() - ); - container.appendChild((event.target as HTMLElement).cloneNode()); + container.firstElementChild?.remove(); + + const element: HTMLImageElement = new Image(); + element.src = (event.target as HTMLImageElement).src; + container.appendChild(element); PageImageViewer.show(this.element); } diff --git a/src/page/index.ts b/src/page/index.ts old mode 100644 new mode 100755 diff --git a/src/page/theme-switcher/theme-switcher.html.ts b/src/page/theme-switcher/theme-switcher.html.ts old mode 100644 new mode 100755 diff --git a/src/page/theme-switcher/theme-switcher.scss b/src/page/theme-switcher/theme-switcher.scss old mode 100644 new mode 100755 index 2bb52eb..51d1ba0 --- a/src/page/theme-switcher/theme-switcher.scss +++ b/src/page/theme-switcher/theme-switcher.scss @@ -3,9 +3,15 @@ @include responsive using($vars) { input[type='checkbox']#theme-switcher { @include on-large-screen { - position: fixed; - top: map_get($vars, $normal-margin); - right: map_get($vars, $normal-margin); + position: absolute; + top: -1 * map_get($vars, $small-margin); + right: calc( + -1 * (50vw - #{map_get($vars, $body-width)} / 2) + #{map_get( + $vars, + $normal-margin + )} + ); + transform: translateY(-100%); } @include on-small-screen { diff --git a/src/page/theme-switcher/theme-switcher.ts b/src/page/theme-switcher/theme-switcher.ts old mode 100644 new mode 100755 diff --git a/src/page/timeline/timeline-element/timeline-element.html.ts b/src/page/timeline/timeline-element/timeline-element.html.ts old mode 100644 new mode 100755 diff --git a/src/page/timeline/timeline-element/timeline-element.scss b/src/page/timeline/timeline-element/timeline-element.scss old mode 100644 new mode 100755 diff --git a/src/page/timeline/timeline-element/timeline-element.ts b/src/page/timeline/timeline-element/timeline-element.ts old mode 100644 new mode 100755 diff --git a/src/page/timeline/timeline.html.ts b/src/page/timeline/timeline.html.ts old mode 100644 new mode 100755 diff --git a/src/page/timeline/timeline.scss b/src/page/timeline/timeline.scss old mode 100644 new mode 100755 diff --git a/src/page/timeline/timeline.ts b/src/page/timeline/timeline.ts old mode 100644 new mode 100755 diff --git a/src/portfolio.ts b/src/portfolio.ts old mode 100644 new mode 100755 diff --git a/src/static/cv/andras_schmelczer_cv_2020_01.pdf b/src/static/cv/andras_schmelczer_cv_2020_01.pdf old mode 100644 new mode 100755 diff --git a/src/static/fonts/lato/lato-v16-latin-italic.eot b/src/static/fonts/lato/lato-v16-latin-italic.eot old mode 100644 new mode 100755 diff --git a/src/static/fonts/lato/lato-v16-latin-italic.svg b/src/static/fonts/lato/lato-v16-latin-italic.svg old mode 100644 new mode 100755 diff --git a/src/static/fonts/lato/lato-v16-latin-italic.ttf b/src/static/fonts/lato/lato-v16-latin-italic.ttf old mode 100644 new mode 100755 diff --git a/src/static/fonts/lato/lato-v16-latin-italic.woff b/src/static/fonts/lato/lato-v16-latin-italic.woff old mode 100644 new mode 100755 diff --git a/src/static/fonts/lato/lato-v16-latin-italic.woff2 b/src/static/fonts/lato/lato-v16-latin-italic.woff2 old mode 100644 new mode 100755 diff --git a/src/static/fonts/lato/lato-v16-latin-regular.eot b/src/static/fonts/lato/lato-v16-latin-regular.eot old mode 100644 new mode 100755 diff --git a/src/static/fonts/lato/lato-v16-latin-regular.svg b/src/static/fonts/lato/lato-v16-latin-regular.svg old mode 100644 new mode 100755 diff --git a/src/static/fonts/lato/lato-v16-latin-regular.ttf b/src/static/fonts/lato/lato-v16-latin-regular.ttf old mode 100644 new mode 100755 diff --git a/src/static/fonts/lato/lato-v16-latin-regular.woff b/src/static/fonts/lato/lato-v16-latin-regular.woff old mode 100644 new mode 100755 diff --git a/src/static/fonts/lato/lato-v16-latin-regular.woff2 b/src/static/fonts/lato/lato-v16-latin-regular.woff2 old mode 100644 new mode 100755 diff --git a/src/static/fonts/montserrat/montserrat-v14-latin-regular.eot b/src/static/fonts/montserrat/montserrat-v14-latin-regular.eot old mode 100644 new mode 100755 diff --git a/src/static/fonts/montserrat/montserrat-v14-latin-regular.svg b/src/static/fonts/montserrat/montserrat-v14-latin-regular.svg old mode 100644 new mode 100755 diff --git a/src/static/fonts/montserrat/montserrat-v14-latin-regular.ttf b/src/static/fonts/montserrat/montserrat-v14-latin-regular.ttf old mode 100644 new mode 100755 diff --git a/src/static/fonts/montserrat/montserrat-v14-latin-regular.woff b/src/static/fonts/montserrat/montserrat-v14-latin-regular.woff old mode 100644 new mode 100755 diff --git a/src/static/fonts/montserrat/montserrat-v14-latin-regular.woff2 b/src/static/fonts/montserrat/montserrat-v14-latin-regular.woff2 old mode 100644 new mode 100755 diff --git a/src/static/icons/cancel.svg b/src/static/icons/cancel.svg old mode 100644 new mode 100755 diff --git a/src/static/media/avoid.jpg b/src/static/media/avoid.jpg old mode 100644 new mode 100755 diff --git a/src/static/media/color.jpg b/src/static/media/color.jpg old mode 100644 new mode 100755 diff --git a/src/static/media/forex.gif b/src/static/media/forex.gif old mode 100644 new mode 100755 diff --git a/src/static/media/forex.mp4 b/src/static/media/forex.mp4 old mode 100644 new mode 100755 diff --git a/src/static/media/forex.webm b/src/static/media/forex.webm old mode 100644 new mode 100755 diff --git a/src/static/media/led.jpg b/src/static/media/led.jpg old mode 100644 new mode 100755 diff --git a/src/static/media/led.mp4 b/src/static/media/led.mp4 old mode 100644 new mode 100755 diff --git a/src/static/media/led.webm b/src/static/media/led.webm old mode 100644 new mode 100755 diff --git a/src/static/media/me-2.jpg b/src/static/media/me-2.jpg old mode 100644 new mode 100755 diff --git a/src/static/media/me.jpg b/src/static/media/me.jpg old mode 100644 new mode 100755 diff --git a/src/static/media/my-notes.png b/src/static/media/my-notes.png old mode 100644 new mode 100755 diff --git a/src/static/media/og-image.jpg b/src/static/media/og-image.jpg old mode 100644 new mode 100755 diff --git a/src/static/media/og.jpg b/src/static/media/og.jpg old mode 100644 new mode 100755 diff --git a/src/static/media/photos.jpg b/src/static/media/photos.jpg old mode 100644 new mode 100755 diff --git a/src/static/media/platform.png b/src/static/media/platform.png old mode 100644 new mode 100755 diff --git a/src/static/media/process-simulator-input.jpg b/src/static/media/process-simulator-input.jpg old mode 100644 new mode 100755 diff --git a/src/static/media/process-simulator.jpg b/src/static/media/process-simulator.jpg old mode 100644 new mode 100755 diff --git a/src/static/media/simulation.jpg b/src/static/media/simulation.jpg old mode 100644 new mode 100755 diff --git a/src/static/no-change/favicon.ico b/src/static/no-change/favicon.ico old mode 100644 new mode 100755 diff --git a/src/static/no-change/og-image.jpg b/src/static/no-change/og-image.jpg old mode 100644 new mode 100755 diff --git a/src/style/_id.scss b/src/style/_id.scss old mode 100644 new mode 100755 diff --git a/src/style/a.scss b/src/style/a.scss old mode 100644 new mode 100755 diff --git a/src/style/configured-responsive.scss b/src/style/configured-responsive.scss old mode 100644 new mode 100755 diff --git a/src/style/fonts.scss b/src/style/fonts.scss old mode 100644 new mode 100755 diff --git a/src/style/include.scss b/src/style/include.scss old mode 100644 new mode 100755 diff --git a/src/style/mixins.scss b/src/style/mixins.scss old mode 100644 new mode 100755 diff --git a/src/style/vars.scss b/src/style/vars.scss old mode 100644 new mode 100755 diff --git a/src/styles.scss b/src/styles.scss old mode 100644 new mode 100755 diff --git a/tsconfig.json b/tsconfig.json old mode 100644 new mode 100755 diff --git a/webpack.config.js b/webpack.config.js old mode 100644 new mode 100755