mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-04 16:11:38 +08:00
70 lines
1.9 KiB
HTML
70 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<%- include("./component/header.html"); %>
|
|
<style>
|
|
.main {
|
|
width: 96vw !important;
|
|
max-width: initial !important;
|
|
}
|
|
|
|
#book-table {
|
|
width: 100%;
|
|
margin-top: 30px;
|
|
line-height: 2.3em;
|
|
}
|
|
|
|
table, tr, th, td {
|
|
border: 1px solid black;
|
|
}
|
|
|
|
tr:hover {
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
tr a {
|
|
cursor: pointer;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<%- include("./component/navbar.html"); %>
|
|
<main class="main">
|
|
<h1><%= title %></h1>
|
|
<div id="container">
|
|
<% if ( pageTemplate != "" ) { %>
|
|
<!-- 引入对应页面渲染配置 -->
|
|
<%- include(pageTemplate); %>
|
|
<% } %>
|
|
<input id="searchInput" type="text" />
|
|
<input id="searchButton" type="button" value="搜索" />
|
|
<table id="book-table"></table>
|
|
</div>
|
|
</main>
|
|
<%- include("./component/footer.html"); %>
|
|
|
|
<!-- 获取参数 -->
|
|
<script src="/assets/javascripts/getParams.js"></script>
|
|
<!-- 渲染表格 -->
|
|
<script src="/assets/javascripts/renderTable.js"></script>
|
|
<script>
|
|
var requestParams = getParams();
|
|
var searchbox = document.getElementById("searchInput");
|
|
var keyword = (requestParams["keyword"] || "").trim();
|
|
searchbox.value = keyword;
|
|
search({
|
|
tableElementId: "book-table",
|
|
searchText: null,
|
|
categoryId: null
|
|
});
|
|
|
|
$("#searchButton").click(function () {
|
|
search({
|
|
tableElementId: "book-table",
|
|
searchText: $("#searchInput").val(),
|
|
categoryId: null
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |