| 4 | import { _, append, appendIf } from "../utils/_"; |
| 5 | |
| 6 | export const getStyle = ( |
| 7 | section: "footer" | "header", |
| 8 | fontSize: number = 70, |
| 9 | descSize: number = 20, |
| 10 | rotate: number = 0, |
| 11 | fontFamily: string, |
| 12 | ) => { |
| 13 | const resolvedFontFamily = fontFamily; |
| 14 | return _( |
| 15 | html``, |
| 16 | append( |
| 17 | css(".text", { |
| 18 | fontSize: `${fontSize}px`, |
| 19 | fontWeight: 700, |
| 20 | fontFamily: resolvedFontFamily, |
| 21 | }), |
| 22 | ), |
| 23 | append( |
| 24 | css(".desc", { |
| 25 | fontSize: `${descSize}px`, |
| 26 | fontWeight: 500, |
| 27 | fontFamily: resolvedFontFamily, |
| 28 | }), |
| 29 | ), |
| 30 | appendIf( |
| 31 | rotate !== 0, |
| 32 | css(".text, .desc", { |
| 33 | transformOrigin: "center center", |
| 34 | transform: `rotate(${rotate}deg)`, |
| 35 | }), |
| 36 | ), |
| 37 | appendIf( |
| 38 | section === "footer", |
| 39 | css("path", { |
| 40 | transform: "rotate(180deg)", |
| 41 | transformOrigin: "50% 50%", |
| 42 | }), |
| 43 | ), |
| 44 | ); |
| 45 | }; |
| 46 | |
| 47 | export const getAnimation = (animation: string) => { |
| 48 | if (!animation) return html``; |