-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
139 lines (108 loc) · 4.32 KB
/
index.html
File metadata and controls
139 lines (108 loc) · 4.32 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
<!DOCTYPE html>
<html lang="Zh-ch">
<head>
<meta charset="UTF-8">
<title>帽子社</title>
<link rel="shortcut icon" href="./icon/HatSoft.ico">
<meta name="description" content="游戏设计的网站">
<meta name="keywords" content="游戏开发,游戏美术,音乐,作曲">
<script src="./lib/jquery-3.6.0.min.js"></script>
<script src="./lib/anime.min.js"></script>
<script src="./main.js"></script>
<link rel="stylesheet" href="./main.css">
<link rel="stylesheet" href="./styles/home.css">
</head>
<body>
<div id="logo-main"></div>
<div id="main-title">
<h1>帽子社</h1>
<div class="sub-main-title">严肃,叛逆,开放</div>
<!-- <div class="sub-title">您是第<span id="visited-num">?</span>个访问本页面的人</div> -->
</div>
<ul id="main-banner">
<li class="main-banner-item" component="collider">
<a href="./component_notes/index.html">📚 教程资料</a>
</li>
<li class="main-banner-item" component="collider">
<a href="./component_meetingMinutes/index.html">📝 会议记录</a>
</li>
<li class="main-banner-item" component="collider">
<a href="./component_log_page/index.html">👤 个人页面</a>
</li>
<li class="main-banner-item" component="collider">
<a href="./component_joinUs/index.html">🎯 加入帽子社群</a>
</li>
<li class="main-banner-item" component="collider">
<a href="./component_talk/index.html">💬 聊天区</a>
</li>
<li class="main-banner-item" component="collider">
<a href="./component_gameAsserts/index.html">🎨 游戏素材资源整理</a>
</li>
<li class="main-banner-item" component="collider">
<a href="./component_nihongStudy/index.html">🇯🇵 日语小测验</a>
</li>
<li class="main-banner-item" component="collider">
<a href="https://qm.qq.com/q/subecEBNIY" target="_blank">💚 绿色资源管理器客服群</a>
</li>
<!-- <li class="main-banner-item" component="collider">
<a href="">🎮 帽子社游戏合集(准备中)</a>
</li> -->
</ul>
<div class="collider" component="player collider" id="player" onclick="gameHelp()">板子</div>
</body>
<script>
// 背景渐变动画 - 从浅色到深色
var animation = anime({
targets: 'html',
duration: 2000,
easing: 'easeInOutQuad',
autoplay: false,
});
function gameHelp()
{
alert("使用方向键来控制板子移动!使用空格键发射子弹!")
}
$("#main-title").click(function () {
$(this).addClass("hidden");
$("#main-banner").addClass("active");
animation.play();
// 菜单项依次显示动画
$(".main-banner-item").each(function(index) {
const $item = $(this);
setTimeout(function() {
$item.addClass("visible");
}, index * 100);
});
})
$(document).ready(function () {
fetch(serverUrl + `/userAccess`)
.then(response => response.json())
.then(data => {
$("#visited-num").text(data.visitedNum);
})
// if(localStorage.getItem("storyIndex")===null )
// {
// localStorage.setItem("storyIndex", '0');
// // if(localStorage.getItem("storyIndex")=="0"||ocalStorage.getItem("storyIndex")=="1")
// window.location.replace("./game/index.html")
// }else{
// }
// 菜单项初始状态已通过CSS控制,不需要随机定位
// 使用网格布局替代随机定位,更有序美观
})
$(document).on("mousewheel DOMMouseScroll", function (e) {
// jq 获取dom 事件对象要通过originalEvent
var delta = (e.originalEvent.wheelDelta && (e.originalEvent.wheelDelta > 0 ? 1 : -1)) ||
// chrome & ie
(e.originalEvent.detail && (e.originalEvent.detail > 0 ? -1 : 1)); // firefox
if (delta > 0) {
// 向上滚
console.log("向上")
} else if (delta < 0) {
// 向下滚
console.log("向下")
}
});
</script>
<script src="game.js"></script>
</html>