import Document, { Html, Head, Main, NextScript } from 'next/document'

class Doc extends Document 
{
	render() 
	{
		return (
			<Html lang="ru-RU">
				<Head>
					{/*<base href="http://claymorrow.myjino.ru/dev/evolution/" />*/}
					<meta name="description" content="" />
					<meta name="keywords" content="" />

					<meta charSet="utf-8" />
					<meta name="msapplication-TileColor" content="#1C01A9" />
					<meta name="msapplication-TileImage" content="/favicon/favicon_144.png" />
					<link rel="preconnect" href="https://fonts.googleapis.com"/>
					<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="true"/>
					<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap" rel="stylesheet"/>

					<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

					<link rel="icon" type="image/png" href="/favicon/favicon-16.png" sizes="16x16" />
					<link rel="icon" type="image/png" href="/favicon/favicon-32.png" sizes="32x32" />
					<link rel="icon" type="image/png" href="/favicon/favicon_96.png" sizes="96x96" />

					<link rel="apple-touch-icon" sizes="57x57" href="/favicon/favicon_57.png" />
					<link rel="apple-touch-icon" sizes="72x72" href="/favicon/favicon_72.png" />
					<link rel="apple-touch-icon" sizes="144x144" href="/favicon/favicon_144.png" />
					<link rel="apple-touch-icon" sizes="64x64" href="/favicon/favicon_64.png" />
					<link rel="apple-touch-icon" sizes="120x120" href="/favicon/favicon_120.png" />
					<link rel="apple-touch-icon" sizes="72x72" href="/favicon/favicon_72.png" />
					<link rel="apple-touch-icon" sizes="152x152" href="/favicon/favicon_152.png" />

					<meta property="og:type" content="website" />
					<meta property="og:image" content="/favicon/favicon_152.png" />
					<meta property="og:description" content="" />

					<meta name="theme-color" content="#1C01A9" />
				</Head>
				<body>
					<Main/>
					<NextScript />

					<script type="text/javascript" dangerouslySetInnerHTML={{ 
						__html: `
							(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
							m[i].l=1*new Date();
							for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
							k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
							(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");

							ym(${ process.env.YANDEX_METRIKA_ID }, "init", { 
								clickmap:true, 
								trackLinks:true, 
								accurateTrackBounce:true, 
								webvisor:true, 
							});
						`, }}
					/>
					<noscript>
						<div>
							<img src={`https://mc.yandex.ru/watch/${ process.env.YANDEX_METRIKA_ID }`} style={{ position:'absolute', left:'-9999px' }} alt=""/>
						</div>
					</noscript>
				</body>
			</Html>
		)
	}
}

export default Doc;