You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					26 lines
				
				490 B
			
		
		
			
		
	
	
					26 lines
				
				490 B
			| 
								 
											4 years ago
										 
									 | 
							
								import symbol from '../assets/twitter.svg';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// Import sprite instance which already contains twitter logo required above
							 | 
						||
| 
								 | 
							
								import sprite from 'svg-sprite-loader/runtime/sprite.build';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// Render sprite
							 | 
						||
| 
								 | 
							
								const spriteContent = sprite.stringify();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								const pageContent = `
							 | 
						||
| 
								 | 
							
								<!DOCTYPE html>
							 | 
						||
| 
								 | 
							
								<html lang="en">
							 | 
						||
| 
								 | 
							
								<head>
							 | 
						||
| 
								 | 
							
								<meta charset="UTF-8">
							 | 
						||
| 
								 | 
							
								</head>
							 | 
						||
| 
								 | 
							
								<body>
							 | 
						||
| 
								 | 
							
								${spriteContent}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<svg viewBox="${symbol.viewBox}">
							 | 
						||
| 
								 | 
							
								  <use xlink:href="#${symbol.id}"></use>
							 | 
						||
| 
								 | 
							
								</svg>
							 | 
						||
| 
								 | 
							
								</body>
							 | 
						||
| 
								 | 
							
								</html>
							 | 
						||
| 
								 | 
							
								`;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								console.log(pageContent);
							 |