Skip to content

Commit

Permalink
✏修改标题及更正细节
Browse files Browse the repository at this point in the history
  • Loading branch information
arcxingye committed Jan 26, 2022
1 parent 7cbfa73 commit 1daaf7b
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 28 deletions.
39 changes: 22 additions & 17 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<div class="FILL BOX-M" style="position:absolute;top:0;left:0;right:0;bottom:0;z-index:5;">
<div style="margin:0 8% 0 9%;">
<div style="font-size:2.6em; color:#FEF002;">新概念音游</div><br />
<div style="font-size:2.2em; color:#fff; line-height:1.5em;">
从最底下小鹿乃开始<br />
看看你20秒能多少分<br />
<div id="desc" style="display: block;font-size:2.2em; color:#fff; line-height:1.5em;">
从最底下的开始<br />
看你20秒多少分<br />
</div>
<br />
<div id="btn_group" style="display: block;">
Expand All @@ -42,7 +42,25 @@
<button type="button" class="btn btn-secondary btn-lg" onclick="show_setting()">游戏设置</button>
</div>
<div id="setting" style="display: none;">
<!-- 此为无排行榜版本,去除名字留言 -->
<div class="container mb-3">
<input type="button" class="btn btn-secondary btn-lg" onclick="getClickBeforeImage()" value="设置点击前的图" style="left: 0">
<input type="file" id="click-before-image" accept="image/*" style="display: none;" onchange="saveClickBeforeImage()">
<input type="button" class="btn btn-secondary btn-lg" onclick="getClickAfterImage()" value="设置点击后的图" style="right: 0">
<input type="file" id="click-after-image" accept="image/*" style="display: none;" onchange="saveClickAfterImage()">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">标题</span>
</div>
<input type="text" id="title" class="form-control" placeholder="吃掉小鹿乃">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">按键</span>
</div>
<input type="text" id="keyboard" class="form-control" maxlength=4 placeholder="默认为DFJK">
</div>
<!-- 此为无排行榜版本,隐藏了名字留言 -->
<div class="input-group mb-3" style="display: none;">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">名字</span>
Expand All @@ -55,19 +73,6 @@
</div>
<input type="text" id="message" class="form-control" maxlength=50 placeholder="禁广告/脏话(本项可不填)">
</div>
<div class="container mb-3">
<input type="button" class="btn btn-secondary btn-lg" onclick="getClickBeforeImage()" value="设置点击前的图片" style="left: 0">
<input type="file" id="click-before-image" accept="image/*" style="display: none;" onchange="saveClickBeforeImage()">
<input type="button" class="btn btn-secondary btn-lg" onclick="getClickAfterImage()" value="设置点击后的图片" style="right: 0">
<input type="file" id="click-after-image" accept="image/*" style="display: none;" onchange="saveClickAfterImage()">
</div>

<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">按键</span>
</div>
<input type="text" id="keyboard" class="form-control" maxlength=4 placeholder="默认为DFJK">
</div>
<button type="button" class="btn btn-secondary btn-lg" onclick="show_btn();save_cookie();">完成</button>
</div>
</div>
Expand Down
30 changes: 21 additions & 9 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
<div class="FILL BOX-M" style="position:absolute;top:0;left:0;right:0;bottom:0;z-index:5;">
<div style="margin:0 8% 0 9%;">
<div style="font-size:2.6em; color:#FEF002;">新概念音游</div><br />
<div style="font-size:2.2em; color:#fff; line-height:1.5em;">
从最底下小鹿乃开始<br />
看看你20秒能多少分<br />
<div id="desc" style="display: block;font-size:2.2em; color:#fff; line-height:1.5em;">
从最底下的开始<br />
看你20秒多少分<br />
</div>
<br />
<div id="btn_group" style="display: block;">
Expand All @@ -49,23 +49,35 @@
<button type="button" class="btn btn-secondary btn-lg" onclick="show_setting()">游戏设置</button>
</div>
<div id="setting" style="display: none;">
<div class="container mb-3">
<input type="button" class="btn btn-secondary btn-lg" onclick="getClickBeforeImage()" value="设置点击前的图" style="left: 0">
<input type="file" id="click-before-image" accept="image/*" style="display: none;" onchange="saveClickBeforeImage()">
<input type="button" class="btn btn-secondary btn-lg" onclick="getClickAfterImage()" value="设置点击后的图" style="right: 0">
<input type="file" id="click-after-image" accept="image/*" style="display: none;" onchange="saveClickAfterImage()">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">名字</span>
<span class="input-group-text" id="basic-addon1">标题</span>
</div>
<input type="text" id="username" class="form-control" maxlength=8 placeholder="用于纪录排行(特殊字符会被过滤)">
<input type="text" id="title" class="form-control" placeholder="吃掉小鹿乃">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">留言</span>
<span class="input-group-text" id="basic-addon1">按键</span>
</div>
<input type="text" id="message" class="form-control" maxlength=50 placeholder="禁广告/脏话(本项可不填)">
<input type="text" id="keyboard" class="form-control" maxlength=4 placeholder="默认为DFJK">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">按键</span>
<span class="input-group-text" id="basic-addon1">名字</span>
</div>
<input type="text" id="keyboard" class="form-control" maxlength=4 placeholder="默认为DFJK">
<input type="text" id="username" class="form-control" maxlength=8 placeholder="用于纪录排行(特殊字符会被过滤)">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">留言</span>
</div>
<input type="text" id="message" class="form-control" maxlength=50 placeholder="禁广告/脏话(本项可不填)">
</div>
<button type="button" class="btn btn-secondary btn-lg" onclick="show_btn();save_cookie();">完成</button>
</div>
Expand Down
6 changes: 4 additions & 2 deletions static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,18 +404,22 @@
w.show_btn = function() {
document.getElementById("btn_group").style.display = "block"
document.getElementById("setting").style.display = "none"
document.getElementById("desc").style.display = "block"
}

w.show_setting = function() {
document.getElementById("btn_group").style.display = "none"
document.getElementById("setting").style.display = "block"
document.getElementById("desc").style.display = "none"
}

w.save_cookie = function() {
cookie('username', document.getElementById("username").value, 100);
cookie('message', document.getElementById("message").value, 100);
cookie('keyboard', document.getElementById("keyboard").value, 100);
initSetting();
let title=document.getElementById("title").value;
document.getElementsByTagName("title")[0].innerText = title?title:"吃掉小鹿乃";
}

w.isnull = function(val) {
Expand Down Expand Up @@ -499,6 +503,4 @@
}`;
})
}

console.log("不修改,好嘛?乱传又有什么用呢?(ˉ▽ˉ;)...");
}) (window);

0 comments on commit 1daaf7b

Please sign in to comment.