bootstrap preloading

This commit is contained in:
Victor committed 2024-10-08 17:59:17 -07:00
1 parent cdbd41905a
commit 29bb26c5cf
2 files changed
+29 -58

No files matched your search

@@ -19,30 +19,27 @@
sizes="16x16"
href="%PUBLIC_URL%/favicon-16x16.png"
/>
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!-- Preload important images on index so they don't load late. -->
<link
rel="preload"
as="image"
href="%PUBLIC_URL%/fakeyou/FakeYou-Logo.png"
/>
<link
rel="preload"
as="image"
href="%PUBLIC_URL%/mascot/kitsune_pose2.webp"
/>
<!-- Preload images on other pages. -->
<link
rel="preload"
as="image"
href="%PUBLIC_URL%/mascot/kitsune_pose7.webp"
/>
<link
rel="preload"
as="image"
href="%PUBLIC_URL%/mascot/kitsune_pose3.webp"
/>
<!-- Google tag (gtag.js) -->
<!-- This replaces old universal analytics. -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-525G5MXFJG"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-525G5MXFJG");
</script>
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5350229982172647"
crossorigin="anonymous"
></script>
<link
rel="preload"
as="image"
@@ -90,27 +87,7 @@
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" />
<!-- Google tag (gtag.js) -->
<!-- This replaces old universal analytics. -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-525G5MXFJG"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-525G5MXFJG");
</script>
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5350229982172647"
crossorigin="anonymous"
></script>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
@@ -140,6 +117,13 @@
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script
async
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"
></script>
<div id="root"></div>
</body>
</html>
+2 -15
View File
@@ -1,6 +1,6 @@
import React from "react";
import ReactDOM from "react-dom";
import * as serviceWorker from "./serviceWorker";
// import * as serviceWorker from "./serviceWorker";
// import AppTranslated from "./AppTranslated";
import { App } from "./App";
@@ -17,19 +17,6 @@ document.getElementsByTagName("html")[0].classList.add(designSystemClass);
// bootstrapCss.setAttribute("href", "https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css");
// document.getElementsByTagName("head")[0].appendChild(bootstrapCss);
const bootstrapJs = document.createElement("script");
bootstrapJs.setAttribute("rel", "stylesheet");
bootstrapJs.setAttribute("crossorigin", "anonymous");
bootstrapJs.setAttribute(
"integrity",
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
);
bootstrapJs.setAttribute(
"src",
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
);
document.getElementsByTagName("body")[0].appendChild(bootstrapJs);
// NB: Posthog turned off for most users (anonymous users) due to cost.
// We'll track for logged-in users only
// Posthog analytics
@@ -45,4 +32,4 @@ ReactDOM.render(
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
// serviceWorker.unregister();