Reformat files

This commit is contained in:
Andras Schmelczer 2022-09-21 14:05:28 +02:00
parent 40b4ed0fdb
commit a8a3a5093a
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E
37 changed files with 84 additions and 103 deletions

View file

@ -1,5 +1,5 @@
import './background.scss';
import { html } from '../../types/html';
import './background.scss';
export const generate = (): html => `
<div id="background"></div>

View file

@ -1,12 +1,10 @@
import { PageElement } from '../page-element';
import { generate } from './background.html';
import { createElement } from '../../helper/create-element';
import { sum } from '../../helper/sum';
import { getHeight } from '../../helper/get-height';
import { mix } from '../../helper/mix';
import { Random } from '../../helper/random';
import { sum } from '../../helper/sum';
import { PageElement } from '../page-element';
import { generate } from './background.html';
export class PageBackground extends PageElement {
private static readonly perspective = 5;

View file

@ -1,6 +1,6 @@
import './image-anchor.scss';
import { html } from '../../../types/html';
import { url } from '../../../types/url';
import './image-anchor.scss';
export const generate = ({
href,

View file

@ -1,6 +1,6 @@
import { PageElement } from '../../page-element';
import { createElement } from '../../../helper/create-element';
import { url } from '../../../types/url';
import { PageElement } from '../../page-element';
import { generate } from './image-anchor.html';
export const ImageAnchorFactory = (

View file

@ -1,7 +1,7 @@
import './image.scss';
import { last } from '../../../helper/last';
import { ResponsiveImage } from '../../../types/responsive-image';
import { html } from '../../../types/html';
import { ResponsiveImage } from '../../../types/responsive-image';
import './image.scss';
export const generate = ({
sizes,

View file

@ -1,8 +1,8 @@
import { PageElement } from '../../page-element';
import { createElement } from '../../../helper/create-element';
import { generate } from './image.html';
import { last } from '../../../helper/last';
import { ResponsiveImage } from '../../../types/responsive-image';
import { PageElement } from '../../page-element';
import { generate } from './image.html';
export class Image extends PageElement {
private static readonly imageScreenRatio = 0.8;

View file

@ -1,7 +1,7 @@
import './preview.scss';
import play from '../../../../static/icons/play-button.svg';
import loading from '../../../../static/icons/loading.svg';
import play from '../../../../static/icons/play-button.svg';
import { html } from '../../../types/html';
import './preview.scss';
export const generate = ({ alt }: { alt: string }): html => `
<div class="preview">

View file

@ -1,8 +1,8 @@
import { PageElement } from '../../page-element';
import { createElement } from '../../../helper/create-element';
import { generate } from './preview.html';
import { Image } from '../image/image';
import { ResponsiveImage } from '../../../types/responsive-image';
import { PageElement } from '../../page-element';
import { Image } from '../image/image';
import { generate } from './preview.html';
export class Preview extends PageElement {
public constructor(

View file

@ -1,10 +1,8 @@
import './video.scss';
import loading from '../../../../static/icons/loading.svg';
import { html } from '../../../types/html';
import play from '../../../../static/icons/play-button.svg';
import { html } from '../../../types/html';
import { VideoParameters } from './video';
import './video.scss';
export const generate = ({
webm,

View file

@ -1,9 +1,9 @@
import { PageElement } from '../../page-element';
import { createElement } from '../../../helper/create-element';
import { generate } from './video.html';
import { Image } from '../image/image';
import { url } from '../../../types/url';
import { ResponsiveImage } from '../../../types/responsive-image';
import { url } from '../../../types/url';
import { PageElement } from '../../page-element';
import { Image } from '../image/image';
import { generate } from './video.html';
export interface VideoParameters {
mp4: url;

View file

@ -1,5 +1,5 @@
import './content.scss';
import { html } from '../../types/html';
import './content.scss';
export const generate = (): html => `
<div class="content"></div>

View file

@ -1,9 +1,9 @@
import './footer.scss';
import cvIcon from '../../../static/icons/cv.svg';
import emailIcon from '../../../static/icons/email.svg';
import linkedinIcon from '../../../static/icons/linkedin.svg';
import { html } from '../../types/html';
import { FooterParameters } from './footer';
import './footer.scss';
export const generate = ({
title,

View file

@ -1,7 +1,7 @@
import { PageElement } from '../page-element';
import { generate } from './footer.html';
import { createElement } from '../../helper/create-element';
import { url } from '../../types/url';
import { PageElement } from '../page-element';
import { generate } from './footer.html';
export interface FooterParameters {
title: string;

View file

@ -1,6 +1,5 @@
import './header.scss';
import { html } from '../../types/html';
import './header.scss';
export const generate = (name: string): html => `
<section id="about">

View file

@ -1,10 +1,9 @@
import { PageContent } from '../content/content';
import { generate } from './header.html';
import { createElement } from '../../helper/create-element';
import { PageThemeSwitcher } from '../theme-switcher/theme-switcher';
import { PageElement } from '../page-element';
import { Image } from '../basics/image/image';
import { PageContent } from '../content/content';
import { PageElement } from '../page-element';
import { PageThemeSwitcher } from '../theme-switcher/theme-switcher';
import { generate } from './header.html';
export class PageHeader extends PageElement {
public constructor(header: { name: string; photo: Image; about: Array<string> }) {

View file

@ -1,7 +1,6 @@
import cancel from '../../../static/icons/cancel.svg';
import './image-viewer.scss';
import { html } from '../../types/html';
import './image-viewer.scss';
export const generate = (): html => `
<section id="image-viewer">

View file

@ -1,5 +1,5 @@
import './main.scss';
import { html } from '../../types/html';
import './main.scss';
export const generate = (): html => `
<main></main>

View file

@ -1,6 +1,6 @@
import { createElement } from '../../helper/create-element';
import { PageElement } from '../page-element';
import { generate } from './main.html';
import { createElement } from '../../helper/create-element';
export class Main extends PageElement {
constructor(...children: Array<PageElement>) {

View file

@ -5,7 +5,7 @@ export abstract class PageElement {
) {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
protected setParent(parent?: PageElement): void {
protected setParent(parent?: PageElement | null): void {
this.children.forEach((c) => c.setParent(this));
}

View file

@ -1,5 +1,5 @@
import './theme-switcher.scss';
import { html } from '../../types/html';
import './theme-switcher.scss';
export const generate = (): html => `
<input id="theme-switcher" aria-label="color-theme-switch" type="checkbox" name="switch-theme"/>

View file

@ -1,12 +1,12 @@
import { PageElement } from '../page-element';
import { createElement } from '../../helper/create-element';
import { generate } from './theme-switcher.html';
import { turnOffAnimations, turnOnAnimations } from '../../style/animations/animations';
import {
isSystemLevelDarkModeEnabled,
turnOnDarkMode,
turnOnLightMode,
} from '../../style/dark-mode/dark-mode';
import { turnOffAnimations, turnOnAnimations } from '../../style/animations/animations';
import { PageElement } from '../page-element';
import { generate } from './theme-switcher.html';
export class PageThemeSwitcher extends PageElement {
private static readonly localStorageKey = 'dark-mode';

View file

@ -1,8 +1,8 @@
import info from '../../../../static/icons/info.svg';
import './timeline-element.scss';
import { titleToFragment } from '../../../helper/title-to-fragment';
import { html } from '../../../types/html';
import { TimelineElementParameters } from './timeline-element';
import { titleToFragment } from '../../../helper/title-to-fragment';
import './timeline-element.scss';
export const generate = (
{ date, title, description, more }: TimelineElementParameters,

View file

@ -1,10 +1,10 @@
import { createElement } from '../../../helper/create-element';
import { Image } from '../../basics/image/image';
import { Preview } from '../../basics/preview/preview';
import { Video } from '../../basics/video/video';
import { PageContent } from '../../content/content';
import { PageElement } from '../../page-element';
import { generate } from './timeline-element.html';
import { createElement } from '../../../helper/create-element';
import { Video } from '../../basics/video/video';
import { Image } from '../../basics/image/image';
import { Preview } from '../../basics/preview/preview';
export interface TimelineElementParameters {
date: string;

View file

@ -1,5 +1,5 @@
import './timeline.scss';
import { html } from '../../types/html';
import './timeline.scss';
export const generate = (): html => `
<div id="timeline"></div>

View file

@ -1,10 +1,10 @@
import { createElement } from '../../helper/create-element';
import { PageElement } from '../page-element';
import {
PageTimelineElement,
TimelineElementParameters,
} from './timeline-element/timeline-element';
import { generate } from './timeline.html';
import { createElement } from '../../helper/create-element';
import { PageElement } from '../page-element';
export class PageTimeline extends PageElement {
public constructor({