mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
parent
2c70255617
commit
ead0615ca3
19
docs/_static/js/constants.js
vendored
19
docs/_static/js/constants.js
vendored
@ -1,11 +1,18 @@
|
|||||||
|
// Site URL
|
||||||
|
const SITE_URL = "https://docs.soliditylang.org"
|
||||||
|
const { origin, pathname } = location;
|
||||||
|
const pathSplit = pathname.split("/");
|
||||||
|
const rootPath = origin.includes(SITE_URL) && pathSplit.length > 3 ? pathSplit.splice(1, 2).join("/") : ''
|
||||||
|
const ROOT_URL = `${origin}/${rootPath}`;
|
||||||
|
|
||||||
// Color mode constants
|
// Color mode constants
|
||||||
const [DARK, LIGHT] = ["dark", "light"];
|
const [DARK, LIGHT] = ["dark", "light"];
|
||||||
const LIGHT_LOGO_PATH = "_static/img/logo.svg";
|
const LIGHT_LOGO_PATH = `${ROOT_URL}/_static/img/logo.svg`;
|
||||||
const DARK_LOGO_PATH = "_static/img/logo-dark.svg";
|
const DARK_LOGO_PATH = `${ROOT_URL}/_static/img/logo-dark.svg`;
|
||||||
const SUN_ICON_PATH = "_static/img/sun.svg";
|
const SUN_ICON_PATH = `${ROOT_URL}/_static/img/sun.svg`;
|
||||||
const MOON_ICON_PATH = "_static/img/moon.svg";
|
const MOON_ICON_PATH = `${ROOT_URL}/_static/img/moon.svg`;
|
||||||
const LIGHT_HAMBURGER_PATH = "_static/img/hamburger-light.svg";
|
const LIGHT_HAMBURGER_PATH = `${ROOT_URL}/_static/img/hamburger-light.svg`;
|
||||||
const DARK_HAMBURGER_PATH = "_static/img/hamburger-dark.svg";
|
const DARK_HAMBURGER_PATH = `${ROOT_URL}/_static/img/hamburger-dark.svg`;
|
||||||
const COLOR_TOGGLE_ICON_CLASS = "color-toggle-icon";
|
const COLOR_TOGGLE_ICON_CLASS = "color-toggle-icon";
|
||||||
const SOLIDITY_LOGO_CLASS = "solidity-logo";
|
const SOLIDITY_LOGO_CLASS = "solidity-logo";
|
||||||
const LS_COLOR_SCHEME = "color-scheme";
|
const LS_COLOR_SCHEME = "color-scheme";
|
||||||
|
Loading…
Reference in New Issue
Block a user