Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
hieunotes authored Oct 6, 2024
1 parent 4d6ccfd commit 9db4214
Showing 1 changed file with 83 additions and 112 deletions.
195 changes: 83 additions & 112 deletions lcd/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<!--01/06/2024
SỬA CODE HIỂN THỊ LÀ HTML THAY VÌ JSON
TĂNG TỐC ĐỘ TẢI TRANG WEB
OPEN SOURCE
-->
<!-- 10/05/2024 -->

<!DOCTYPE html>
<html lang="vi">
Expand Down Expand Up @@ -33,21 +26,31 @@
<meta property="twitter:description" content="Cập nhật lịch tạm ngừng cung cấp điện Điện lực Tây Ninh mới nhất." />
<meta property="twitter:image" content="//s6.imgcdn.dev/W5WJC.png" />

<!-- Favicon -->
<link href="https://hieunotes.blogspot.com/favicon.ico" rel="icon" type="image/x-icon">

<!-- Meta Tags Generated with //metatags.io -->



<!-- Font -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">

<link rel="stylesheet" href="../fw/bootstrap.min.css">
<!-- CSS Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">

<style>

html, body {
height:100%;
}
.search-result {
<style>
* {
font-family: "Be Vietnam Pro", sans-serif;
}
body, html {
height: 100%; /* Chiều cao đầy đủ cho body và html */
margin: 0; /* Xóa margin mặc định */
}
/*search-result {
margin: 20px;
}

*/
.result-tbl {
overflow-x: auto;
}
Expand All @@ -72,6 +75,7 @@
tbody tr:nth-child(even) {
background-color: rgba(255, 255, 255, 0.1);
}

.form-control:focus {
border-color: #28a745;
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
Expand All @@ -83,7 +87,6 @@
padding: 10px;
border: 1px solid #f5c6cb;
border-radius: 5px;
margin: 10px;
}

.notification .ttl {
Expand All @@ -98,93 +101,98 @@
.notification .time {
font-size: 0.9em;
}
</style>

.colorfull {
animation: Color 4s linear infinite;
-webkit-animation: Color 4s ease-in-out infinite;
text-shadow: 1px 2px #F0F0F0;
}

@keyframes Color {
0% { color: #A0D468; }
20% { color: #4FC1E9; }
40% { color: #FFCE54; }
60% { color: #FC6E51; }
80% { color: #ED5565; }
100% { color: #AC92EC; }
}

</style>
</head>
<body>


<!--- LOGO --->
<header class="text-center pt-2">

<img src="../img/avatar_nobg.png" style="width: 80px" alt="hieunotes" class="col-md-4 img-fluid border rounded-circle shadow shadow-sm">
<br>
<b class="fs-3">Hieunotes</b>

<p class="text-secondary">Lịch Cúp Điện Tây Ninh</p>

<header class="p-3 fs-5 bg-light shadow-sm">
<span class="d-inline">
<b style="color: #0a1bb3;">
<a href="/" class="text-decoration-none" style="color: #0a1bb3;">Hieunotes</a>
</b>
<span class="text-secondary">Lịch Cúp Điện Tây Ninh</span>
</span>
</header>

<div class="container-lg">

<section class="pt-5 text-center">
<b>CHỌN KHU VỰC CỦA BẠN</b>
<div class="pt-1 d-flex d-flex justify-content-center">
<select class="form-select form-select-md border-primary" style="width: auto" id="select">
<option value='01' selected>TP. Tây Ninh</option>
<option value='02'>Gò Dầu</option>
<option value='03'>Trảng Bàng</option>
<option value='04'>Tân Châu</option>
<option value='05'>Châu Thành</option>
<option value='06'>Dương Minh Châu</option>
<option value='07'>Tân Biên</option>
<option value='08'>Hòa Thành</option>
<option value='09'>Bến Cầu</option>
</select>
</div>
</section>

<main role="main">

<section class="text-center">
</div>

<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 6H13V10.079L16.3413 7.73938L17.4885 9.37768L13.7434 12L17.4885 14.6223L16.3413 16.2606L13 13.921V18H11V13.921L7.65864 16.2606L6.51148 14.6223L10.2565 12L6.51147 9.37769L7.65863 7.73938L11 10.079V6Z" fill="currentColor" /></svg>

<p>Vui lòng chọn khu vực:</p>

<div class="d-flex justify-content-center">
<select class="form-select form-select-lg" style="width: 15rem" id="select">
<option value='01' selected>TP. Tây Ninh</option>
<option value='02'>Gò Dầu</option>
<option value='03'>Trảng Bàng</option>
<option value='04'>Tân Châu</option>
<option value='05'>Châu Thành</option>
<option value='06'>Dương Minh Châu</option>
<option value='07'>Tân Biên</option>
<option value='08'>Hòa Thành</option>
<option value='09'>Bến Cầu</option>
</select>
</div>
</section>

<div class="container-xl">
<!-- DIV của tạo ảnh-->
<div id="elementToCapture">
<div id="elementToCapture">
<!-- DIV của tạo ảnh-->


<!-- KHU VỰC TABLE LỊCH CÚP ĐIỆN -->
<section class="pt-3">
<div class="d-flex justify-content-center">
<button class="btn btn-light btn-sm fw-bold border border-primary" id="captureButton">TÂY NINH KÝ SỰ (tayninhkysu.com)
</button>
</div>
<section class="mt-3">

<div class="p-3">Điện lực: <b id="khuvuc"></b></div>

<div id="ketqua"></div>


<p class="pt-2 text-center text-danger">Gọi ngay tổng đài hỗ trợ điện lực tại số<br><b>1900 1006</b> hoặc <b>1900 9000</b></p>
<p class="pt-4 text-center text-danger">Gọi ngay tổng đài hỗ trợ điện lực tại số<br><b>1900 1006</b> hoặc <b>1900 9000</b></p>

<div class="d-flex justify-content-center">
<button class="btn btn-light btn-sm fw-bold border" id="captureButton">TÂY NINH KÝ SỰ (tayninhkysu.com)
</button>
</div>

</section>

<!-- DIV của tạo ảnh-->
</div>
<!-- DIV của tạo ảnh -->

<section class="p-3 col-12 col-md-6 mx-auto">
<h3 class="fw-bold">Tra cứu theo mã khách hàng</h3>

<div class="input-group mb-3">
<input type="text" class="form-control text-success" id="maKH" placeholder="Nhập mã khách hàng...">
<span class="input-group-text btn btn-success" id="tracuu_maKH">TRA CỨU</span>
</div>
</div>

<div id="ketqua_maKH"></div>


</section>
</main>
<hr>
<footer class="text-center">
<hr/>
<footer class="text-center mt-2 colorfull">
<p>
2024 by <strong>Harry Dang</strong></p>

2024 <strong>Harry Dang</strong></p>
</footer>
<img src="https://blogger.googleusercontent.com/img/a/AVvXsEiXPAkeegFeLjQy-OPVkS8KmdKgJ8cxVzVgOLAxlSxWSK-8pjmLq6fbrFmurSHe2QLrCR0nt-CoHIqd3nr2dd1_WnmPAg9c77QDLqCscleLElPxBABiOa1OOeCDm2yfSxCfM0NyyXoajd6VGCYXFWBDyruR6QB3iKkowRIEfwj0jgAlChzmce4VcKaB1E8=s711" class="img-fluid mx-auto d-block" style="width:20rem " alt="Hieunotes Lịch Cúp Điện Tây Ninh">



<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>

<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<script async="async" defer="defer" src="fw/html2canvas.min.js"></script>

<script>

Expand Down Expand Up @@ -218,45 +226,8 @@ <h3 class="fw-bold">Tra cứu theo mã khách hàng</h3>
});
}


// Sử dụng sự kiện change để kiểm tra khi giá trị thay đổi
// Gán sự kiện click cho nút
$('#tracuu_maKH').click(function() {
// Lấy giá trị của #maKH
const maKH = $('#maKH').val();

// Kiểm tra nếu giá trị maKH rỗng
if (!maKH) {
$('#ketqua_maKH').text('Không có mã khách hàng. Điện lực miền nam bắt đầu bằng mã "PB"');
return; // Dừng việc thực hiện tiếp theo nếu giá trị rỗng
}

// Tạo URL mới dựa trên giá trị mới của #maKH
const url = 'https://tracuulichcupdien.hns.workers.dev/?mkh=' + maKH;

// Gọi AJAX khi người dùng nhấn vào nút
$.ajax({
url: url,
method: 'GET',
dataType: 'html',
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0'
},
success: function(data) {
$('#ketqua_maKH').html(data);
},
error: function() {
$('#ketqua_maKH').text('ERROR');
}
});
});

})
</script>


<script async="async" defer="defer" src="../fw/html2canvas.min.js"></script>
<script>
document.getElementById('captureButton').addEventListener('click', function() {


Expand Down

1 comment on commit 9db4214

@vercel
Copy link

@vercel vercel bot commented on 9db4214 Oct 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.