PC styles done

This commit is contained in:
Schmelczer András 2019-12-28 20:51:43 +01:00
parent 98160edc72
commit 632a7703ff
49 changed files with 1545 additions and 1267 deletions

View file

@ -1,34 +1,6 @@
import { html } from "../../model/misc";
import "./background.scss";
export const generate = (
count: number,
z?: () => number,
color?: (z) => string,
height?: () => number,
isAnimated?: (index) => boolean,
transform?: (z) => string
): html => {
return `
<section class="background">
${
count > 0
? new Array(count)
.fill(0, 0, count)
.map(_ => z())
.map(
(zValue, i) => `
<div class="${isAnimated(i) ? "animated" : ""}" style="
background-color: ${color(zValue)};
height: ${height()}px;
z-index: ${-zValue};
transform: ${transform(zValue)}"
></div>
`
)
.join("")
: ""
}
</section>
export const generate = (): html => `
<section id="background"></section>
`;
};