| 
									
										
										
										
											2018-03-13 17:14:57 -07:00
										 |  |  | {{#if revealed}} | 
					
						
							|  |  |  |   <:Component {pageComponent} :params /> | 
					
						
							|  |  |  | {{/if}} | 
					
						
							|  |  |  | <script> | 
					
						
							| 
									
										
										
										
											2018-04-14 14:50:53 -07:00
										 |  |  |   // On the very first page load, avoid doing a "reveal" because | 
					
						
							|  |  |  |   // it leads to a flash between when the SSR is shown, the two frame we hide it, | 
					
						
							|  |  |  |   // and then when we show it again. | 
					
						
							|  |  |  |   // | 
					
						
							|  |  |  |   // We only really need LazyPage behavior when the user is clicking around | 
					
						
							|  |  |  |   // after the page has loaded, to improve input responsiveness. | 
					
						
							|  |  |  |   let firstTime = true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-13 17:14:57 -07:00
										 |  |  |   export default { | 
					
						
							| 
									
										
										
										
											2018-04-19 21:38:01 -07:00
										 |  |  |     oncreate () { | 
					
						
							| 
									
										
										
										
											2018-04-14 14:50:53 -07:00
										 |  |  |       firstTime = false | 
					
						
							| 
									
										
										
										
											2018-03-27 19:46:01 -07:00
										 |  |  |       requestAnimationFrame(() => { | 
					
						
							|  |  |  |         requestAnimationFrame(() => { | 
					
						
							|  |  |  |           this.set({revealed: true}) | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  |       }) | 
					
						
							| 
									
										
										
										
											2018-03-13 17:14:57 -07:00
										 |  |  |     }, | 
					
						
							|  |  |  |     data: () => ({ | 
					
						
							| 
									
										
										
										
											2018-04-14 14:50:53 -07:00
										 |  |  |       revealed: !process.browser || firstTime | 
					
						
							| 
									
										
										
										
											2018-03-13 17:14:57 -07:00
										 |  |  |     }) | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | </script> |