diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-04-22 16:15:46 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-04-22 16:15:46 +0200 |
| commit | 73fcbbd378220b28b80a12e6af68cd8d15eaafa0 (patch) | |
| tree | c89477b34d7d397d0609c8eb3198fa723f5630a5 /frontend/app/views/tile/handles/tile.text.js | |
| parent | facc64b23f0c28fb45d9d1cdb9096a88ee581a31 (diff) | |
some home styling
Diffstat (limited to 'frontend/app/views/tile/handles/tile.text.js')
| -rw-r--r-- | frontend/app/views/tile/handles/tile.text.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/frontend/app/views/tile/handles/tile.text.js b/frontend/app/views/tile/handles/tile.text.js index 46d285d..c747957 100644 --- a/frontend/app/views/tile/handles/tile.text.js +++ b/frontend/app/views/tile/handles/tile.text.js @@ -2,6 +2,8 @@ import React from 'react' import { generateTransform, unitsDimension, hexToRgb, pickCursor } from 'app/views/tile/tile.utils' import Marquee from "react-fast-marquee" +import { isMobile } from 'app/utils' + const VERTICAL_MARQUEE_DIRECTION = { up: "left", down: "right", @@ -28,13 +30,17 @@ export default function TileText({ tile, box, bounds, videoBounds, cursors, view style.cursor = cursorStyle } - + let { font_size } = tile.settings + if (isMobile) { + font_size *= 0.75 + } + let content = <span dangerouslySetInnerHTML={{ __html: tile.settings.content }} /> className += ' ' + tile.settings.align style.width = unitsDimension(tile, 'width', bounds, videoBounds) style.height = unitsDimension(tile, 'height', bounds, videoBounds) style.fontFamily = tile.settings.font_family - style.fontSize = tile.settings.font_size + 'px' + style.fontSize = font_size + 'px' style.lineHeight = 1.5 style.fontWeight = (tile.settings.font_style || "").indexOf('bold') !== -1 ? 'bold' : 'normal' style.fontStyle = (tile.settings.font_style || "").indexOf('italic') !== -1 ? 'italic' : 'normal' |
