76 lines
2.9 KiB
JavaScript
76 lines
2.9 KiB
JavaScript
// pages/_document.js
|
|
import { Html, Head, Main, NextScript } from "next/document";
|
|
|
|
export default function Document() {
|
|
return (
|
|
<Html lang="en">
|
|
<Head>
|
|
{/* ✅ CSS Styles */}
|
|
<link rel="icon" type="image/png" sizes="56x56" href="/assets/images/fav-icon/icon.webp" />
|
|
<link rel="stylesheet" href="/assets/css/bootstrap.min.css" />
|
|
<link rel="stylesheet" href="/assets/css/animate.css" />
|
|
<link rel="stylesheet" href="/assets/css/animated-text.css" />
|
|
<link rel="stylesheet" href="/assets/css/all.min.css" />
|
|
<link rel="stylesheet" href="/assets/css/flaticon.css" />
|
|
<link rel="stylesheet" href="/assets/css/theme-default.css" />
|
|
<link rel="stylesheet" href="/assets/css/meanmenu.min.css" />
|
|
<link rel="stylesheet" href="/assets/css/owl.transitions.css" />
|
|
<link rel="stylesheet" href="/assets/css/bootstrap-icons.css" />
|
|
<link rel="stylesheet" href="/assets/css/style.css" />
|
|
<link rel="stylesheet" href="/assets/css/magnific-popup.css" />
|
|
<link rel="stylesheet" href="/assets/css/responsive.css" />
|
|
|
|
{/* ✅ Google Tag Manager */}
|
|
<script
|
|
dangerouslySetInnerHTML={{
|
|
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
})(window,document,'script','dataLayer','GTM-KWXS2ZM3');`,
|
|
}}
|
|
/>
|
|
|
|
{/* ✅ Google Analytics */}
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-1NXE8QSBC8"></script>
|
|
<script
|
|
dangerouslySetInnerHTML={{
|
|
__html: `
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
gtag('config', 'G-1NXE8QSBC8');
|
|
`,
|
|
}}
|
|
/>
|
|
</Head>
|
|
|
|
<body>
|
|
<Main />
|
|
<NextScript />
|
|
|
|
{/* ✅ accessiBe (only load in production) */}
|
|
<script
|
|
dangerouslySetInnerHTML={{
|
|
__html: `
|
|
if (window.location.hostname !== "localhost") {
|
|
(function(){
|
|
var s = document.createElement('script');
|
|
var h = document.querySelector('head') || document.body;
|
|
s.src = 'https://acsbapp.com/apps/app/dist/js/app.js';
|
|
s.async = true;
|
|
s.onload = function(){
|
|
if (typeof acsbJS !== 'undefined') {
|
|
acsbJS.init();
|
|
}
|
|
};
|
|
h.appendChild(s);
|
|
})();
|
|
}
|
|
`,
|
|
}}
|
|
/>
|
|
</body>
|
|
</Html>
|
|
);
|
|
} |