2016-11-08 23:11:12 +00:00
export function renderIndex ( ) {
const assetsManifest = process . env . webpackAssets && JSON . parse ( process . env . webpackAssets ) ;
const chunkManifest = process . env . webpackChunkAssets && JSON . parse ( process . env . webpackChunkAssets ) ;
return `
< ! DOCTYPE html >
< html >
< head >
2018-03-08 21:16:48 +00:00
< meta http - equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2018-05-02 20:14:05 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
2018-03-08 21:16:48 +00:00
< meta name = "keywords" content = "p5.js, p5.js web editor, web editor, processing, code editor" / >
< meta name = "description" content = "A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners." / >
2016-11-08 23:11:12 +00:00
< title > p5 . js Web Editor < / t i t l e >
2017-12-08 20:07:54 +00:00
$ { process . env . NODE _ENV === 'production' ? ` <link rel='stylesheet' href='/dist ${ assetsManifest [ '/app.css' ] } ' /> ` : '' }
2016-11-08 23:11:12 +00:00
< link href = 'https://fonts.googleapis.com/css?family=Inconsolata' rel = 'stylesheet' type = 'text/css' >
< link href = 'https://fonts.googleapis.com/css?family=Montserrat:400,700' rel = 'stylesheet' type = 'text/css' >
2016-11-26 23:10:03 +00:00
< link rel = 'shortcut icon' href = 'https://raw.githubusercontent.com/processing/p5.js-website-OLD/master/favicon.ico' type = 'image/x-icon' / >
2016-11-08 23:11:12 +00:00
< / h e a d >
< body >
< div id = "root" class = "root-app" >
< / d i v >
< script >
$ { process . env . NODE _ENV === 'production' ?
` //<![CDATA[
window . webpackManifest = $ { JSON . stringify ( chunkManifest ) } ;
//]]>` : ''}
< / s c r i p t >
2017-12-08 20:07:54 +00:00
< script src = '${process.env.NODE_ENV === ' production ' ? `/dist${assetsManifest[' / vendor . js ']}` : ' / dist / vendor . js '}' > < / s c r i p t >
< script src = '${process.env.NODE_ENV === ' production ' ? `/dist${assetsManifest[' / app . js ']}` : ' / dist / app . js '}' > < / s c r i p t >
2017-04-13 18:49:45 +00:00
< script >
( function ( i , s , o , g , r , a , m ) { i [ 'GoogleAnalyticsObject' ] = r ; i [ r ] = i [ r ] || function ( ) {
( i [ r ] . q = i [ r ] . q || [ ] ) . push ( arguments ) } , i [ r ] . l = 1 * new Date ( ) ; a = s . createElement ( o ) ,
m = s . getElementsByTagName ( o ) [ 0 ] ; a . async = 1 ; a . src = g ; m . parentNode . insertBefore ( a , m )
} ) ( window , document , 'script' , 'https://www.google-analytics.com/analytics.js' , 'ga' ) ;
ga ( 'create' , 'UA-53383000-1' , 'auto' ) ;
ga ( 'send' , 'pageview' ) ;
< / s c r i p t >
2016-11-08 23:11:12 +00:00
< / b o d y >
< / h t m l >
` ;
2017-12-08 20:07:54 +00:00
}