This file contains hidden or 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
| function getPalette(stylesArtboard) { | |
| // empty "palette obj" wheree we will store all colors | |
| const palette = {}; | |
| // get "palette" artboard | |
| const paletteAtrboard = stylesArtboard.filter(item => { | |
| return item.name === "palette"; | |
| })[0].children; | |
| // get colors from each children | |
| paletteAtrboard.map(item => { |
This file contains hidden or 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
| function getGrids(stylesArtboard) { | |
| // empty "grids obj" wheree we will store all colors | |
| const grids = {}; | |
| // get "grids" artboard | |
| const gridsAtrboard = stylesArtboard.filter(item => { | |
| return item.name === "grids"; | |
| })[0].children; | |
| gridsAtrboard.map(item => { | |
| gridObj = { |
This file contains hidden or 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
| function getSpacers(stylesArtboard) { | |
| // empty "spacers obj" wheree we will store all colors | |
| const spacers = {}; | |
| // get "spacers" artboard | |
| const spacersAtrboard = stylesArtboard.filter(item => { | |
| return item.name === "spacers"; | |
| })[0].children; | |
| spacersAtrboard.map(item => { | |
| const spacerObj = { |
This file contains hidden or 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
| function getFontStyles(stylesArtboard) { | |
| // empty "spacers obj" wheree we will store all colors | |
| const fontStyles = {}; | |
| // get "spacers" artboard | |
| const fontStylesAtrboard = stylesArtboard.filter(item => { | |
| return item.name === "typography"; | |
| })[0].children; | |
| fontStylesAtrboard.map((fontItem, i) => { | |
| if (fontItem.children) { |
This file contains hidden or 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
| baseTokeensJSON = { | |
| token: { | |
| grids: {}, | |
| spacers: {}, | |
| colors: {}, | |
| fonts: {} | |
| } | |
| }; | |
| Object.assign(baseTokeensJSON.token.grids, getGrids(stylesArtboard)); |
This file contains hidden or 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
| document.addEventListener("DOMContentLoaded", function(e) { | |
| slider.noUiSlider.on("update", function(values, handle) { | |
| const allBuilding = [...document.querySelectorAll(".city-dot")]; | |
| allBuilding.map(i => { | |
| i.style.display = "block"; | |
| }); | |
| [...range(1930, values[0]), ...range(values[1], 2019)].map(i => { | |
| allBuilding.map(l => { |
This file contains hidden or 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
| var _ = require("lodash"); | |
| var fs = require("fs"); | |
| // Start indication log | |
| console.log("Hello! Lets rebuild this JSON!"); | |
| // Read and do suff foo | |
| fs.readFile("./original-json.json", "utf8", function(err, data) { | |
| if (err) { | |
| console.log("Error: " + err); |
This file contains hidden or 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 noUiSlider from "noUiSlider"; | |
| import menuActions from "./utils/menuActions"; | |
| import { fillDots, DotsColorByClass } from "./utils/fillDots"; | |
| import { range } from "./utils/generateArray"; | |
| // noUI Slider | |
| const slider = document.querySelector(".slider"); | |
| noUiSlider.create(slider, { | |
| start: [1920, 2019], |
This file contains hidden or 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"; | |
| // Props types | |
| type Props = { | |
| amount: number; | |
| width: number; | |
| height: number; | |
| activeItem: number; | |
| }; |
This file contains hidden or 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
| const data = Data({ | |
| currentDot: 1 | |
| }); | |
| export const MovieOfTheDayPageComp: Override = props => { | |
| return { | |
| onChangePage(pageIndex) { | |
| data.currentDot = pageIndex + 1; | |
| } | |
| }; |