PC styles done
This commit is contained in:
parent
98160edc72
commit
632a7703ff
49 changed files with 1545 additions and 1267 deletions
|
|
@ -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>
|
||||
`;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue