This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const generateStripeTexture = ( | |
text, | |
colors = { main: "#ffa1a1", second: "blue" } | |
) => { | |
const copyAmount = 2; | |
const canvasSize = 640; | |
const fontSize = canvasSize / copyAmount; | |
const fontStyle = `Bold ${fontSize}px Arial`; | |
const bitmap = document.createElement("canvas"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const generateTexture = (text) => { | |
// Set variables | |
const bitmapShift = 80; | |
const copyAmount = 4; | |
const canvasSize = 300; | |
const fontSize = canvasSize / copyAmount; | |
const fontStyle = `Bold ${fontSize}px Arial`; | |
// Create canvas | |
const bitmap = document.createElement("canvas"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {figmaNotify} from './'; | |
export default function populateOnlySelected(selectedLayers, obj, btnName) { | |
selectedLayers.map((item, i) => { | |
if (typeof obj[i] !== 'undefined') { | |
try { | |
figma.loadFontAsync(item.fontName).then(() => { | |
item.characters = obj[i][btnName].toString(); | |
}); | |
} catch (error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function populateByTemplateString(selectedLayers, JSONobj, btnName) { | |
let newItem = 0; | |
const loopSelected = arr => { | |
arr.map(item => { | |
if (item.type === 'TEXT' && item.characters.includes(`{${btnName}}`)) { | |
figma.loadFontAsync(item.fontName).then(() => { | |
item.characters = item.characters.replace(`{${btnName}}`, JSONobj[newItem][btnName].toString()); | |
newItem = ++newItem; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function populateByName(selectedLayers, JSONobj, btnName) { | |
let newItem = 0; | |
const loopSelected = arr => { | |
arr.map(item => { | |
if (item.name.toUpperCase() === btnName.toUpperCase() && item.type === 'TEXT') { | |
figma.loadFontAsync(item.fontName).then(() => { | |
item.characters = JSONobj[newItem][btnName].toString(); | |
newItem = ++newItem; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.grid { | |
box-sizing: border-box; | |
display: flex; | |
margin-left: auto; | |
margin-right: auto; | |
flex-wrap: wrap; | |
max-width: 1400px; | |
width: 88.5714285714%; | |
} | |
@media screen and (max-width: 1020px) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FLEXBOX CSS GRID | |
// by Laptev Pavel | |
// VARiABLES | |
// desktop grid | |
$grid-desktop-columns: 12; | |
$grid-desktop-sideMargin: 80px; | |
$grid-desktop-gutter: 40px; | |
$grid-desktop-breakpoint: 1400px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react" | |
import { PropertyControls, ControlType } from "framer" | |
const style: React.CSSProperties = { | |
height: "100%", | |
display: "flex", | |
alignItems: "center", | |
justifyContent: "center", | |
textAlign: "center", | |
color: "#FFF", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { RGBToHEX } from "./RGB-to-HEX"; | |
import { toCamelCase } from "./to-camel-case"; | |
import { downloadJSON } from "./download-JSON"; | |
/////////////// Get Functions /////////////// | |
///////////////////////////////////////////// | |
////////////////// Spacers ////////////////// | |
const getSpacers = (stylesArtboard) => { | |
let spacers = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Watch online | |
let dataWatchCard = Data({ | |
currentCardId: null, | |
prevCardId: null, | |
currentCardTitleId: null, | |
prevCardTitleId: null, | |
currentTitleId: null, | |
prevTitleId: null, | |
currentPlayBtnId: null, | |
prevPlayBtnId: null |
NewerOlder