1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < title > Sora Results</ title >
7+ < link rel ="stylesheet " href ="../css/specific_styles.css ">
8+ </ head >
9+ < body >
10+ < main >
11+ < header >
12+ < div class ="header-left ">
13+ < a href ="../../index.html " class ="back-to-main "> ← Back to Main</ a >
14+ < div class ="logo ">
15+ < span > ●</ span > Sora (Dec.)
16+ </ div >
17+ </ div >
18+ < nav class ="category-nav ">
19+ < a href ="#text-to-video " class ="category-button "> Text-to-Video</ a >
20+ </ nav >
21+ </ header >
22+ < section class ="intro ">
23+ < h1 > Videos Generated by < a href ="https://openai.com/sora/ "> Sora</ a > </ h1 >
24+ </ section >
25+
26+ < section id ="text-to-video ">
27+ < h1 > Text-to-Video</ h1 >
28+ < div class ="projects-container " id ="gallery1 ">
29+ < div class ="projects ">
30+ </ div >
31+ </ div >
32+ </ section >
33+
34+ </ main >
35+
36+ < script src ="./sora.js "> </ script >
37+ < script >
38+ // 平滑滚动
39+ document . querySelectorAll ( 'a[href^="#"]' ) . forEach ( anchor => {
40+ anchor . addEventListener ( 'click' , function ( e ) {
41+ e . preventDefault ( ) ;
42+ document . querySelector ( this . getAttribute ( 'href' ) ) . scrollIntoView ( {
43+ behavior : 'smooth'
44+ } ) ;
45+ } ) ;
46+ } ) ;
47+
48+ // 高亮当前活动的导航项
49+ const navLinks = document . querySelectorAll ( '.category-button' ) ;
50+ const sections = document . querySelectorAll ( 'section' ) ;
51+
52+ function changeLinkState ( ) {
53+ let index = sections . length ;
54+
55+ while ( -- index && window . scrollY + 50 < sections [ index ] . offsetTop ) { }
56+
57+ navLinks . forEach ( ( link ) => link . classList . remove ( 'active' ) ) ;
58+ navLinks [ index - 1 ] . classList . add ( 'active' ) ;
59+ }
60+
61+ window . addEventListener ( 'scroll' , changeLinkState ) ;
62+ </ script >
63+
64+ </ body >
65+ </ html >
0 commit comments