Browse Source

fix: auto adjust position, add animation

master
Dnomd343 3 years ago
parent
commit
55cc049b35
  1. 10
      README.md
  2. 10
      assets/css/main.css
  3. 2
      assets/css/main.min.css
  4. 6
      assets/js/main.js
  5. 2
      assets/js/main.min.js
  6. 108
      index.html

10
README.md

@ -299,6 +299,16 @@ Detail: 美国俄亥俄州哥伦布市DoD网络信息中心
数据库文件位于 `backend/qqwry.dat`,数据库更新脚本位于 `backend/qqwryUpdate.sh`,查询代码位于 `backend/qqwry.php`,数据解析服务位于 `backend/qqwryFormat/*`
Docker部署方式中,容器内已经预留了 `qqwry.dat` 的自动升级功能,每天00:00时会运行脚本拉取数据库更新。对于其他部署方式,可以配置 `crontab` 自动执行更新脚本,示例如下
```
# 打开crontab任务列表
shell> crontab -e
···
# 添加如下一行,表示每天00:00时自动运行指定脚本
0 0 * * * /var/www/echoIP/backend/qqwryUpdate.sh
```
## 许可证
MIT ©2021 [@dnomd343](https://github.com/dnomd343) [@ShevonKuan](https://github.com/ShevonKuan)

10
assets/css/main.css

@ -394,7 +394,8 @@ table td:not([align]) {
padding: .75rem
}
@media screen and (min-width:769px),
/* @media screen and (min-width:769px), */
@media all and (orientation : landscape),
print {
.column.is-6 {
-webkit-box-flex: 0;
@ -438,7 +439,8 @@ print {
align-items: center
}
@media screen and (min-width:769px),
/* @media screen and (min-width:769px), */
@media all and (orientation : landscape),
print {
.columns:not(.is-desktop) {
display: -webkit-box;
@ -828,11 +830,11 @@ body::-webkit-scrollbar-thumb {
}
}
@media only screen and (min-width:768px) and (max-width:1024px) and (orientation:portrait) {
/* @media only screen and (min-width:768px) and (max-width:1024px) and (orientation:portrait) {
.columns {
padding: 0 10%
}
}
} */
@font-face {
font-family: slick;

2
assets/css/main.min.css

File diff suppressed because one or more lines are too long

6
assets/js/main.js

@ -9,7 +9,7 @@ $(document).ready(function() {
$("input").val(getQuery("ip"));
getInfo();
}
$("table").hide();
$("#table").hide();
$("#share").hide();
$("button").click(function() {
$(this).css({
@ -17,7 +17,7 @@ $(document).ready(function() {
'background-color': ''
});
$(this).text("Searching...");
$("table").hide(1000);
$("#table").hide(500);
$("input").val(trim($("input").val()));
if ($("input").val() == '' || checkIP($("input").val()) == "ok") {
getInfo();
@ -118,7 +118,6 @@ function getInfo() {
$("input").val(data.ip);
}
$("button").text("Search");
$("table").show(1000);
$("#ip").text(data.ip);
data.city = (data.city == null) ? "Unknow" : data.city;
data.region = (data.region == null) ? "Unknow" : data.region;
@ -149,6 +148,7 @@ function getInfo() {
$("#loc").html('<a href="' + earthUri + '" target="_blank" title="View on Google Earth">' + data.loc + '</a>');
draw(parseFloat(data.loc.split(',')[0]), parseFloat(data.loc.split(',')[1]));
}
$("#table").show(500);
});
}

2
assets/js/main.min.js

File diff suppressed because one or more lines are too long

108
index.html

@ -48,6 +48,10 @@
color: #5165db;
}
.input {
background-color: rgba(255, 255, 255, 0.5);
}
.table {
color: #282828;
}
@ -76,14 +80,25 @@
.positioncontrol {
position: absolute;
left: calc(100vw*0.8 - 190px);
left: calc(80vw - 180px);
transform: translate(-20%, 0);
}
@media screen and (max-width: 600px) {
@media screen and (max-width: 800px) {
.positioncontrol {
position: absolute;
left: 0;
right: 0;
transform: translate(0, 0);
}
}
@media all and (orientation : portrait) {
.positioncontrol {
position: absolute;
left: 0;
right: 0;
transform: translate(0, 0);
}
}
@ -112,7 +127,6 @@
#qrcode canvas {
display: block;
}
</style>
<body>
@ -127,7 +141,7 @@
<div class="column">
<div class="field">
<div class="control">
<input type="text" placeholder="Search here." class="input is-medium" style="background-color: rgba(255, 255, 255, 0.5);">
<input type="text" placeholder="Search here." class="input is-medium">
</div>
</div>
</div>
@ -139,48 +153,50 @@
</div>
</div>
</div>
<table class="table" style="background-color: transparent;">
<tr>
<td>IP</td>
<td id="ip"></td>
</tr>
<tr>
<td>AS</td>
<td id="as"></td>
</tr>
<tr>
<td>City</td>
<td id="city"></td>
</tr>
<tr>
<td>Region</td>
<td id="region"></td>
</tr>
<tr>
<td>Country</td>
<td id="country"></td>
</tr>
<tr>
<td>Timezone</td>
<td id="timezone"></td>
</tr>
<tr>
<td>Location</td>
<td id="loc"></td>
</tr>
<tr>
<td>ISP</td>
<td id="isp"></td>
</tr>
<tr>
<td>Scope</td>
<td id="scope"></td>
</tr>
<tr>
<td>Detail</td>
<td id="detail"></td>
</tr>
</table>
<div id="table">
<table class="table" style="background-color: transparent;">
<tr>
<td>IP</td>
<td id="ip"></td>
</tr>
<tr>
<td>AS</td>
<td id="as"></td>
</tr>
<tr>
<td>City</td>
<td id="city"></td>
</tr>
<tr>
<td>Region</td>
<td id="region"></td>
</tr>
<tr>
<td>Country</td>
<td id="country"></td>
</tr>
<tr>
<td>Timezone</td>
<td id="timezone"></td>
</tr>
<tr>
<td>Location</td>
<td id="loc"></td>
</tr>
<tr>
<td>ISP</td>
<td id="isp"></td>
</tr>
<tr>
<td>Scope</td>
<td id="scope"></td>
</tr>
<tr>
<td>Detail</td>
<td id="detail"></td>
</tr>
</table>
</div>
</div>
</div>
<div id="share">

Loading…
Cancel
Save