2024-07-02 17:38:41 +08:00
|
|
|
<!DOCTYPE html>
|
2023-12-18 15:29:58 +01:00
|
|
|
<html>
|
2024-07-02 17:38:41 +08:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<title>{{title}}</title>
|
|
|
|
<link
|
|
|
|
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
|
|
|
|
rel="stylesheet"
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
href="https://unpkg.com/bootstrap-table@1.22.1/dist/bootstrap-table.min.css"
|
|
|
|
rel="stylesheet"
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
href="https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.0/dist/extensions/sticky-header/bootstrap-table-sticky-header.css"
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
|
|
|
|
rel="stylesheet"
|
|
|
|
/>
|
|
|
|
<style>
|
|
|
|
.text-toggle,
|
|
|
|
.full-text {
|
|
|
|
cursor: pointer;
|
2024-07-02 17:38:41 +08:00
|
|
|
}
|
2024-07-02 17:38:41 +08:00
|
|
|
th:nth-child(1),
|
|
|
|
td:nth-child(1) {
|
|
|
|
width: 5%;
|
|
|
|
}
|
|
|
|
th:nth-child(2),
|
|
|
|
td:nth-child(2),
|
|
|
|
th:nth-child(3),
|
|
|
|
td:nth-child(3) {
|
|
|
|
width: 30%;
|
|
|
|
}
|
|
|
|
th,
|
|
|
|
td {
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
h2 {
|
|
|
|
margin-top: 10px;
|
|
|
|
}
|
|
|
|
.copy-link-icon {
|
|
|
|
font-size: 20px;
|
|
|
|
margin-left: 10px;
|
|
|
|
color: #8f8f97;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
.copy-link-icon:hover {
|
|
|
|
color: #282b2c;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container-fluid">{{table}}</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
|
<script src="https://unpkg.com/bootstrap-table@1.22.1/dist/bootstrap-table.min.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.0/dist/extensions/sticky-header/bootstrap-table-sticky-header.min.js"></script>
|
|
|
|
<script>
|
|
|
|
$(window).on("load", function () {
|
|
|
|
var hash = window.location.hash;
|
|
|
|
if (hash) {
|
|
|
|
setTimeout(function () {
|
|
|
|
$("html, body").animate(
|
|
|
|
{ scrollTop: $(hash).offset().top },
|
|
|
|
100
|
|
|
|
);
|
|
|
|
}, 100);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
|
|
scrollToHashLocation();
|
|
|
|
setupTextToggles();
|
|
|
|
setupEventHandlers();
|
|
|
|
});
|
|
|
|
|
|
|
|
function setupEventHandlers() {
|
|
|
|
$(window).on("load", scrollToHashLocation);
|
|
|
|
$("body").on("click", ".toggle-link", toggleText);
|
|
|
|
}
|
|
|
|
|
|
|
|
function scrollToHashLocation() {
|
|
|
|
const hash = window.location.hash;
|
|
|
|
if (hash) {
|
|
|
|
setTimeout(() => {
|
|
|
|
$("html, body").animate(
|
|
|
|
{ scrollTop: $(hash).offset().top },
|
|
|
|
100
|
|
|
|
);
|
|
|
|
}, 100);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function copyPermalink(anchorId) {
|
|
|
|
const fullUrl = `${window.location.origin}${window.location.pathname}${anchorId}`;
|
|
|
|
history.pushState(null, null, anchorId);
|
|
|
|
navigator.clipboard.writeText(fullUrl);
|
|
|
|
scrollToHashLocation();
|
|
|
|
}
|
|
|
|
|
|
|
|
function toggleText(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
const link = $(this),
|
|
|
|
textSpan = link.siblings(".full-text"),
|
|
|
|
toggleSpan = link.siblings(".text-toggle");
|
|
|
|
const visible = textSpan.is(":visible");
|
|
|
|
link.text(visible ? "Show More" : "Show Less");
|
|
|
|
textSpan.toggle();
|
|
|
|
toggleSpan.toggle();
|
|
|
|
}
|
|
|
|
|
|
|
|
function setupTextToggles() {
|
|
|
|
$("table.table td").each(function () {
|
|
|
|
var cell = $(this);
|
|
|
|
if (cell.text().length > 100) {
|
|
|
|
var originalText = cell.text();
|
|
|
|
var displayText =
|
|
|
|
originalText.substring(0, 100) + "...";
|
|
|
|
cell.html(
|
|
|
|
`<span class="text-toggle">${displayText}</span><span class="full-text" style="display: none;">${originalText}</span><a href="#" class="toggle-link">Show More</a>`
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
2023-12-18 15:29:58 +01:00
|
|
|
</html>
|