| 
									
										
										
										
											2018-02-04 19:15:35 -08:00
										 |  |  | <ModalDialog :label :shown background="var(--main-bg)"> | 
					
						
							| 
									
										
										
										
											2018-02-04 15:59:42 -08:00
										 |  |  |   {{#if type === 'gifv'}} | 
					
						
							|  |  |  |     <video | 
					
						
							|  |  |  |       aria-label="Animated GIF: {{description || ''}}" | 
					
						
							|  |  |  |       poster="{{poster}}" | 
					
						
							|  |  |  |       src="{{src}}" | 
					
						
							|  |  |  |       width="{{width}}" | 
					
						
							|  |  |  |       height="{{height}}" | 
					
						
							|  |  |  |       autoplay | 
					
						
							|  |  |  |       muted | 
					
						
							|  |  |  |       loop | 
					
						
							|  |  |  |       playsinline | 
					
						
							|  |  |  |     /> | 
					
						
							|  |  |  |   {{else}} | 
					
						
							|  |  |  |     <img | 
					
						
							|  |  |  |       src="{{src}}" | 
					
						
							|  |  |  |       width="{{width}}" | 
					
						
							|  |  |  |       height="{{height}}" | 
					
						
							| 
									
										
										
										
											2018-02-05 08:44:46 -08:00
										 |  |  |       alt="{{description || ''}}" | 
					
						
							| 
									
										
										
										
											2018-02-04 15:59:42 -08:00
										 |  |  |     /> | 
					
						
							|  |  |  |   {{/if}} | 
					
						
							|  |  |  | </ModalDialog> | 
					
						
							|  |  |  | <style> | 
					
						
							| 
									
										
										
										
											2018-02-04 19:15:35 -08:00
										 |  |  |   :global(#modal-dialog img, #modal-dialog video) { | 
					
						
							| 
									
										
										
										
											2018-02-04 15:59:42 -08:00
										 |  |  |     object-fit: contain; | 
					
						
							|  |  |  |     overflow: hidden; | 
					
						
							|  |  |  |     max-width: calc(100vw - 20px); | 
					
						
							|  |  |  |     max-height: calc(100vh - 100px); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | </style> | 
					
						
							|  |  |  | <script> | 
					
						
							| 
									
										
										
										
											2018-02-05 09:43:45 -08:00
										 |  |  |   import ModalDialog from './ModalDialog.html' | 
					
						
							| 
									
										
										
										
											2018-02-04 15:59:42 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   export default { | 
					
						
							|  |  |  |     components: { | 
					
						
							|  |  |  |       ModalDialog | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     methods: { | 
					
						
							|  |  |  |       async show() { | 
					
						
							|  |  |  |         this.set({shown: true}) | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | </script> |