Fix some bugs
0
src/framework/container-page.ts
Normal file → Executable file
0
src/framework/events/event-broadcaster.ts
Normal file → Executable file
0
src/framework/events/page-event.ts
Normal file → Executable file
0
src/framework/framework.scss
Normal file → Executable file
0
src/framework/helper/create-element.ts
Normal file → Executable file
0
src/framework/helper/get-height.ts
Normal file → Executable file
2
src/framework/helper/last.ts
Normal file → Executable file
|
|
@ -1,2 +1,2 @@
|
|||
export const last = <T>(list: Array<T>): T =>
|
||||
export const last = <T>(list: ArrayLike<T>): T =>
|
||||
list.length >= 1 ? list[list.length - 1] : undefined;
|
||||
|
|
|
|||
0
src/framework/helper/mix-colors.ts
Normal file → Executable file
0
src/framework/helper/polyfills.ts
Normal file → Executable file
0
src/framework/helper/random.ts
Normal file → Executable file
0
src/framework/helper/sum.ts
Normal file → Executable file
0
src/framework/model/misc.ts
Normal file → Executable file
0
src/framework/page-element.ts
Normal file → Executable file
0
src/framework/primitives/implementations/anchor.ts
Normal file → Executable file
10
src/framework/primitives/implementations/image.ts
Normal file → Executable file
|
|
@ -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 ? `<div class="figure-container">` : ''}
|
||||
<img tabindex="0"
|
||||
srcset="${this.image.srcSet}"
|
||||
sizes="${this.image.images
|
||||
.slice(0, -1)
|
||||
.map(
|
||||
d =>
|
||||
`(max-width: ${d.width / Image.IMAGE_SCREEN_RATIO}px) ${
|
||||
d.width
|
||||
}px,`
|
||||
)
|
||||
.join('\n') + `\n${last(this.image.images).width}px`}"
|
||||
src="${last(this.image.images)?.path}"
|
||||
alt="${this.alt}"
|
||||
/>
|
||||
|
|
|
|||
0
src/framework/primitives/implementations/text.ts
Normal file → Executable file
0
src/framework/primitives/implementations/video.ts
Normal file → Executable file
0
src/framework/primitives/primitive.ts
Normal file → Executable file
0
src/framework/styles/animations/animations.scss
Normal file → Executable file
0
src/framework/styles/animations/animations.ts
Normal file → Executable file
0
src/framework/styles/dark-mode/dark-mode.scss
Normal file → Executable file
0
src/framework/styles/dark-mode/dark-mode.ts
Normal file → Executable file
0
src/framework/styles/index.scss
Normal file → Executable file
2
src/framework/styles/wrapper.scss
Normal file → Executable file
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
0
src/index.html
Normal file → Executable file
0
src/index.ts
Normal file → Executable file
0
src/model/portfolio.ts
Normal file → Executable file
0
src/page/about/about.html.ts
Normal file → Executable file
0
src/page/about/about.scss
Normal file → Executable file
0
src/page/about/about.ts
Normal file → Executable file
5
src/page/background/animation.ts
Normal file → Executable file
|
|
@ -7,9 +7,10 @@ export class Animation<T> {
|
|||
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) {
|
||||
|
|
|
|||
0
src/page/background/background.html.ts
Normal file → Executable file
0
src/page/background/background.scss
Normal file → Executable file
12
src/page/background/background.ts
Normal file → Executable file
|
|
@ -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))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
0
src/page/background/blob.ts
Normal file → Executable file
0
src/page/background/vec2.ts
Normal file → Executable file
0
src/page/background/vec3.ts
Normal file → Executable file
0
src/page/content/content.html.ts
Normal file → Executable file
0
src/page/content/content.scss
Normal file → Executable file
0
src/page/content/content.ts
Normal file → Executable file
0
src/page/footer/footer.html.ts
Normal file → Executable file
0
src/page/footer/footer.scss
Normal file → Executable file
0
src/page/footer/footer.ts
Normal file → Executable file
0
src/page/image-viewer/image-viewer.html.ts
Normal file → Executable file
0
src/page/image-viewer/image-viewer.scss
Normal file → Executable file
9
src/page/image-viewer/image-viewer.ts
Normal file → Executable file
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
0
src/page/index.ts
Normal file → Executable file
0
src/page/theme-switcher/theme-switcher.html.ts
Normal file → Executable file
12
src/page/theme-switcher/theme-switcher.scss
Normal file → Executable file
|
|
@ -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 {
|
||||
|
|
|
|||
0
src/page/theme-switcher/theme-switcher.ts
Normal file → Executable file
0
src/page/timeline/timeline-element/timeline-element.html.ts
Normal file → Executable file
0
src/page/timeline/timeline-element/timeline-element.scss
Normal file → Executable file
0
src/page/timeline/timeline-element/timeline-element.ts
Normal file → Executable file
0
src/page/timeline/timeline.html.ts
Normal file → Executable file
0
src/page/timeline/timeline.scss
Normal file → Executable file
0
src/page/timeline/timeline.ts
Normal file → Executable file
0
src/portfolio.ts
Normal file → Executable file
0
src/static/cv/andras_schmelczer_cv_2020_01.pdf
Normal file → Executable file
0
src/static/fonts/lato/lato-v16-latin-italic.eot
Normal file → Executable file
0
src/static/fonts/lato/lato-v16-latin-italic.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
0
src/static/fonts/lato/lato-v16-latin-italic.ttf
Normal file → Executable file
0
src/static/fonts/lato/lato-v16-latin-italic.woff
Normal file → Executable file
0
src/static/fonts/lato/lato-v16-latin-italic.woff2
Normal file → Executable file
0
src/static/fonts/lato/lato-v16-latin-regular.eot
Normal file → Executable file
0
src/static/fonts/lato/lato-v16-latin-regular.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
0
src/static/fonts/lato/lato-v16-latin-regular.ttf
Normal file → Executable file
0
src/static/fonts/lato/lato-v16-latin-regular.woff
Normal file → Executable file
0
src/static/fonts/lato/lato-v16-latin-regular.woff2
Normal file → Executable file
0
src/static/fonts/montserrat/montserrat-v14-latin-regular.eot
Normal file → Executable file
0
src/static/fonts/montserrat/montserrat-v14-latin-regular.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
0
src/static/fonts/montserrat/montserrat-v14-latin-regular.ttf
Normal file → Executable file
0
src/static/fonts/montserrat/montserrat-v14-latin-regular.woff
Normal file → Executable file
0
src/static/fonts/montserrat/montserrat-v14-latin-regular.woff2
Normal file → Executable file
0
src/static/icons/cancel.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 730 B |
0
src/static/media/avoid.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
0
src/static/media/color.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 570 KiB After Width: | Height: | Size: 570 KiB |
0
src/static/media/forex.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 475 KiB After Width: | Height: | Size: 475 KiB |
0
src/static/media/forex.mp4
Normal file → Executable file
0
src/static/media/forex.webm
Normal file → Executable file
0
src/static/media/led.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
0
src/static/media/led.mp4
Normal file → Executable file
0
src/static/media/led.webm
Normal file → Executable file
0
src/static/media/me-2.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 555 KiB After Width: | Height: | Size: 555 KiB |
0
src/static/media/me.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
0
src/static/media/my-notes.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2 MiB After Width: | Height: | Size: 2 MiB |
0
src/static/media/og-image.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 227 KiB After Width: | Height: | Size: 227 KiB |
0
src/static/media/og.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
0
src/static/media/photos.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 366 KiB After Width: | Height: | Size: 366 KiB |
0
src/static/media/platform.png
Normal file → Executable file
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
0
src/static/media/process-simulator-input.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 105 KiB |
0
src/static/media/process-simulator.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
0
src/static/media/simulation.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 457 KiB After Width: | Height: | Size: 457 KiB |
0
src/static/no-change/favicon.ico
Normal file → Executable file
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
0
src/static/no-change/og-image.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 295 KiB |