slate/common/constants.js

222 lines
5.6 KiB
JavaScript
Raw Normal View History

2020-08-22 05:18:36 +03:00
export const values = {
2020-09-06 01:05:04 +03:00
version: "1.0.0",
sds: "0.2.0",
2020-08-22 05:18:36 +03:00
};
export const sizes = {
mobile: 768,
navigation: 288,
sidebar: 416,
2021-07-07 23:50:57 +03:00
header: 56,
tablet: 960,
2020-09-27 23:11:04 +03:00
desktop: 1024,
2020-12-09 07:22:17 +03:00
topOffset: 0, //NOTE(martina): Pushes UI down. 16 when there is a persistent announcement banner, 0 otherwise
2020-08-22 05:18:36 +03:00
};
2020-08-22 05:31:43 +03:00
export const system = {
2021-07-07 21:43:19 +03:00
//system color
white: "#FFFFFF",
grayLight6: "#F2F5F7",
grayLight5: "#E5E8EA",
grayLight4: "#D1D4D6",
grayLight3: "#C7CACC",
grayLight2: "#AEB0B2",
gray: "#8E9093",
grayDark2: "#636566",
grayDark3: "#48494A",
grayDark4: "#3A3B3C",
grayDark5: "#2C2D2E",
grayDark6: "#1C1D1E",
black: "#00050A",
blue: "#0084FF",
2021-07-07 22:58:14 +03:00
green: "#34D159",
2021-07-07 21:43:19 +03:00
yellow: "#FFD600",
red: "#FF4530",
purple: "#585CE6",
teal: "#64C8FA",
pink: "#FF375F",
orange: "#FF9F00",
blueLight6: "#D5EBFF",
blueLight5: "#AAD7FF",
blueLight4: "#80C3FF",
blueLight3: "#55AEFF",
bluelight2: "#2B99FF",
blueDark2: "#006FD5",
blueDark3: "#0059AA",
blueDark4: "#004380",
blueDark5: "#002D55",
blueDark6: "#00172B",
greenLight6: "#D5FFDE",
greenLight5: "#AAFFBE",
greenLight4: "#86FCA2",
greenLight3: "#66F287",
greenLight2: "#4BE46F",
greenDark2: "#20B944",
greenDark3: "#119D32",
greenDark4: "#067C22",
greenDark5: "#005514",
greenDark6: "#002B09",
yellowLight6: "#FFFFD5",
yellowLight5: "#FFFBAA",
yellowLight4: "#FFF280",
yellowLight3: "#FFE655",
yellowLight2: "#FFD62B",
yellowDark2: "#D5AC00",
yellowDark3: "#AA9100",
yellowDark4: "#807300",
yellowDark5: "#555100",
yellowDark6: "#2B2A00",
redLight6: "#FFD5D5",
redLight5: "#FFAFAA",
redLight4: "#FF8D80",
redlight3: "#FF715E",
redLight2: "#FF5944",
redDark2: "#D52E1A",
redDark3: "#AA1C09",
redDark4: "#800E00",
redDark5: "#550500",
redDark6: "#2B0000",
};
export const semantic = {
//semantic color
textWhite: system.white,
textGrayLight: system.grayLight3,
textGray: system.gray,
textGrayDark: system.grayDark3,
textBlack: system.black,
bgLight: system.grayLight6,
bgGrayLight: system.grayLight5,
2021-07-08 01:31:09 +03:00
bgBlurWhite: "rgba(255, 255, 255, 0.7)",
bgBlurWhiteOP: "rgba(255, 255, 255, 0.85)",
bgBlurWhiteTRN: "rgba(255, 255, 255, 0.3)",
bgBlurLight6: "rgba(242, 245, 247, 0.7)",
bgBlurLight6OP: "rgba(242, 245, 247, 0.85)",
bgBlurLight6TRN: "rgba(242, 245, 247, 0.3)",
2021-07-07 21:43:19 +03:00
bgDark: system.grayDark6,
bgLightDark: system.grayDark5,
2021-07-08 01:31:09 +03:00
bgBlurBlack: "rgba(0, 5, 10, 0.5)",
bgBlurBlackOP: "rgba(0, 5, 10, 0.85)",
bgBlurBlackTRN: "rgba(0, 5, 10, 0.3)",
bgBlurDark6: "rgba(28, 29, 30, 0.5)",
bgBlurDark6OP: "rgba(28, 29, 30, 0.85)",
bgBlurDark6TRN: "rgba(28, 29, 30, 0.3)",
2021-07-07 21:43:19 +03:00
2021-07-07 22:58:14 +03:00
borderLight: system.grayLight6,
borderGrayLight: system.grayLight5,
borderDark: system.grayDark6,
borderGrayDark: system.grayDark5,
2021-07-07 21:43:19 +03:00
bgBlue: system.blueLight6,
bgGreen: system.greenLight6,
bgYellow: system.yellowLight6,
bgRed: system.redLight6,
2020-08-22 05:31:43 +03:00
};
2020-11-11 04:44:21 +03:00
export const shadow = {
2021-07-08 01:31:09 +03:00
lightSmall: "0px 4px 16px 0 rgba(174, 176, 178, 0.1)",
lightMedium: "0px 8px 32px 0 rgba(174, 176, 178, 0.2)",
lightLarge: "0px 12px 64px 0 rgba(174, 176, 178, 0.3)",
darkSmall: "0px 4px 16px 0 rgba(99, 101, 102, 0.1)",
darkMedium: "0px 8px 32px 0 rgba(99, 101, 102, 0.2)",
darkLarge: "0px 12px 64px 0 rgba(99, 101, 102, 0.3)",
2020-11-11 04:44:21 +03:00
};
2020-08-22 05:32:34 +03:00
export const zindex = {
navigation: 1,
2020-10-05 00:30:28 +03:00
body: 2,
sidebar: 5,
2020-09-29 08:47:27 +03:00
alert: 3,
header: 4,
modal: 6,
tooltip: 7,
2021-05-06 03:08:14 +03:00
cta: 8,
2020-08-22 05:32:34 +03:00
};
export const font = {
text: `'inter-regular', -apple-system, BlinkMacSystemFont, arial, sans-serif`,
semiBold: `'inter-semi-bold', -apple-system, BlinkMacSystemFont, arial, sans-serif`,
medium: `'inter-medium', -apple-system, BlinkMacSystemFont, arial, sans-serif`,
mono: `'mono', monaco, monospace`,
monoBold: `'mono-bold', monaco, monospace`,
monoCode: `'fira-code-regular', mono, monospace`,
monoCodeBold: `'fira-code-bold', mono-bold, monospace`,
code: `'jet-brains-regular', mono, monospace`,
codeBold: `'jet-brains-bold', mono, monospace`,
};
export const typescale = {
2020-11-01 21:40:03 +03:00
lvlN1: `0.75rem`,
lvl0: `0.875rem`,
2020-08-22 05:32:34 +03:00
lvl1: `1rem`,
lvl2: `1.25rem`,
lvl3: `1.563rem`,
lvl4: `1.953rem`,
lvl5: `2.441rem`,
lvl6: `3.052rem`,
lvl7: `3.815rem`,
lvl8: `4.768rem`,
lvl9: `5.96rem`,
lvl10: `7.451rem`,
lvl11: `9.313rem`,
2020-08-22 05:32:34 +03:00
};
2020-08-22 05:18:36 +03:00
export const theme = {
foreground: system.white,
2021-07-07 22:14:51 +03:00
ctaBackground: system.blue,
2021-07-07 22:58:14 +03:00
pageBackground: semantic.bgLight,
2020-08-22 05:18:36 +03:00
pageText: system.black,
};
export const gateways = {
ipfs: "https://slate.textile.io/ipfs",
2020-08-26 07:13:02 +03:00
};
export const hostname = "https://slate.host";
// more important filetypes to consider:
// midi
// txt, rtf, docx
// html, css, js, other code-related extensions
// json, csv, other script/data extensions
export const filetypes = {
images: ["image/jpeg", "image/png", "image/webp", "image/gif"],
audio: ["audio/mpeg", "audio/aac", "audio/flac", "audio/wav", "audio/webm"],
assets: ["font/ttf", "font/otf", "image/svg+xml"],
videos: ["video/mpeg", "video/webm", "video/quicktime"],
books: ["application/pdf", "application/epub+zip", "application/vnd.amazon.ebook"],
};
2021-05-06 03:08:14 +03:00
export const linkPreviewSizeLimit = 5000000; //NOTE(martina): 5mb limit for twitter preview images
// NOTE(amine): used to calculate how many cards will fit into a row in sceneActivity
export const grids = {
activity: {
profileInfo: {
width: 260,
},
},
object: {
desktop: { width: 248, rowGap: 16 },
mobile: { width: 166, rowGap: 8 },
},
collection: {
desktop: { width: 432, rowGap: 16 },
mobile: { width: 300, rowGap: 8 },
},
profile: {
desktop: { width: 432, rowGap: 16 },
mobile: { width: 344, rowGap: 8 },
},
};
export const profileDefaultPicture =
"https://slate.textile.io/ipfs/bafkreick3nscgixwfpq736forz7kzxvvhuej6kszevpsgmcubyhsx2pf7i";