File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -372,14 +372,33 @@ function initTaxonomy() {
372372 showTask ( CAT_TASKS [ cat ] [ 0 ] ) ;
373373 }
374374
375+ const allTaskKeys = Object . keys ( TASKS ) ;
376+ let autoIdx = 0 ;
377+ let autoTimer = null ;
378+
379+ function stopAuto ( ) {
380+ if ( autoTimer ) { clearInterval ( autoTimer ) ; autoTimer = null ; }
381+ }
382+
383+ function startAuto ( ) {
384+ autoTimer = setInterval ( ( ) => {
385+ autoIdx = ( autoIdx + 1 ) % allTaskKeys . length ;
386+ const key = allTaskKeys [ autoIdx ] ;
387+ const cat = Object . entries ( CAT_TASKS ) . find ( ( [ , tasks ] ) => tasks . includes ( key ) ) ?. [ 0 ] ;
388+ if ( cat ) showCat ( cat ) ;
389+ else showTask ( key ) ;
390+ } , 3000 ) ;
391+ }
392+
375393 catBtns . forEach ( btn => {
376- btn . addEventListener ( "click" , ( ) => showCat ( btn . dataset . cat ) ) ;
394+ btn . addEventListener ( "click" , ( ) => { stopAuto ( ) ; showCat ( btn . dataset . cat ) ; } ) ;
377395 } ) ;
378396 taskBtns . forEach ( btn => {
379397 btn . addEventListener ( "click" , ( ) => showTask ( btn . dataset . task ) ) ;
380398 } ) ;
381399
382400 showCat ( "geo" ) ;
401+ startAuto ( ) ;
383402}
384403
385404/* ── Heatmap ─────────────────────────────────────────────────── */
Original file line number Diff line number Diff line change @@ -252,7 +252,10 @@ <h2 class="sec-title">20 tasks across 4 categories.<br>Infinitely scalable.</h2>
252252 < img id ="ex-answer " src ="assets/img/ex_translation_answer.png " alt ="Ground truth " />
253253 < img id ="ex-output " src ="assets/img/ex_translation_output.png " alt ="Model output " />
254254 </ div >
255- < div class ="ex-instruction " id ="ex-instr "> </ div >
255+ < div class ="instruction-block " style ="margin-top:14px ">
256+ < div class ="label "> Instruction</ div >
257+ < div id ="ex-instr "> </ div >
258+ </ div >
256259 </ div >
257260 </ div >
258261 </ div >
You can’t perform that action at this time.
0 commit comments