178 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			178 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { eventHandler } from 'h3'
 | |
| 
 | |
| export default eventHandler(() => {
 | |
|   const boxes = [
 | |
|     {
 | |
|       id: 'ES2012',
 | |
|       type: 'playlist',
 | |
|       name: '2012',
 | |
|       duration: 0,
 | |
|       description: '🐉<i class="indice">💧</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2013',
 | |
|       type: 'playlist',
 | |
|       name: '2013',
 | |
|       duration: 0,
 | |
|       description: '🐍<i class="indice">💧</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2015',
 | |
|       type: 'playlist',
 | |
|       name: '2015',
 | |
|       duration: 0,
 | |
|       description: '🐐<i class="indice">🌳</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2016',
 | |
|       type: 'playlist',
 | |
|       name: '2016',
 | |
|       duration: 0,
 | |
|       description: '🐒<i class="indice">🔥</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2017',
 | |
|       type: 'playlist',
 | |
|       name: '2017',
 | |
|       duration: 0,
 | |
|       description: '🐓<i class="indice">🔥</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2018',
 | |
|       type: 'playlist',
 | |
|       name: '2018',
 | |
|       duration: 0,
 | |
|       description: '🐕<i class="indice">🌱</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2019',
 | |
|       type: 'playlist',
 | |
|       name: '2019',
 | |
|       duration: 0,
 | |
|       description: '🐖<i class="indice">🌱</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2020',
 | |
|       type: 'playlist',
 | |
|       name: '2020',
 | |
|       duration: 0,
 | |
|       description: '🐀<i class="indice">🪙</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2021',
 | |
|       type: 'playlist',
 | |
|       name: '2021',
 | |
|       duration: 0,
 | |
|       description: '🐃<i class="indice">🪙</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2022',
 | |
|       type: 'playlist',
 | |
|       name: '2022',
 | |
|       duration: 0,
 | |
|       description: '🐅<i class="indice">💧</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2023',
 | |
|       type: 'playlist',
 | |
|       name: '2023',
 | |
|       duration: 0,
 | |
|       description: '🐇<i class="indice">💧</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2024',
 | |
|       type: 'playlist',
 | |
|       name: '2024',
 | |
|       duration: 0,
 | |
|       description: '🐉<i class="indice">🌳</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES2025',
 | |
|       type: 'playlist',
 | |
|       name: '2025',
 | |
|       duration: 0,
 | |
|       description: '🐍<i class="indice">🌳</i>',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#32021F',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES00A',
 | |
|       type: 'compilation',
 | |
|       name: 'manifeste',
 | |
|       duration: 2794,
 | |
|       description: 'Zero is for manifesto',
 | |
|       color1: '#ffffff',
 | |
|       color2: '#48959d',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES00B',
 | |
|       type: 'compilation',
 | |
|       name: 'manifeste B',
 | |
|       duration: 2470,
 | |
|       description: 'Even Zero has a b-side',
 | |
|       color1: '#0d01b9',
 | |
|       color2: '#3b7589',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES01A',
 | |
|       type: 'compilation',
 | |
|       name: '...',
 | |
|       duration: 3487,
 | |
|       description: '...',
 | |
|       color1: '#c7b3aa',
 | |
|       color2: '#000100',
 | |
|       color3: '#00ff00'
 | |
|     },
 | |
|     {
 | |
|       id: 'ES01B',
 | |
|       type: 'compilation',
 | |
|       name: '... B',
 | |
|       duration: 3773,
 | |
|       description: '...',
 | |
|       color1: '#f7dd01',
 | |
|       color2: '#010103',
 | |
|       color3: '#00ff00'
 | |
|     }
 | |
|   ]
 | |
|   return boxes.map((b) => ({ ...b, state: 'box-hidden' })) // boxes are first hidden to allow the animation to work (hidden -> list -> selected)
 | |
| })
 |