Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak(datatrakWeb): RN-1429: Hide Waka on mobile Datatrak Web #5914

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 48 additions & 25 deletions packages/datatrak-web/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no maximum-scale=1" />
<meta name="description" content="Data collection and visualisation for the most remote settings in the world" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no maximum-scale=1"
/>
<meta
name="description"
content="Data collection and visualisation for the most remote settings in the world"
/>
<meta name="theme-color" content="#000000" />
<title>Tupaia DataTrak</title>
<!-- Open Graph for shared links -->
@@ -21,26 +27,44 @@
/>

<!-- Smart App Banner on iOS -->
<meta name="apple-itunes-app" content="app-id=1245053537">
<meta name="apple-itunes-app" content="app-id=1245053537" />

<% if (process.env.REACT_APP_DEPLOYMENT_NAME === 'master' ||
process.env.REACT_APP_DEPLOYMENT_NAME === 'main' || process.env.REACT_APP_DEPLOYMENT_NAME ===
'production') { %>
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-P5KF6SLGKR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-P5KF6SLGKR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', 'G-P5KF6SLGKR');
</script>
<!-- End Google Analytics -->

gtag('config', 'G-P5KF6SLGKR');
</script>
<!-- End Google Analytics -->
<!-- Start of bes-support Zendesk Widget script -->
<script type="text/javascript">
const ua = navigator.userAgent.toLowerCase();
const platform = navigator.platform.toLowerCase();
const platformName = ua.match(/ip(?:ad|od|hone)/)
? 'ios'
: (ua.match(/(?:webos|android)/) || platform.match(/mac|win|linux/) || ['other'])[0];
const isMobile = /ios|android|webos/.test(platformName);

<!-- Start of bes-support Zendesk Widget script -->
<script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=4719227f-a493-431d-a920-41ebcafbcccb"> </script>
<!-- End of bes-support Zendesk Widget script -->
if (!isMobile) {
const script = document.createElement('script');
script.id = 'ze-snippet';
script.src =
'https://static.zdassets.com/ekr/snippet.js?key=4719227f-a493-431d-a920-41ebcafbcccb';
document.head.appendChild(script);
}
</script>
<!-- End of bes-support Zendesk Widget script -->
<% } %>

<link rel="icon" type="image/png" href="/favicon.ico" />
<!-- Add media='print' and onload="this.media='all'" to stop the resource being render-blocking on load: see https://pagespeedchecklist.com/asynchronous-google-fonts -->
<link
@@ -54,23 +78,23 @@
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""
media="print"
crossorigin=""
media="print"
onload="this.media='all'"
/>
<!-- Add a noscript fallback for stylesheets -->
<noscript>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700&display=swap"
crossorigin="anonymous"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""
/>
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""
/>
</noscript>
</head>
<body>
@@ -79,6 +103,5 @@
</noscript>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>

</body>
</html>