Browse Source

Use template string for template in examples/index.html

Marco Fugaro 4 years ago
parent
commit
ebaa5e16f9
1 changed files with 10 additions and 10 deletions
  1. 10 10
      examples/index.html

+ 10 - 10
examples/index.html

@@ -188,16 +188,16 @@
 
 		function createLink( file ) {
 
-			const template = [
-				'<div class="card">',
-				'	<a href="' + file + '.html" target="viewer">',
-				'		<div class="cover">',
-				'			<img src="screenshots/' + file + '.jpg" loading="lazy" width="400" />',
-				'		</div>',
-				'		<div class="title">' + getName( file ) + '</div>',
-				'	</a>',
-				'</div>'
-			].join( "\n" );
+			const template = `
+				<div class="card">
+					<a href="${file}.html" target="viewer">
+						<div class="cover">
+							<img src="screenshots/${ file }.jpg" loading="lazy" width="400" />
+						</div>
+						<div class="title">${getName( file )}</div>
+					</a>
+				</div>
+			`;
 
 			const link = createElementFromHTML( template );