block vars

block loadClientEntry
	- const entry = config.frontendEmbedEntry;

doctype html

html(class='embed')

	head
		meta(charset='utf-8')
		meta(name='application-name' content='Misskey')
		meta(name='referrer' content='origin')
		meta(name='theme-color' content= themeColor || '#86b300')
		meta(name='theme-color-orig' content= themeColor || '#86b300')
		meta(property='og:site_name' content= instanceName || 'Misskey')
		meta(property='instance_url' content= instanceUrl)
		meta(name='viewport' content='width=device-width, initial-scale=1')
		meta(name='format-detection' content='telephone=no,date=no,address=no,email=no,url=no')
		link(rel='icon' href= icon || '/favicon.ico')
		link(rel='apple-touch-icon' href= appleTouchIcon || '/apple-touch-icon.png')
		link(rel='modulepreload' href=`/embed_vite/${entry.file}`)

		if !config.frontendEmbedManifestExists
				script(type="module" src="/embed_vite/@vite/client")

		if Array.isArray(entry.css)
			each href in entry.css
				link(rel='stylesheet' href=`/embed_vite/${href}`)

		title
			block title
				= title || 'Misskey'

		block meta
			meta(name='robots' content='noindex')

		style
			include ../style.embed.css

		script.
			var VERSION = "#{version}";
			var CLIENT_ENTRY = "#{entry.file}";

		script(type='application/json' id='misskey_meta' data-generated-at=now)
			!= metaJson

		script(type='application/json' id='misskey_embedCtx' data-generated-at=now)
			!= embedCtx

		script
			include ../boot.embed.js

	body
		noscript: p
			| JavaScriptを有効にしてください
			br
			| Please turn on your JavaScript
		div#splash
			img#splashIcon(src= icon || '/static-assets/splash.png')
			div#splashSpinner
				<svg class="spinner bg" viewBox="0 0 152 152" xmlns="http://www.w3.org/2000/svg">
					<g transform="matrix(1,0,0,1,12,12)">
						<circle cx="64" cy="64" r="64" style="fill:none;stroke:currentColor;stroke-width:24px;"/>
					</g>
				</svg>
				<svg class="spinner fg" viewBox="0 0 152 152" xmlns="http://www.w3.org/2000/svg">
					<g transform="matrix(1,0,0,1,12,12)">
						<path d="M128,64C128,28.654 99.346,0 64,0C99.346,0 128,28.654 128,64Z" style="fill:none;stroke:currentColor;stroke-width:24px;"/>
					</g>
				</svg>
		block content
