-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
176 lines (168 loc) · 8.28 KB
/
index.html
File metadata and controls
176 lines (168 loc) · 8.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="images/svg" href="./assets/images/logo.svg">
<title>赴九天 问苍穹|中国载人航天</title>
<link rel="stylesheet" href="./styles/reset.css">
<link rel="stylesheet" href="./styles/header.css">
<link rel="stylesheet" href="./styles/index/index.css">
</head>
<body>
<audio id="bgm" loop>
<source src="./assets/audios/background.mp3" type="audio/mpeg">
</audio>
<header class="header">
<div class="header-left">
<a href="./index.html">
<img id="logo" src="./assets/images/logo.svg" alt="赴九天 问苍穹|中国载人航天 LOGO">
</a>
</div>
<div class="header-center">
<a href="./pages/TwelveOrderStars.html" class="nav-link">十二阶星辰</a>
<a href="./pages/ChronologyOfStellarTrails.html" class="nav-link">星轨纪年</a>
<a href="./pages/WenTianPavilion.html" class="nav-link">问天阁</a>
<a href="./pages/GlobalQuickReport.html" class="nav-link">寰宇速报</a>
</div>
<div class="header-right"></div>
</header>
<div class="container">
<div class="page">
<h1 class="slogan">赴九天 问苍穹</h1>
<h3 class="title">中国载人航天</h3>
<div class="top-left-light"></div>
<div class="bottom-right-light"></div>
<div class="grid-overlay" id="grid">
</div>
</div>
<div class="page">
<img class="rocket-line-draft" src="./assets/images/index/RocketLineDraft.svg" alt="火箭线稿">
<div class="intro">
<h2 class="title">「天阶十二辰」</h2>
<h4 class="en">Celestial Ascent Phases</h4>
<h4 class="detail">从总装测试到苍穹之吻</h4>
<div class="link-container">
<a href="./pages/TwelveOrderStars.html">
完整解析
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 24 24">
<path fill="currentColor"
d="m12 22l-7-7l1.4-1.425l4.6 4.6V11h2v7.175l4.6-4.575L19 15zM11 9V6h2v3zm0-5V2h2v2z" />
</svg>
</a>
</div>
</div>
</div>
<div class="page">
<div class="bottom-left-light"></div>
<div class="intro">
<h2 class="title">「星轨纪年」</h2>
<h4 class="en">Stellar Chronicles</h4>
<div class="line"></div>
</div>
<div class="milestone">
<div class="milestone-bg"></div>
<div class="rocket-launch">
<div class="content">
<h2>1992-2030</h2>
<h2>中国航天里程碑全记录</h2>
<a href="./pages/ChronologyOfStellarTrails.html">
<button class="start-btn"></button>
</a>
</div>
</div>
</div>
</div>
<div class="page">
<div class="planet-container">
<canvas class="planet-canvas"></canvas>
</div>
<div class="content">
<h1 class="title">「问天阁」</h1>
<h2 class="subtitle">Cosmic Inquiry Lab</h2>
<div class="line"></div>
<p class="description">破解宇宙奥秘的108道天问</p>
<a href="./pages/WenTianPavilion.html">
<button class="start-btn"></button>
</a>
</div>
<div class="mask"></div>
</div>
<div class="page">
<div class="intro">
<div class="title">「寰宇速报」</div>
<div class="en">Galaxy Bulletin</div>
<div class="line"></div>
<div class="link-container">
<a href="./pages/GlobalQuickReport.html" class="link">
同步空间站视角的航天要闻
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 24 24">
<path fill="currentColor"
d="m12 22l-7-7l1.4-1.425l4.6 4.6V11h2v7.175l4.6-4.575L19 15zM11 9V6h2v3zm0-5V2h2v2z" />
</svg>
</a>
</div>
</div>
<div class="stars-bg"></div>
<div class="last-plant">
<img src="./assets/images/index/LastPlant.svg" alt="孤独星球">
<img src="./assets/images/index/LastPlant.svg" alt="孤独星球">
<img src="./assets/images/index/LastPlant.svg" alt="孤独星球">
<img src="./assets/images/index/LastPlant.svg" alt="孤独星球">
</div>
</div>
<svg id="home-line" viewBox="0 0 1920 5090" preserveAspectRatio="none">
<defs>
<filter id="glow" x="-150%" y="-150%" width="400%" height="400%">
<feGaussianBlur in="SourceGraphic" stdDeviation="25" result="blur1" />
<feGaussianBlur in="SourceGraphic" stdDeviation="15" result="blur2" />
<feGaussianBlur in="SourceGraphic" stdDeviation="5" result="blur3" />
<feMerge>
<feMergeNode in="blur1" />
<feMergeNode in="blur2" />
<feMergeNode in="blur3" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
<radialGradient id="sliderGradient" cx="50%" cy="50%" r="50%">
<stop offset="0%" stop-color="#ffffff" stop-opacity="1" />
<stop offset="70%" stop-color="#ffffff" stop-opacity="0.8" />
<stop offset="100%" stop-color="#a0d8ff" stop-opacity="0.6" />
</radialGradient>
</defs>
<path id="curve"
d="M1788.94 1.79519C1788.94 1.79519 1593.58 54.4529 1348.08 236.453C1137.1 392.861 984.58 546.452 1016.94 821.795C1049.31 1097.14 1523.62 1075.54 1593.58 1381.45C1653.39 1642.97 1593.59 1794.45 1356.57 2012.95C1097.65 2251.64 786.063 2328 587.582 2397.95C389.102 2467.91 -397.9 2892.95 257.1 3517.45C912.1 4141.95 257.1 4422.51 146.1 4702.45C35.1006 4982.4 705.499 5321 581 5221.01"
fill="none" stroke="rgba(255, 255, 255, 0.5)" stroke-width="0.8" />
<ellipse id="slider" cx="0" cy="0" rx="25" ry="3" fill="url(#sliderGradient)" filter="url(#glow)" />
</svg>
</div>
<script src="./build/gsap.js"></script>
<script src="./build/scrolltrigger.js"></script>
<script src="./build/three_r145.js"></script>
<script src="./scripts/common/HeaderController.js"></script>
<script src="./scripts/common/StarBackground.js"></script>
<script src="./scripts/common/MeteorEffect.js"></script>
<script src="./scripts/common/Mouse.js"></script>
<script src="./scripts/common/LogoAnimation.js"></script>
<script src="./scripts/index/index.js"></script>
<script>
const curve = document.getElementById('curve')
const slider = document.getElementById('slider')
const totalHeight = document.documentElement.scrollHeight - window.innerHeight
const speedFactor = 1.15
function updateSlider() {
const scrollY = window.scrollY
const scrollFraction = scrollY / totalHeight
const pathLength = curve.getTotalLength()
const offset = scrollFraction * pathLength * speedFactor
const point = curve.getPointAtLength(offset)
const prevPoint = curve.getPointAtLength(Math.max(offset - 0.1, 0))
const angle = Math.atan2(point.y - prevPoint.y, point.x - prevPoint.x) * 180 / Math.PI
slider.setAttribute('transform', `translate(${point.x}, ${point.y}) rotate(${angle})`)
}
window.addEventListener('scroll', updateSlider)
window.addEventListener('resize', updateSlider)
updateSlider();
</script>
</body>
</html>