scratch-www/src/template.ejs

89 lines
4.6 KiB
Text
Raw Normal View History

2015-09-02 15:08:58 -04:00
<!DOCTYPE html>
2015-09-04 11:26:18 -04:00
<!--[if lt IE 9 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
2015-09-02 15:08:58 -04:00
<head>
2021-12-10 11:03:40 -05:00
<% if (htmlWebpackPlugin.options.gtm_id) { %>
<!-- Google Tag Manager -->
<script>(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=
2023-06-12 12:11:51 -04:00
'https://www.googletagmanager.com/gtm.js?id='+i+dl+'<%= htmlWebpackPlugin.options.gtm_env_auth %>';
f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','<%- htmlWebpackPlugin.options.gtm_id %>');
</script>
2021-12-10 11:03:40 -05:00
<!-- End Google Tag Manager -->
<% } %>
2015-09-02 15:08:58 -04:00
<meta charset="UTF-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=<%= htmlWebpackPlugin.options.viewportWidth %>, initial-scale=1">
2015-09-02 15:08:58 -04:00
<!-- Prevent mobile Safari from making phone numbers -->
<meta name="format-detection" content="telephone=no">
2016-06-23 15:34:47 -04:00
<% if (!htmlWebpackPlugin.options.dynamicMetaTags) { %>
<title>Scratch - <%= htmlWebpackPlugin.options.title %></title>
<!-- Search & Open Graph-->
<meta name="description" content="<%= htmlWebpackPlugin.options.description %>" />
<meta name="google-site-verification" content="m_3TAXDreGTFyoYnEmU9mcKB4Xtw5mw6yRkuJtXRKxM" />
2015-09-02 15:08:58 -04:00
<meta property="og:url" content="https://scratch.mit.edu/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Scratch - <%= htmlWebpackPlugin.options.title %>" />
<meta property="og:description" content="<%= htmlWebpackPlugin.options.description %>" />
<meta property="og:image" content="<%- htmlWebpackPlugin.options.og_image %>" />
<meta property="og:image:type" content="<%- htmlWebpackPlugin.options.og_image_type %>" />
<meta property="og:image:width" content="<%- htmlWebpackPlugin.options.og_image_width %>" />
<meta property="og:image:height" content="<%- htmlWebpackPlugin.options.og_image_height %>" />
<% } %>
2015-09-04 11:26:18 -04:00
<!-- Favicon & CSS normalize -->
<link rel="shortcut icon" href="/favicon.ico" />
2015-09-02 15:08:58 -04:00
<link rel="stylesheet" href="/css/lib/normalize.min.css" />
<link rel="stylesheet" href="<%= htmlWebpackPlugin.files.chunks.common.css[0] %>" />
<link rel="stylesheet" href="<%= htmlWebpackPlugin.files.chunks[htmlWebpackPlugin.options.route.name].css[0] %>" />
2015-09-04 11:26:18 -04:00
<!-- Polyfills -->
<script src="/js/polyfill.min.js"></script>
2016-06-23 15:34:47 -04:00
</head>
<body>
2021-12-10 11:03:40 -05:00
<% if (htmlWebpackPlugin.options.gtm_id) { %>
<!-- Google Tag Manager (noscript) -->
2023-06-12 12:11:51 -04:00
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<%- htmlWebpackPlugin.options.gtm_id %><%= htmlWebpackPlugin.options.gtm_env_auth %>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
2021-12-10 11:03:40 -05:00
<!-- End Google Tag Manager (noscript) -->
<% } %>
2020-06-09 10:24:57 -04:00
<noscript>
<p>Your browser has Javascript disabled. Please go to your browser preferences and enable Javascript in order to use Scratch.</p>
2020-06-09 10:24:57 -04:00
</noscript>
2016-06-23 15:34:47 -04:00
<div id="app"></div>
<!-- Vendor & Initialize (Session & Localization)-->
<script src="<%= htmlWebpackPlugin.files.chunks.common.entry %>"></script>
2016-06-23 15:34:47 -04:00
<!-- Scripts -->
<script src="/js/<%= htmlWebpackPlugin.options.route.intlName || htmlWebpackPlugin.options.route.name %>.intl.js"></script>
<script src="<%= htmlWebpackPlugin.files.chunks[htmlWebpackPlugin.options.route.name].entry %>"></script>
2016-06-23 15:34:47 -04:00
<!-- Translate title element -->
<% if (!htmlWebpackPlugin.options.dynamicMetaTags) { %>
<script>
var loc = window._locale || 'en';
if (typeof window._messages !== 'undefined' && loc !== 'en') {
if (typeof window._messages[loc] === 'undefined') {
loc = loc.split('-')[0];
}
if (typeof window._messages[loc] !== 'undefined') {
var localizedTitle = window._messages[loc]['general.' + '<%= htmlWebpackPlugin.options.title %>'.toLowerCase()] || '';
if (localizedTitle.length > 0) {
document.title = 'Scratch - ' + localizedTitle;
}
}
}
</script>
<% } %>
</body>
2015-09-02 15:08:58 -04:00
</html>