From fd14613db757d8048d99f2a978ef9a7a1c25d4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schmelczer=20Andr=C3=A1s?= Date: Sun, 12 Jan 2020 20:26:32 +0100 Subject: [PATCH] Fix some bugs --- .dockerignore | 5 + .gitignore | 1 + .idea/CompiledCV.iml | 0 .idea/codeStyles/Project.xml | 0 .idea/codeStyles/codeStyleConfig.xml | 0 .idea/dictionaries/Schme.xml | 0 .idea/dictionaries/andras.xml | 0 .idea/inspectionProfiles/Project_Default.xml | 0 .idea/misc.xml | 0 .idea/modules.xml | 0 .idea/vagrant.xml | 0 .idea/vcs.xml | 0 .idea/watcherTasks.xml | 0 .idea/workspace.xml | 148 ++++++++++++++++-- .prettierrc | 0 Dockerfile | 9 ++ README.md | 0 custom.d.ts | 0 package.json | 3 +- src/framework/container-page.ts | 0 src/framework/events/event-broadcaster.ts | 0 src/framework/events/page-event.ts | 0 src/framework/framework.scss | 0 src/framework/helper/create-element.ts | 0 src/framework/helper/get-height.ts | 0 src/framework/helper/last.ts | 2 +- src/framework/helper/mix-colors.ts | 0 src/framework/helper/polyfills.ts | 0 src/framework/helper/random.ts | 0 src/framework/helper/sum.ts | 0 src/framework/model/misc.ts | 0 src/framework/page-element.ts | 0 .../primitives/implementations/anchor.ts | 0 .../primitives/implementations/image.ts | 10 ++ .../primitives/implementations/text.ts | 0 .../primitives/implementations/video.ts | 0 src/framework/primitives/primitive.ts | 0 .../styles/animations/animations.scss | 0 src/framework/styles/animations/animations.ts | 0 src/framework/styles/dark-mode/dark-mode.scss | 0 src/framework/styles/dark-mode/dark-mode.ts | 0 src/framework/styles/index.scss | 0 src/framework/styles/wrapper.scss | 2 +- src/index.html | 0 src/index.ts | 0 src/model/portfolio.ts | 0 src/page/about/about.html.ts | 0 src/page/about/about.scss | 0 src/page/about/about.ts | 0 src/page/background/animation.ts | 5 +- src/page/background/background.html.ts | 0 src/page/background/background.scss | 0 src/page/background/background.ts | 12 +- src/page/background/blob.ts | 0 src/page/background/vec2.ts | 0 src/page/background/vec3.ts | 0 src/page/content/content.html.ts | 0 src/page/content/content.scss | 0 src/page/content/content.ts | 0 src/page/footer/footer.html.ts | 0 src/page/footer/footer.scss | 0 src/page/footer/footer.ts | 0 src/page/image-viewer/image-viewer.html.ts | 0 src/page/image-viewer/image-viewer.scss | 0 src/page/image-viewer/image-viewer.ts | 9 +- src/page/index.ts | 0 .../theme-switcher/theme-switcher.html.ts | 0 src/page/theme-switcher/theme-switcher.scss | 12 +- src/page/theme-switcher/theme-switcher.ts | 0 .../timeline-element/timeline-element.html.ts | 0 .../timeline-element/timeline-element.scss | 0 .../timeline-element/timeline-element.ts | 0 src/page/timeline/timeline.html.ts | 0 src/page/timeline/timeline.scss | 0 src/page/timeline/timeline.ts | 0 src/portfolio.ts | 0 .../cv/andras_schmelczer_cv_2020_01.pdf | Bin .../fonts/lato/lato-v16-latin-italic.eot | Bin .../fonts/lato/lato-v16-latin-italic.svg | 0 .../fonts/lato/lato-v16-latin-italic.ttf | Bin .../fonts/lato/lato-v16-latin-italic.woff | Bin .../fonts/lato/lato-v16-latin-italic.woff2 | Bin .../fonts/lato/lato-v16-latin-regular.eot | Bin .../fonts/lato/lato-v16-latin-regular.svg | 0 .../fonts/lato/lato-v16-latin-regular.ttf | Bin .../fonts/lato/lato-v16-latin-regular.woff | Bin .../fonts/lato/lato-v16-latin-regular.woff2 | Bin .../montserrat-v14-latin-regular.eot | Bin .../montserrat-v14-latin-regular.svg | 0 .../montserrat-v14-latin-regular.ttf | Bin .../montserrat-v14-latin-regular.woff | Bin .../montserrat-v14-latin-regular.woff2 | Bin src/static/icons/cancel.svg | 0 src/static/media/avoid.jpg | Bin src/static/media/color.jpg | Bin src/static/media/forex.gif | Bin src/static/media/forex.mp4 | Bin src/static/media/forex.webm | Bin src/static/media/led.jpg | Bin src/static/media/led.mp4 | Bin src/static/media/led.webm | Bin src/static/media/me-2.jpg | Bin src/static/media/me.jpg | Bin src/static/media/my-notes.png | Bin src/static/media/og-image.jpg | Bin src/static/media/og.jpg | Bin src/static/media/photos.jpg | Bin src/static/media/platform.png | Bin src/static/media/process-simulator-input.jpg | Bin src/static/media/process-simulator.jpg | Bin src/static/media/simulation.jpg | Bin src/static/no-change/favicon.ico | Bin src/static/no-change/og-image.jpg | Bin src/style/_id.scss | 0 src/style/a.scss | 0 src/style/configured-responsive.scss | 0 src/style/fonts.scss | 0 src/style/include.scss | 0 src/style/mixins.scss | 0 src/style/vars.scss | 0 src/styles.scss | 0 tsconfig.json | 0 webpack.config.js | 0 123 files changed, 187 insertions(+), 31 deletions(-) create mode 100755 .dockerignore mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .idea/CompiledCV.iml mode change 100644 => 100755 .idea/codeStyles/Project.xml mode change 100644 => 100755 .idea/codeStyles/codeStyleConfig.xml mode change 100644 => 100755 .idea/dictionaries/Schme.xml mode change 100644 => 100755 .idea/dictionaries/andras.xml mode change 100644 => 100755 .idea/inspectionProfiles/Project_Default.xml mode change 100644 => 100755 .idea/misc.xml mode change 100644 => 100755 .idea/modules.xml mode change 100644 => 100755 .idea/vagrant.xml mode change 100644 => 100755 .idea/vcs.xml mode change 100644 => 100755 .idea/watcherTasks.xml mode change 100644 => 100755 .idea/workspace.xml mode change 100644 => 100755 .prettierrc create mode 100755 Dockerfile mode change 100644 => 100755 README.md mode change 100644 => 100755 custom.d.ts mode change 100644 => 100755 package.json mode change 100644 => 100755 src/framework/container-page.ts mode change 100644 => 100755 src/framework/events/event-broadcaster.ts mode change 100644 => 100755 src/framework/events/page-event.ts mode change 100644 => 100755 src/framework/framework.scss mode change 100644 => 100755 src/framework/helper/create-element.ts mode change 100644 => 100755 src/framework/helper/get-height.ts mode change 100644 => 100755 src/framework/helper/last.ts mode change 100644 => 100755 src/framework/helper/mix-colors.ts mode change 100644 => 100755 src/framework/helper/polyfills.ts mode change 100644 => 100755 src/framework/helper/random.ts mode change 100644 => 100755 src/framework/helper/sum.ts mode change 100644 => 100755 src/framework/model/misc.ts mode change 100644 => 100755 src/framework/page-element.ts mode change 100644 => 100755 src/framework/primitives/implementations/anchor.ts mode change 100644 => 100755 src/framework/primitives/implementations/image.ts mode change 100644 => 100755 src/framework/primitives/implementations/text.ts mode change 100644 => 100755 src/framework/primitives/implementations/video.ts mode change 100644 => 100755 src/framework/primitives/primitive.ts mode change 100644 => 100755 src/framework/styles/animations/animations.scss mode change 100644 => 100755 src/framework/styles/animations/animations.ts mode change 100644 => 100755 src/framework/styles/dark-mode/dark-mode.scss mode change 100644 => 100755 src/framework/styles/dark-mode/dark-mode.ts mode change 100644 => 100755 src/framework/styles/index.scss mode change 100644 => 100755 src/framework/styles/wrapper.scss mode change 100644 => 100755 src/index.html mode change 100644 => 100755 src/index.ts mode change 100644 => 100755 src/model/portfolio.ts mode change 100644 => 100755 src/page/about/about.html.ts mode change 100644 => 100755 src/page/about/about.scss mode change 100644 => 100755 src/page/about/about.ts mode change 100644 => 100755 src/page/background/animation.ts mode change 100644 => 100755 src/page/background/background.html.ts mode change 100644 => 100755 src/page/background/background.scss mode change 100644 => 100755 src/page/background/background.ts mode change 100644 => 100755 src/page/background/blob.ts mode change 100644 => 100755 src/page/background/vec2.ts mode change 100644 => 100755 src/page/background/vec3.ts mode change 100644 => 100755 src/page/content/content.html.ts mode change 100644 => 100755 src/page/content/content.scss mode change 100644 => 100755 src/page/content/content.ts mode change 100644 => 100755 src/page/footer/footer.html.ts mode change 100644 => 100755 src/page/footer/footer.scss mode change 100644 => 100755 src/page/footer/footer.ts mode change 100644 => 100755 src/page/image-viewer/image-viewer.html.ts mode change 100644 => 100755 src/page/image-viewer/image-viewer.scss mode change 100644 => 100755 src/page/image-viewer/image-viewer.ts mode change 100644 => 100755 src/page/index.ts mode change 100644 => 100755 src/page/theme-switcher/theme-switcher.html.ts mode change 100644 => 100755 src/page/theme-switcher/theme-switcher.scss mode change 100644 => 100755 src/page/theme-switcher/theme-switcher.ts mode change 100644 => 100755 src/page/timeline/timeline-element/timeline-element.html.ts mode change 100644 => 100755 src/page/timeline/timeline-element/timeline-element.scss mode change 100644 => 100755 src/page/timeline/timeline-element/timeline-element.ts mode change 100644 => 100755 src/page/timeline/timeline.html.ts mode change 100644 => 100755 src/page/timeline/timeline.scss mode change 100644 => 100755 src/page/timeline/timeline.ts mode change 100644 => 100755 src/portfolio.ts mode change 100644 => 100755 src/static/cv/andras_schmelczer_cv_2020_01.pdf mode change 100644 => 100755 src/static/fonts/lato/lato-v16-latin-italic.eot mode change 100644 => 100755 src/static/fonts/lato/lato-v16-latin-italic.svg mode change 100644 => 100755 src/static/fonts/lato/lato-v16-latin-italic.ttf mode change 100644 => 100755 src/static/fonts/lato/lato-v16-latin-italic.woff mode change 100644 => 100755 src/static/fonts/lato/lato-v16-latin-italic.woff2 mode change 100644 => 100755 src/static/fonts/lato/lato-v16-latin-regular.eot mode change 100644 => 100755 src/static/fonts/lato/lato-v16-latin-regular.svg mode change 100644 => 100755 src/static/fonts/lato/lato-v16-latin-regular.ttf mode change 100644 => 100755 src/static/fonts/lato/lato-v16-latin-regular.woff mode change 100644 => 100755 src/static/fonts/lato/lato-v16-latin-regular.woff2 mode change 100644 => 100755 src/static/fonts/montserrat/montserrat-v14-latin-regular.eot mode change 100644 => 100755 src/static/fonts/montserrat/montserrat-v14-latin-regular.svg mode change 100644 => 100755 src/static/fonts/montserrat/montserrat-v14-latin-regular.ttf mode change 100644 => 100755 src/static/fonts/montserrat/montserrat-v14-latin-regular.woff mode change 100644 => 100755 src/static/fonts/montserrat/montserrat-v14-latin-regular.woff2 mode change 100644 => 100755 src/static/icons/cancel.svg mode change 100644 => 100755 src/static/media/avoid.jpg mode change 100644 => 100755 src/static/media/color.jpg mode change 100644 => 100755 src/static/media/forex.gif mode change 100644 => 100755 src/static/media/forex.mp4 mode change 100644 => 100755 src/static/media/forex.webm mode change 100644 => 100755 src/static/media/led.jpg mode change 100644 => 100755 src/static/media/led.mp4 mode change 100644 => 100755 src/static/media/led.webm mode change 100644 => 100755 src/static/media/me-2.jpg mode change 100644 => 100755 src/static/media/me.jpg mode change 100644 => 100755 src/static/media/my-notes.png mode change 100644 => 100755 src/static/media/og-image.jpg mode change 100644 => 100755 src/static/media/og.jpg mode change 100644 => 100755 src/static/media/photos.jpg mode change 100644 => 100755 src/static/media/platform.png mode change 100644 => 100755 src/static/media/process-simulator-input.jpg mode change 100644 => 100755 src/static/media/process-simulator.jpg mode change 100644 => 100755 src/static/media/simulation.jpg mode change 100644 => 100755 src/static/no-change/favicon.ico mode change 100644 => 100755 src/static/no-change/og-image.jpg mode change 100644 => 100755 src/style/_id.scss mode change 100644 => 100755 src/style/a.scss mode change 100644 => 100755 src/style/configured-responsive.scss mode change 100644 => 100755 src/style/fonts.scss mode change 100644 => 100755 src/style/include.scss mode change 100644 => 100755 src/style/mixins.scss mode change 100644 => 100755 src/style/vars.scss mode change 100644 => 100755 src/styles.scss mode change 100644 => 100755 tsconfig.json mode change 100644 => 100755 webpack.config.js 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