tools/en.html

175 lines
7.4 KiB
HTML
Raw Normal View History

2022-12-28 10:30:18 +00:00
<!DOCTYPE html>
<html lang="en">
2022-12-28 10:30:18 +00:00
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>IanTools</title>
<!-- Bootstrap -->
2023-02-03 17:02:28 +00:00
<link href="https://cdn.gh.ink/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
2022-12-28 10:30:18 +00:00
<!-- Favicon -->
2023-05-18 06:46:08 +00:00
<link rel="icon" href="https://2-cdn.ianxia.com/images/avatar/common.png" type="image/png">
2023-02-03 17:02:28 +00:00
<script src="https://cdn.gh.ink/js/vue/2.6.14/vue.min.js"></script>
<script src="https://cdn.gh.ink/js/axios/1.1.3/axios.min.js"></script>
2022-12-28 10:30:18 +00:00
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Language
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
2024-10-10 02:54:25 +00:00
<a class="dropdown-item" href="zh.html"><b>简体中文</b></a>
2022-12-28 10:30:18 +00:00
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="https://www.ianxia.com">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://blog.ianxia.com">Blog (In Chinese)</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="https://tools.ianxia.com">Tools</a>
</li>
</ul>
</div>
</nav>
<section>
<div class="jumbotron text-center mt-2">
<div class="container">
<div class="row">
<div class="col-12">
<h1>Tools</h1>
</div>
</div>
</div>
</div>
</section>
<div class="container" id="app">
<span v-html="body"></span>
</div>
<br>
<hr>
<script>
2024-10-10 02:54:25 +00:00
let language = "en";
2022-12-28 10:30:18 +00:00
new Vue({
el: '#app',
data: {
body: "<center><h1>Loading...</h1></center>"
},
mounted () {
let me = this;
axios
.get('list.json')
.then(function (response) {
let body = '';
for (let i=0;i<response.data.length;i+=3) {
body += `<div class="row text-center">`;
for (let j=0;i+j<response.data.length && j<3;j++) {
body += `
<div class="col-md-4 pb-1 pb-md-0">
<div class="card">
<div class="card-body">
<h5 class="card-title">`+response.data[i+j].name[language]+`</h5>
<p class="card-subtitle"><span class="badge badge-success">`+response.data[i+j].category[language]+`</span></p>
<p class="card-text mr-auto">`+response.data[i+j].description[language]+`</p>
<a href="`+response.data[i+j].path+`/`+language+`.html" class="btn btn-primary" target="_blank">Go</a>
</div>
</div>
</div>
`;
}
body += `</div><br>`;
}
me.body = body;
})
.catch(function (error) {
console.log(error);
});
}
})
let date = new Date();
</script>
<footer class="text-center">
<div class="container">
<div class="row">
<div class="col-12">
<p style="color: #516069"><strong>Copyright © Ian Xia <script>document.write(date.getFullYear().toString());</script> All rights reserved</strong></p>
</div>
</div>
</div>
</footer>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
2023-02-03 17:02:28 +00:00
<script src="https://cdn.gh.ink/js/jquery/jquery-3.6.0.min.js"></script>
2022-12-28 10:30:18 +00:00
<!-- Grey Filter Detector -->
<script>
$.ajax({
type: "GET",
2024-10-17 01:56:46 +00:00
url: "https://api.gh.ink/grey_filter",
2022-12-28 10:30:18 +00:00
dataType: "json",
success: function(data, textStatus){
2022-12-29 07:00:26 +00:00
for (let i=0;i<data["content"]["accurate_slot"].length;i++) {
2022-12-28 10:30:18 +00:00
// Accurate Slot
2022-12-29 07:00:26 +00:00
if (Date.now()/1000 >= data["content"]["accurate_slot"][i][0] && Date.now()/1000 <= data["content"]["accurate_slot"][i][1]) {
2022-12-28 10:30:18 +00:00
$("html").css({
'-webkit-filter': 'grayscale(100%)',
'-moz-filter': 'grayscale(100%)',
'-ms-filter': 'grayscale(100%)',
'-o-filter': 'grayscale(100%)',
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
'_filter': 'none'
});
break;
}
}
2022-12-29 07:00:26 +00:00
for (let i=0;i<data["content"]["day_slot"].length;i++) {
2022-12-28 10:30:18 +00:00
// Day Slot
let begin = new Date(
date.getFullYear().toString() + "-" +
2022-12-29 07:00:26 +00:00
data["content"]["day_slot"][i][0][0].toString() + "-" +
data["content"]["day_slot"][i][0][1].toString() + " " +
data["content"]["day_slot"][i][0][2].toString() + ":" +
data["content"]["day_slot"][i][0][3].toString() + ":" +
data["content"]["day_slot"][i][0][4].toString()
2022-12-28 10:30:18 +00:00
)
let end = new Date(
date.getFullYear().toString() + "-" +
2022-12-29 07:00:26 +00:00
data["content"]["day_slot"][i][1][0].toString() + "-" +
data["content"]["day_slot"][i][1][1].toString() + " " +
data["content"]["day_slot"][i][1][2].toString() + ":" +
data["content"]["day_slot"][i][1][3].toString() + ":" +
data["content"]["day_slot"][i][1][4].toString()
2022-12-28 10:30:18 +00:00
)
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
$("html").css({
'-webkit-filter': 'grayscale(100%)',
'-moz-filter': 'grayscale(100%)',
'-ms-filter': 'grayscale(100%)',
'-o-filter': 'grayscale(100%)',
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
'_filter': 'none'
});
break;
}
}
}
});
</script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
2023-02-03 17:02:28 +00:00
<script src="https://cdn.gh.ink/js/popper/1.16.1/popper.min.js"></script>
<script src="https://cdn.gh.ink/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
2022-12-28 10:30:18 +00:00
</body>
</html>