Run lint
This commit is contained in:
parent
1b63bbc0da
commit
9f906d1fdf
13 changed files with 17 additions and 17 deletions
|
|
@ -77,7 +77,7 @@ export class PageBackground extends PageElement {
|
|||
|
||||
private randomizeBlobs(topOffset: number, bottomOffset: number) {
|
||||
this.random.seed = 50;
|
||||
this.blobs.forEach(b => {
|
||||
this.blobs.forEach((b) => {
|
||||
const z = -Number.parseInt(b.style.zIndex);
|
||||
const [x, y] = this.randomXY(z, topOffset, bottomOffset);
|
||||
b.style.transform = `translate3D(${x}px, ${y}px, ${-z}px) rotate(-20deg)`;
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ export const generate = ({
|
|||
}): html => `
|
||||
${
|
||||
container
|
||||
? `<div class="figure-container" style="padding-top:${(imageJpeg.height /
|
||||
imageJpeg.width) *
|
||||
100}%">`
|
||||
? `<div class="figure-container" style="padding-top:${
|
||||
(imageJpeg.height / imageJpeg.width) * 100
|
||||
}%">`
|
||||
: ''
|
||||
}
|
||||
<picture loading="lazy">
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export class Image extends PageElement {
|
|||
return (
|
||||
image.images
|
||||
.slice(0, -1)
|
||||
.map(d => `(max-width: ${d.width / Image.imageScreenRatio}px) ${d.width}px,`)
|
||||
.map((d) => `(max-width: ${d.width / Image.imageScreenRatio}px) ${d.width}px,`)
|
||||
.join('\n') + `\n${last(image.images)!.width}px`
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export class Preview extends PageElement {
|
|||
}
|
||||
|
||||
public setParent(parent: PageElement) {
|
||||
new IntersectionObserver(e => {
|
||||
new IntersectionObserver((e) => {
|
||||
if (!e[0].isIntersecting) {
|
||||
this.unloadContent();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ export const generate = ({
|
|||
posterJpeg,
|
||||
invertButton,
|
||||
}: VideoParameters): html => `
|
||||
<div class="figure-container video-container" style="padding-top:${(posterJpeg.height /
|
||||
posterJpeg.width) *
|
||||
100}%">
|
||||
<div class="figure-container video-container" style="padding-top:${
|
||||
(posterJpeg.height / posterJpeg.width) * 100
|
||||
}%">
|
||||
<img image-viewer-ignore class="poster"/>
|
||||
<div class="loading">${loading}</div>
|
||||
<video playsinline preload="none">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { PageElement } from '../page-element';
|
|||
export class Body extends PageElement {
|
||||
constructor(...children: Array<PageElement>) {
|
||||
super(document.body, children);
|
||||
children.forEach(c => this.attachElement(c));
|
||||
children.forEach((c) => this.attachElement(c));
|
||||
this.setParent();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { PageElement } from '../page-element';
|
|||
export class PageContent extends PageElement {
|
||||
public constructor(content: Array<string>) {
|
||||
super(createElement(generate()));
|
||||
content.map(t => {
|
||||
content.map((t) => {
|
||||
const p = createElement(`<p>${t}</p>`);
|
||||
this.htmlRoot.appendChild(p);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ import { createElement } from '../../helper/create-element';
|
|||
export class Main extends PageElement {
|
||||
constructor(...children: Array<PageElement>) {
|
||||
super(createElement(generate()), children);
|
||||
children.forEach(c => this.attachElement(c));
|
||||
children.forEach((c) => this.attachElement(c));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export abstract class PageElement {
|
|||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
protected setParent(parent?: PageElement): void {
|
||||
this.children.forEach(c => c.setParent(this));
|
||||
this.children.forEach((c) => c.setParent(this));
|
||||
}
|
||||
|
||||
protected query(query: string): HTMLElement {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export class PageTimelineElement extends PageElement {
|
|||
this.query('.info-button').addEventListener('click', this.toggleOpen.bind(this));
|
||||
this.attachElementByReplacing('.figure', timelineElement.figure);
|
||||
this.query('.description').innerText = timelineElement.description;
|
||||
timelineElement.links.forEach(l => this.attachElementAsChildOf('.buttons', l));
|
||||
timelineElement.links.forEach((l) => this.attachElementAsChildOf('.buttons', l));
|
||||
|
||||
this.isOpen = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export class PageTimeline extends PageElement {
|
|||
elements: Array<TimelineElementParameters>;
|
||||
}) {
|
||||
super(createElement(generate()));
|
||||
elements.forEach(e =>
|
||||
elements.forEach((e) =>
|
||||
this.attachElement(new PageTimelineElement(e, showMoreText, showLessText))
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue