This commit is contained in:
limqhz
2022-05-11 22:47:44 +08:00
parent 03d805641a
commit 4eadfe16f3
30 changed files with 2252 additions and 119 deletions

View File

@@ -68,7 +68,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -131,7 +131,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -93,7 +93,7 @@
<input type="hidden" name="userAvatar" th:value="${session.loginUser.getAvatar()}">
<input type="hidden" id="topicId" name="topicId" th:value="${blog.getBid()}">
<div class="form-group">
<textarea name="content" class="form-control" rows="3" required></textarea>
<input name="content" class="form-control" rows="3" required />
</div>
<button type="submit" onclick="this.disabled=true; this.form.submit();" class="btn btn-primary float-right">提交评论</button>
</form>
@@ -125,7 +125,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -68,7 +68,7 @@
</main>
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -3,7 +3,7 @@
<footer class="container" th:fragment="footer">
<footer class="my-5 text-muted text-center text-smal">
<p class="mb-1">©QUINN</p><a class="btn btn-default" target="_blank" href = 'https://beian.miit.gov.cn'>浙ICP备2020031991号</a>
<p class="badge badge-pill badge-light">©QUINN</p><a class="badge badge-pill badge-light text-decoration-none" target="_blank" href = 'https://beian.miit.gov.cn'>浙ICP备2020031991号</a>
</footer>
</footer>
</html>

View File

@@ -97,7 +97,7 @@
</main>
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -8,16 +8,14 @@
<link rel="stylesheet" th:href="@{/css/login.css}">
</head>
<body class="text-center">
<form class="form-signin" th:action="@{/login}" method="post">
<form class="form-signin needs-validation" th:action="@{/login}" method="post">
<img class="mb-4" th:src="@{/images/logo/logo.png}" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">登录</h1>
<input name="username" class="form-control" placeholder="用户名" required="">
<input type="password" name="password" class="form-control" placeholder="密码" required="">
<div class="checkbox mb-3">
<div class="checkbox float-left mb-3">
<label>
<input type="checkbox" name="remember" value="remember-me"> 记住密码
</label>
@@ -29,9 +27,13 @@
<a th:href="@{/register}" class="float-right">没有账号?去注册</a>
</p>
<p class="mt-5 mb-3 text-muted">©QUINN</p>
<p class="badge badge-pill badge-light">©QUINN</p>
</form>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>
<script th:src="@{/js/jquery-ui.min.js}"></script>
<script th:src="@{/live/js/addlive2d.js}"></script>
</body>
</html>

View File

@@ -43,7 +43,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -7,7 +7,7 @@
<link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
<style>
#maxLength {
max-width: 500px;
max-width: 720px;
white-space: nowrap; /* 不换行 */
overflow: hidden; /* 超出部分不显示 */
text-overflow: ellipsis; /* 超出部分显示为... */
@@ -19,54 +19,51 @@
<div th:replace="~{common/header::header(activeUrl='blog')}"></div>
<main role="main" class="container">
<div class="row">
<div class="col-md-12 blog-main">
<div class="my-3 p-3 bg-white rounded shadow-sm">
<div th:fragment="user_table_refresh" th:id="id_user_table_refresh" >
<h6 class="border-bottom border-gray pb-2 mb-0">
论坛累计:
<span th:text="${pageParam.getTotal()}"></span>
</h6>
<div th:each="star:${starList}" class="media text-muted pt-1">
<p class="media-body pb-1 mb-0 small lh-125 border-bottom border-gray" style="margin-left: 5px">
<!-- 标题 -->
<a th:text="${star.getTopicName()}"
th:href="@{${star.getTopicCategory()=='BLOG'?'/blog/read/':'/source/view/'} + ${star.getTopicId()}}"
class="text-dark font-weight-bold text-decoration-none d-block">
</a>
<!-- 类型 -->
<span th:text="${star.getTopicCategory()=='BLOG'?'论坛':'资源'}"
th:class="${star.getTopicCategory()=='BLOG'?'badge badge-success':'badge badge-primary'}">
</span>
<!-- 时间 -->
<span th:text="${#dates.format(star.getGmtCreate(),'yyyy-MM-dd HH:mm:ss')}"
class="float-right">
</span>
</p>
</div>
<!--分页-->
<nav aria-label="Page navigation example" class="mt-4">
<ul class="pagination justify-content-center pagination-sm">
<li th:class="${pageParam.hasPrevious()==true?'page-item':'page-item disabled'}">
<a class="page-link" href="javascript:navChange(-1);" tabindex="">Previous</a>
</li>
<li class="page-item" th:if="${pageParam.hasPrevious()}">
<a class="page-link" href="javascript:navChange(-1);" th:text="${pageParam.getCurrent()-1}"></a>
</li>
<li class="page-item active">
<a id = "current" class="page-link" href="javascript:navChange(0);" th:text="${pageParam.getCurrent()}"></a>
</li>
<li class="page-item" th:if="${pageParam.hasNext()}">
<a class="page-link" href="javascript:navChange(1);" th:text="${pageParam.getCurrent()+1}"></a>
</li>
<li th:class="${pageParam.hasNext()==true?'page-item':'page-item disabled'}">
<a class="page-link" href="javascript:navChange(1);">Next</a>
</li>
</ul>
</nav>
<div class="my-3 p-3 bg-white rounded shadow-sm">
<div th:fragment="user_table_refresh" th:id="id_user_table_refresh">
<input id="findWhat" type="hidden" th:value="${findWhat}">
<h6 class="border-bottom border-gray pb-2 mt-1">
搜索结果:
<span th:text="${pageParam.getTotal()}"></span>
</h6>
<div th:each="find:${findList}" class="media-body small pl-2 border-bottom border-gray pb-2 pt-2">
<!-- 标题 -->
<!-- 类型 -->
<span th:text="${find.getCategory()=='BLOG'?'论坛':'资源'}"
th:class="${find.getCategory()=='BLOG'?'badge badge-success':'badge badge-primary'}">
</span>
<a class="sTitle text-dark font-weight-bold text-decoration-none"
th:href="@{${find.getCategory()=='BLOG'?'/blog/read/':'/source/view/'} + ${find.getTopicId()}}">
[[${find.getTopicName()}]]
</a>
<!-- 时间 -->
<p class="float-right" th:text="${#dates.format(find.getGmtCreate(),'yyyy-MM-dd HH:mm:ss')}">
</p>
<div class="small">
<span id="maxLength" class="sContent d-block" th:text="${find.getContentText()}">
</span>
</div>
</div>
<!--分页-->
<nav aria-label="Page navigation example" class="mt-4">
<ul class="pagination justify-content-center pagination-sm">
<li th:class="${pageParam.hasPrevious()==true?'page-item':'page-item disabled'}">
<a class="page-link" href="javascript:navChange(-1);" tabindex="">Previous</a>
</li>
<li class="page-item" th:if="${pageParam.hasPrevious()}">
<a class="page-link" href="javascript:navChange(-1);" th:text="${pageParam.getCurrent()-1}"></a>
</li>
<li class="page-item active">
<a id = "current" class="page-link" href="javascript:navChange(0);" th:text="${pageParam.getCurrent()}"></a>
</li>
<li class="page-item" th:if="${pageParam.hasNext()}">
<a class="page-link" href="javascript:navChange(1);" th:text="${pageParam.getCurrent()+1}"></a>
</li>
<li th:class="${pageParam.hasNext()==true?'page-item':'page-item disabled'}">
<a class="page-link" href="javascript:navChange(1);">Next</a>
</li>
</ul>
</nav>
</div>
</div>
</main>
@@ -74,26 +71,53 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>
<script th:src="@{/js/jquery-ui.min.js}"></script>
<script th:src="@{/live/js/addlive2d.js}"></script>
<script type="text/javascript">
function navChange(page){
var current = $('#current').text();
var pageNum = parseInt(current) + page;
$.ajax({
url: "/blog",
async: false,
type: "post",
data: {"pageNum": pageNum, "limit": 10},
success: function (data) {
$('#id_s_table_refresh').html(data);
}
/**
* 高亮显示搜索串
*/
function highLine(){
const searchStr = $('#findWhat').val();
const reg = new RegExp(searchStr,'g');
let newStr = '';
let label = '';
$('.sTitle').each(function(){
label = $(this).html();
newStr = label.replace(reg,'<span style="color: red">' + searchStr + '</span>');
$(this).html(newStr);
});
$('.sContent').each(function(){
label = $(this).html();
newStr = label.replace(reg,'<span style="color: red">' + searchStr + '</span>');
$(this).html(newStr);
});
}
function navChange(page){
var findWhat = $('#findWhat').val()
var current = $('#current').text()
var pageNum = parseInt(current) + page
$.ajax({
url: "/search",
async: false,
type: "post",
data: {"findWhat":findWhat,"pageNum": pageNum, "limit": 20},
success: function (data) {
$('#id_user_table_refresh').html(data);
highLine();
}
})
}
</script>
<script type="text/javascript">
$(function(){
highLine();
});
</script>
</body>
</html>

View File

@@ -27,7 +27,7 @@
</div>
</div>
<div class="col-md-12 mb-3">
<button type="submit" class="btn btn-primary btn-sm btn-block">发布公告</button>
<button type="submit" class="btn btn-primary btn-block">发布公告</button>
</div>
</form>
</div>
@@ -36,7 +36,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -9,26 +9,27 @@
</head>
<body class="text-center">
<form class="form-signin" th:action="@{/register}" method="post">
<form class="form-signin needs-validation" th:action="@{/register}" method="post">
<img class="mb-4" th:src="@{/images/logo/logo.png}" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">注册</h1>
<p th:text="${registerMsg}" style="color: red"></p>
<input type="text" name="username" class="form-control mb-2" placeholder="用户名" required="">
<input type="password" name="password" class="form-control" placeholder="密码" required="">
<input type="text" name="username" class="form-control mb-2" placeholder="用户名" pattern="[a-zA-Z0-9]+" required=true>
<input type="password" name="password" class="form-control" placeholder="密码" required=true>
<input type="password" name="repassword" class="form-control" placeholder="确认密码" required="">
<input type="text" name="code" class="form-control" placeholder="邀请码" required="">
<input type="text" name="code" class="form-control" placeholder="邀请码" required=true>
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit" onclick="this.disabled=true; this.form.submit();">注 册</button>
<p class="clearfix">
<a th:href="@{/toLogin}" class="float-right">已有账号?去登录</a>
</p>
<p class="mt-5 mb-3 text-muted">©QUINN</p>
<p class="badge badge-pill badge-light">©QUINN</p>
</form>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>
<script th:src="@{/js/jquery-ui.min.js}"></script>
<script th:src="@{/live/js/addlive2d.js}"></script>
</body>
</html>

View File

@@ -93,7 +93,7 @@
</main>
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -48,7 +48,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -27,7 +27,7 @@
<span th:text="${pageParam.getAllTotal()}"></span>
</h6>
<div th:fragment="s_table_refresh" th:id="id_s_table_refresh">
<div th:each="source:${sourceList}" class="media pt-3 border-bottom border-gray">
<div th:each="source:${sourceList}" class="media pt-2 border-bottom border-gray">
<div class="media-body small pl-2">
<!-- 标题 -->
<a th:href="@{'/source/view/'+${source.getSid()}}"
@@ -122,7 +122,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -86,7 +86,7 @@
</div>
</main>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -63,7 +63,7 @@
<input type="hidden" name="userAvatar" th:value="${session.loginUser.getAvatar()}">
<input type="hidden" id="topicId" name="topicId" th:value="${source.getSid()}">
<div class="form-group">
<textarea name="content" class="form-control" rows="3" required></textarea>
<input name="content" class="form-control" rows="3" required />
</div>
<button type="submit" onclick="this.disabled=true; this.form.submit();" class="btn btn-primary float-right">提交评论</button>
</form>
@@ -95,7 +95,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -171,7 +171,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -86,7 +86,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -106,7 +106,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

View File

@@ -107,7 +107,7 @@
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</a>
<a class="to-top badge badge-light">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>