setting favicon based on whiteLabel
This commit is contained in:
parent
22a892fa7b
commit
aa4106806e
10 changed files with 12 additions and 74 deletions
|
|
@ -2,9 +2,9 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/x-icon" id="favicon-link" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Vite + React + TS</title>
|
<title>Adaptive Dashboard</title>
|
||||||
<link rel="manifest" href="/AdaptiveAgriculture/manifest.json" id="manifest-link" />
|
<link rel="manifest" href="/AdaptiveAgriculture/manifest.json" id="manifest-link" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB |
|
|
@ -1,44 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="icon" href="/favicon.ico" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<meta name="theme-color" content="#000000" />
|
|
||||||
<meta
|
|
||||||
name="description"
|
|
||||||
content="Web site created using create-react-app"
|
|
||||||
/>
|
|
||||||
<link rel="apple-touch-icon" href="/logo192.png" />
|
|
||||||
<!--
|
|
||||||
manifest.json provides metadata used when your web app is installed on a
|
|
||||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
||||||
-->
|
|
||||||
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
|
|
||||||
<link rel="manifest" href="/AdaptiveAgriculture/manifest.json" id="manifest-link" />
|
|
||||||
<!--
|
|
||||||
Notice the use of %PUBLIC_URL% in the tags above.
|
|
||||||
It will be replaced with the URL of the `public` folder during the build.
|
|
||||||
Only files inside the `public` folder can be referenced from the HTML.
|
|
||||||
|
|
||||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
||||||
work correctly both with client-side routing and a non-root public URL.
|
|
||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
|
||||||
-->
|
|
||||||
<title>React App</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
||||||
<div id="root"></div>
|
|
||||||
<!--
|
|
||||||
This HTML file is a template.
|
|
||||||
If you open it directly in the browser, you will see an empty page.
|
|
||||||
|
|
||||||
You can add webfonts, meta tags, or analytics to this file.
|
|
||||||
The build step will place the bundled scripts into the <body> tag.
|
|
||||||
|
|
||||||
To begin the development, run `npm start` or `yarn start`.
|
|
||||||
To create a production bundle, use `npm run build` or `yarn build`.
|
|
||||||
-->
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB |
|
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
"short_name": "React App",
|
|
||||||
"name": "Create React App Sample",
|
|
||||||
"icons": [
|
|
||||||
{
|
|
||||||
"src": "favicon.ico",
|
|
||||||
"sizes": "64x64 32x32 24x24 16x16",
|
|
||||||
"type": "image/x-icon"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "logo192.png",
|
|
||||||
"type": "image/png",
|
|
||||||
"sizes": "192x192"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "logo512.png",
|
|
||||||
"type": "image/png",
|
|
||||||
"sizes": "512x512"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"start_url": ".",
|
|
||||||
"display": "standalone",
|
|
||||||
"theme_color": "#000000",
|
|
||||||
"background_color": "#ffffff"
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
|
@ -24,6 +24,12 @@ function App() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Set favicon
|
||||||
|
const faviconDocument = document.getElementById("favicon-link") as HTMLLinkElement;
|
||||||
|
if (faviconDocument) {
|
||||||
|
faviconDocument.href = `${whiteLabel.name.replace(/\s/g, "")}/favicon.ico`;
|
||||||
|
}
|
||||||
|
|
||||||
let url: string | undefined = import.meta.env.VITE_AUTH0_CLIENT_DOMAIN;
|
let url: string | undefined = import.meta.env.VITE_AUTH0_CLIENT_DOMAIN;
|
||||||
let audience: string | undefined = import.meta.env.VITE_AUTH0_AUDIENCE;
|
let audience: string | undefined = import.meta.env.VITE_AUTH0_AUDIENCE;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ const useStyles = makeStyles((theme: Theme) => ({
|
||||||
appBar: {
|
appBar: {
|
||||||
zIndex: theme.zIndex.drawer + 1,
|
zIndex: theme.zIndex.drawer + 1,
|
||||||
backgroundImage: "none", // This prevents de-saturation of header in dark mode
|
backgroundImage: "none", // This prevents de-saturation of header in dark mode
|
||||||
|
// backgroundColor: "#272727"
|
||||||
},
|
},
|
||||||
toolbar: {
|
toolbar: {
|
||||||
marginLeft: theme.spacing(0.5),
|
marginLeft: theme.spacing(0.5),
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,8 @@ const BXT_WHITE_LABEL: WhiteLabel = {
|
||||||
name: "Brand X Technologies",
|
name: "Brand X Technologies",
|
||||||
primaryColour: "blue",
|
primaryColour: "blue",
|
||||||
secondaryColour: "yellow",
|
secondaryColour: "yellow",
|
||||||
signatureColour: "#005bb0",
|
signatureColour: "#272727",
|
||||||
|
// signatureColour: "#005bb0",
|
||||||
signatureAccentColour: "#fff",
|
signatureAccentColour: "#fff",
|
||||||
auth0ClientId: import.meta.env.REACT_APP_AUTH0_STAGING_CLIENT_ID,
|
auth0ClientId: import.meta.env.REACT_APP_AUTH0_STAGING_CLIENT_ID,
|
||||||
redirectOnLogout: false,
|
redirectOnLogout: false,
|
||||||
|
|
@ -250,7 +251,7 @@ const whitelabels = new Map<string, WhiteLabel>([
|
||||||
["brandxducks", BXT_WHITE_LABEL],
|
["brandxducks", BXT_WHITE_LABEL],
|
||||||
["brandxtech", BXT_WHITE_LABEL],
|
["brandxtech", BXT_WHITE_LABEL],
|
||||||
["aerogrowmanufacturing", AEROGROW_WHITE_LABEL],
|
["aerogrowmanufacturing", AEROGROW_WHITE_LABEL],
|
||||||
["localhost", ADAPTIVE_AGRICULTURE_WHITE_LABEL],
|
["localhost", BXT_WHITE_LABEL],
|
||||||
["staging", STAGING_WHITELABEL],
|
["staging", STAGING_WHITELABEL],
|
||||||
["10.0", ADAPTIVE_CONSTRUCTION_WHITE_LABEL],
|
["10.0", ADAPTIVE_CONSTRUCTION_WHITE_LABEL],
|
||||||
["mivent", MIVENT_WHITE_LABEL],
|
["mivent", MIVENT_WHITE_LABEL],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue