1、增加访问数量
2、主页的样式修改 3、头像自定义实现 4、注册修改为自动跳转到登录页面,登录失败友好提示,不进行跳转页面处理 5、博客增加私密的功能
This commit is contained in:
@@ -26,18 +26,18 @@
|
||||
<div class="col-md-12 order-md-1">
|
||||
<h4 class="mb-3">编辑论坛</h4>
|
||||
|
||||
<form class="needs-validation" th:action="@{/blog/editor}" method="post">
|
||||
<form id="editForm" class="needs-validation" th:action="@{/blog/editor}" method="post">
|
||||
<!-- 隐藏域 -->
|
||||
<input type="hidden" name="bid" th:value="${blog.getBid()}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10 mb-3">
|
||||
<label for="title">论坛标题</label>
|
||||
<input required th:value="${blog.getTitle()}" name="title" type="text" class="form-control" id="title">
|
||||
<input required th:value="${blog.getTitle()}" maxlength="30" name="title" type="text" class="form-control" id="title">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 mb-3">
|
||||
<label for="categoryId">标签</label>
|
||||
<label for="categoryId">权限</label>
|
||||
<select name="categoryId" class="custom-select d-block w-100" id="categoryId" required>
|
||||
<option th:each="category:${categoryList}"
|
||||
th:selected="${blog.getCategoryId() == category.getId()}"
|
||||
@@ -51,14 +51,14 @@
|
||||
<div id="blog-content">
|
||||
<div id="editor-toolbar"></div>
|
||||
<div id="editor-text-area" style="height: 600px;border: 1px solid lightgrey"></div>
|
||||
<textarea id="content-textarea" name="content" th:text="${blog.getContent()}" style="display: none;"></textarea>
|
||||
<textarea id="content-textarea" name="content" th:text="${blog.getContent()}" style="display: none;" minlength="30" required></textarea>
|
||||
<textarea id="contentText-textarea" name="contentJson" style="display: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary btn-lg btn-block" onclick="talkWith()" type="submit">提交修改</button>
|
||||
<button class="btn btn-primary btn-lg btn-block" onclick="talkWith()" type="button">提交修改</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -100,7 +100,7 @@
|
||||
return;
|
||||
}
|
||||
this.disabled = true;
|
||||
this.submit();
|
||||
$('#editForm').submit();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -25,11 +25,14 @@
|
||||
<div class="col-md-12 blog-main">
|
||||
|
||||
<div class="blog-post">
|
||||
<h2 class="blog-post-title" th:text="${blog.getTitle()}"></h2>
|
||||
<h2 class="blog-post-title">
|
||||
[[${blog.getTitle()}]]
|
||||
<small th:if="@{${session.loginUser} ? ${session.loginUser.getUid()==blog.getAuthorId()} : false}"
|
||||
style="font-size: 15px;" class="badge badge-pill badge-warning" th:text="${blog.getCategoryName()}">
|
||||
</small>
|
||||
</h2>
|
||||
<p class="blog-post-meta">
|
||||
<span th:text="${#dates.format(blog.getGmtUpdate(),'yyyy-MM-dd HH:mm:ss')}"></span>
|
||||
by
|
||||
<!-- <a href="#" th:text="${blog.getAuthorName()}"></a>-->
|
||||
<span>
|
||||
<svg class="bi bi-eye-fill" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="col-md-12 order-md-1">
|
||||
<h4 class="mb-3">发布文章</h4>
|
||||
|
||||
<form class="needs-validation" th:action="@{/blog/write}" method="post">
|
||||
<form id="editForm" class="needs-validation" th:action="@{/blog/write}" method="post">
|
||||
<!-- 隐藏域 -->
|
||||
<input type="hidden" name="authorId" th:value="${session.loginUser.getUid()}">
|
||||
<input type="hidden" name="authorName" th:value="${session.loginUser.getUsername()}">
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 mb-3">
|
||||
<label for="categoryId">文章标签</label>
|
||||
<label for="categoryId">权限</label>
|
||||
<select name="categoryId" class="custom-select d-block w-100" id="categoryId" required>
|
||||
<option th:each="category:${categoryList}"
|
||||
th:value="${category.getId()}" th:text="${category.getCategory()}">
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary btn-lg btn-block" type="submit" onclick="talkWith()" >发布文章</button>
|
||||
<button class="btn btn-primary btn-lg btn-block" type="button" onclick="talkWith()" >发布文章</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,12 +93,13 @@
|
||||
layer.open({ content: '请选择博客分类', skin: 'msg', time: 2 });
|
||||
return;
|
||||
}
|
||||
console.log(content.length < 30);
|
||||
if (content.length < 30){
|
||||
layer.open({ content: '内容过短!请多表达一点思想吧?', skin: 'msg', time: 2 });
|
||||
return;
|
||||
}
|
||||
this.disabled = true;
|
||||
this.submit();
|
||||
$('#editForm').submit();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -37,15 +37,14 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!--如果未登录-->
|
||||
<div>
|
||||
<form th:action="@{/search}" method="get">
|
||||
<ul class="navbar-nav mr-2">
|
||||
<ul class="navbar-nav">
|
||||
<li>
|
||||
<input class="mr-2" name="findWhat" type="text" placeholder="大佬想找什么呢?"/>
|
||||
<input class="mr-2 mt-2" name="findWhat" type="text" placeholder="大佬想找什么呢?"/>
|
||||
</li>
|
||||
<li>
|
||||
<button type="submit" class="btn btn-sm btn-primary mr-2">
|
||||
<button type="submit" class="btn btn-sm btn-primary mr-2 mt-2">
|
||||
全站搜索
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-search" viewBox="0 0 16 16">
|
||||
<path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/>
|
||||
@@ -57,8 +56,8 @@
|
||||
</div>
|
||||
|
||||
<!--如果未登录-->
|
||||
<div sec:authorize="!isAuthenticated()">
|
||||
<a class="btn btn-sm btn-primary" th:href="@{/toLogin}" role="button">
|
||||
<div class="mt-2" sec:authorize="!isAuthenticated()">
|
||||
<a class="btn btn-sm btn-primary mr-auto" th:href="@{/toLogin}" role="button">
|
||||
<svg class="bi bi-person-fill" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
|
||||
</svg>
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>注册-Quinn</title>
|
||||
<link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
|
||||
<link rel="stylesheet" th:href="@{/css/backgroud.css}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4" >
|
||||
</div>
|
||||
<div class="col-md-4 mt-5" id='login_box'>
|
||||
<form id="registerForm" class="form-horizontal was-validated" method="post" noValidate>
|
||||
<div class="justify-content-center">
|
||||
<h1>联系我们<small style="font-size: small">Quinn</small></h1>
|
||||
<p th:text="${loginMsg}"></p>
|
||||
</div>
|
||||
<p class="mt-1 clearfix">
|
||||
<a style="color: white" th:href="@{/toLogin}" class="float-right text-decoration-none">我记得密码!去登录</a>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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/jquery-ui.min.js}"></script>-->
|
||||
<!--<script th:src="@{/live/js/addlive2d.js}"></script>-->
|
||||
<script th:src="@{/layer/mobile/layer.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,98 +7,84 @@
|
||||
<link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
|
||||
<link rel="stylesheet" th:href="@{/css/backgroud.css}">
|
||||
</head>
|
||||
<style>
|
||||
#register{
|
||||
background: url(/images/menu/register.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 400px;
|
||||
}
|
||||
.inverted{
|
||||
background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAHklEQVQImWNkYGBgYGD4//8/A5wF5SBYyAr+//8PAPOCFO0Q2zq7AAAAAElFTkSuQmCC) repeat;text-shadow: 5px -5px black, 4px -4px white;font-weight: bold;-webkit-text-fill-color: transparent;-webkit-background-clip: text
|
||||
}
|
||||
.invertedContent p{
|
||||
background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAHklEQVQImWNkYGBgYGD4//8/A5wF5SBYyAr+//8PAPOCFO0Q2zq7AAAAAElFTkSuQmCC) repeat;text-shadow: 2px -2px black, 1px -1px white;font-weight: bold;-webkit-text-fill-color: transparent;-webkit-background-clip: text
|
||||
}
|
||||
#fastLink{
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
|
||||
<div th:replace="~{common/header::header(activeUrl='index.html')}"></div>
|
||||
<main role="main">
|
||||
<div class="container">
|
||||
<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
|
||||
<li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
|
||||
<li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item mt-5 active">
|
||||
<img th:src="@{/images/menu/menu1.png}" class="d-block w-100" alt="第一个">
|
||||
<!-- <div class="carousel-caption d-none d-md-block">-->
|
||||
<!-- <h5>First slide label</h5>-->
|
||||
<!-- <p>Some representative placeholder content for the first slide.</p>-->
|
||||
<!-- </div>-->
|
||||
<div class="container ">
|
||||
<div class="jumbotron jumbotron-fluid mt-5">
|
||||
<div class="container">
|
||||
<h1 class="display-3 inverted">Quinn</h1>
|
||||
<br/>
|
||||
<div class="lead invertedContent">
|
||||
<p>欢迎访问</p>
|
||||
<p><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-lightbulb-fill" viewBox="0 0 16 16">
|
||||
<path d="M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13h-5a.5.5 0 0 1-.46-.302l-.761-1.77a1.964 1.964 0 0 0-.453-.618A5.984 5.984 0 0 1 2 6zm3 8.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1-.5-.5z"/>
|
||||
</svg>
|
||||
Quinn 包含资源推荐,资源分享,论坛交流模块</p>
|
||||
<p>戳下方了解详情↓↓↓</p>
|
||||
</div>
|
||||
<div class="carousel-item mt-5">
|
||||
<img th:src="@{/images/menu/menu2.png}" class="d-block w-100" alt="第二个">
|
||||
</div>
|
||||
<div class="carousel-item mt-5">
|
||||
<img th:src="@{/images/menu/menu3.png}" class="d-block w-100" alt="第三个">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button class="carousel-control-prev" type="button" data-target="#carouselExampleCaptions" data-slide="prev">-->
|
||||
<!-- <span class="carousel-control-prev-icon" aria-hidden="true"></span>-->
|
||||
<!-- <span class="sr-only">Previous</span>-->
|
||||
<!-- </button>-->
|
||||
<!-- <button class="carousel-control-next" type="button" data-target="#carouselExampleCaptions" data-slide="next">-->
|
||||
<!-- <span class="carousel-control-next-icon" aria-hidden="true"></span>-->
|
||||
<!-- <span class="sr-only">Next</span>-->
|
||||
<!-- </button>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container mt-5">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<!-- <img th:src="@{/images/menu/3.png}" alt="一起去下载" width="320" height="200">-->
|
||||
<div class="caption">
|
||||
<a th:href="@{/blog}">
|
||||
<h3 class="btn btn-secondary">论坛
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-send-plus-fill" viewBox="0 0 16 16">
|
||||
<path d="M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855H.766l-.452.18a.5.5 0 0 0-.082.887l.41.26.001.002 4.995 3.178 1.59 2.498C8 14 8 13 8 12.5a4.5 4.5 0 0 1 5.026-4.47L15.964.686Zm-1.833 1.89L6.637 10.07l-.215-.338a.5.5 0 0 0-.154-.154l-.338-.215 7.494-7.494 1.178-.471-.47 1.178Z"/>
|
||||
<path d="M16 12.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Zm-3.5-2a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1a.5.5 0 0 0-.5-.5Z"/>
|
||||
</svg>
|
||||
</h3>
|
||||
</a>
|
||||
<p>提供一些系统的建议,或者问题,或者建议!问有所答,您的答案是我们的前进的动力!</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<div class="caption">
|
||||
<a th:href="@{/source}">
|
||||
<h3 class="btn btn-secondary">资源
|
||||
<div id="fastLink" class="row">
|
||||
<div class="col-md-1">
|
||||
<a th:href="@{/blog/read/1}" class="text-dark font-weight-bold text-decoration-none">
|
||||
<p class= "badge badge-pill badge-dark">注册说明
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-postcard-fill" viewBox="0 0 16 16">
|
||||
<path d="M11 8h2V6h-2v2Z"/>
|
||||
<path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm8.5.5a.5.5 0 0 0-1 0v7a.5.5 0 0 0 1 0v-7ZM2 5.5a.5.5 0 0 0 .5.5H6a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5ZM2.5 7a.5.5 0 0 0 0 1H6a.5.5 0 0 0 0-1H2.5ZM2 9.5a.5.5 0 0 0 .5.5H6a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5Zm8-4v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5Z"/>
|
||||
</svg>
|
||||
</h3>
|
||||
</p>
|
||||
</a>
|
||||
<p>提供玩家共享资源信息,打造整体更出色的游戏体验!</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<div class="caption">
|
||||
<a th:href="@{/hotspot}">
|
||||
<h3 class="btn btn-secondary">热点
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-thermometer-high" viewBox="0 0 16 16">
|
||||
<path d="M9.5 12.5a1.5 1.5 0 1 1-2-1.415V2.5a.5.5 0 0 1 1 0v8.585a1.5 1.5 0 0 1 1 1.415z"/>
|
||||
<path d="M5.5 2.5a2.5 2.5 0 0 1 5 0v7.55a3.5 3.5 0 1 1-5 0V2.5zM8 1a1.5 1.5 0 0 0-1.5 1.5v7.987l-.167.15a2.5 2.5 0 1 0 3.333 0l-.166-.15V2.5A1.5 1.5 0 0 0 8 1z"/>
|
||||
<div class="ml-2 col-md-1">
|
||||
<a th:href="@{/blog/read/2}" class="text-dark font-weight-bold text-decoration-none">
|
||||
<p class="badge badge-pill badge-success">网站建设
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-postcard-fill" viewBox="0 0 16 16">
|
||||
<path d="M11 8h2V6h-2v2Z"/>
|
||||
<path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm8.5.5a.5.5 0 0 0-1 0v7a.5.5 0 0 0 1 0v-7ZM2 5.5a.5.5 0 0 0 .5.5H6a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5ZM2.5 7a.5.5 0 0 0 0 1H6a.5.5 0 0 0 0-1H2.5ZM2 9.5a.5.5 0 0 0 .5.5H6a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5Zm8-4v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5Z"/>
|
||||
</svg>
|
||||
</h3>
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="ml-2 col-md-1">
|
||||
<a th:href="@{/blog/read/3}" class="text-dark font-weight-bold text-decoration-none">
|
||||
<p class="badge badge-pill badge-warning">建议反馈
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-postcard-fill" viewBox="0 0 16 16">
|
||||
<path d="M11 8h2V6h-2v2Z"/>
|
||||
<path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm8.5.5a.5.5 0 0 0-1 0v7a.5.5 0 0 0 1 0v-7ZM2 5.5a.5.5 0 0 0 .5.5H6a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5ZM2.5 7a.5.5 0 0 0 0 1H6a.5.5 0 0 0 0-1H2.5ZM2 9.5a.5.5 0 0 0 .5.5H6a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5Zm8-4v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5Z"/>
|
||||
</svg>
|
||||
</p>
|
||||
</a>
|
||||
<p>提供用户免费游戏资源,请各位玩家免费获取!分享心得!</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div id="register" class="mt-3">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div th:replace="~{common/footer::footer}"></div>
|
||||
<a class="to-top badge badge-light">返回顶部</a>
|
||||
<div class="to-top">
|
||||
<img class="d-block pl-2" src="/images/logo/qrcode.png" width="50" height="50">
|
||||
<a class="badge badge-light">返回顶部</a>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="col-md-4" >
|
||||
</div>
|
||||
<div class="col-md-4 mt-5" id='login_box'>
|
||||
<form class="form-horizontal" method="post" th:action="@{/login}" novalidate>
|
||||
<form id="loginForm" class="form-horizontal" method="post" th:action="@{/login}" novalidate>
|
||||
<div class="justify-content-center">
|
||||
<h1>登录<small style="font-size: small">Quinn</small></h1>
|
||||
</div>
|
||||
@@ -27,10 +27,10 @@
|
||||
</div>
|
||||
<div class="checkbox float-left mb-3">
|
||||
<label>
|
||||
<input type="checkbox" name="remember" value="remember-me"> 记住密码
|
||||
<input type="checkbox" name="remember-me"> 记住密码
|
||||
</label>
|
||||
</div>
|
||||
<button class="btn btn-dark btn-block" type="submit" onclick="loginSubmit()">登 录</button>
|
||||
<button class="btn btn-dark btn-block" type="button" onclick="loginSubmit()">登 录</button>
|
||||
<p class="mt-1 clearfix">
|
||||
<a style="color: white" th:href="@{/register}" class="float-right text-decoration-none">没有账号?去注册</a>
|
||||
</p>
|
||||
@@ -42,8 +42,6 @@
|
||||
</div>
|
||||
<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/jquery-ui.min.js}"></script>-->
|
||||
<!--<script th:src="@{/live/js/addlive2d.js}"></script>-->
|
||||
<script th:src="@{/layer/mobile/layer.js}"></script>
|
||||
<script type="text/javascript">
|
||||
function loginSubmit(){
|
||||
@@ -57,7 +55,25 @@
|
||||
layer.open({ content: '密码不能为空', skin: 'msg', time: 2 });
|
||||
return;
|
||||
}
|
||||
this.submit();
|
||||
if (username && password){
|
||||
$.ajax({
|
||||
url: "/checkLogin",
|
||||
async: false,
|
||||
type: "post",
|
||||
data: {"username":username,"password":password},
|
||||
success: function (data) {
|
||||
if(data == 'ok') {
|
||||
this.disabled = true;
|
||||
$('#loginForm').submit();
|
||||
}else {
|
||||
layer.open({ content: '用户名不存在或密码有误', skin: 'msg', time: 2 });
|
||||
}
|
||||
},
|
||||
fail: function (error){
|
||||
layer.open({ content: error, skin: 'msg', time: 2 });
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<main role="main">
|
||||
<div class="container">
|
||||
<div class="col-md-12 blog-main" style="margin-top: 20px">
|
||||
<form th:action="@{'/about'}" method="post">
|
||||
<form th:action="@{'/about/append'}" method="post">
|
||||
<div class="col-md-12 mb-3">
|
||||
<label>标题</label>
|
||||
<input type="text" name="title" class="form-control" value="" required>
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
<input id="email" type="text" name="email" class="form-control" placeholder="邮箱" pattern="^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="code">邀请码</label>
|
||||
<input id="code" type="text" name="code" class="form-control" placeholder="邀请码" required>
|
||||
<label for="code">注册码</label>
|
||||
<input id="code" type="text" name="code" class="form-control" placeholder="注册码" required>
|
||||
</div>
|
||||
<button class="btn btn-dark btn-block" type="button" onclick="javascript:registerSubmit();">注 册</button>
|
||||
<p class="mt-1 clearfix">
|
||||
@@ -52,7 +52,7 @@
|
||||
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
|
||||
<script th:src="@{/js/jquery-ui.min.js}"></script>
|
||||
<!--<script th:src="@{/live/js/addlive2d.js}"></script>-->
|
||||
<!--<script th:src="@{/layer/mobile/layer.js}"></script>-->
|
||||
<script th:src="@{/layer/mobile/layer.js}"></script>
|
||||
<script type="text/javascript">
|
||||
function registerSubmit(){
|
||||
let username = $('#username').val();
|
||||
@@ -86,12 +86,17 @@
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url: "/register",
|
||||
url: "/checkRegister",
|
||||
async: false,
|
||||
type: "post",
|
||||
data: {"username":username,"password":password,"repassword":repassword,"email":email,"code":code},
|
||||
success: function (data) {
|
||||
layer.open({ content: data, skin: 'msg', time: 2 });
|
||||
if(data == 'ok'){
|
||||
this.disabled = true;
|
||||
$('#registerForm').submit();
|
||||
}else {
|
||||
layer.open({ content: data, skin: 'msg', time: 2 });
|
||||
}
|
||||
},
|
||||
fail: function (error){
|
||||
layer.open({ content: error, skin: 'msg', time: 2 });
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<title>资源库-Quinn</title>
|
||||
<link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
|
||||
<link rel="stylesheet" th:href="@{/css/backgroud.css}">
|
||||
<link rel="stylesheet" th:href="@{/css/backgroud.css}">
|
||||
<style>
|
||||
#maxLength {
|
||||
max-width: 500px;
|
||||
@@ -26,15 +25,18 @@
|
||||
大佬需要什么资料请提交论坛或者关注公众号反馈。
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-3 text-center">
|
||||
<div class="row row-cols-md-3 text-center">
|
||||
<div class="col mb-3" th:each="source:${sourceList}">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<a class="text-dark font-weight-bold text-decoration-none" th:href="@{'/source/view/'+${source.getSid()}}">
|
||||
<h4 class="font-weight-normal d-inline">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-lightning-fill" viewBox="0 0 16 16">
|
||||
<path d="M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641l2.5-8.5z"/>
|
||||
</svg>
|
||||
[[${source.getSourceName()}]]
|
||||
</h4>
|
||||
<span class="badge badge-danger">
|
||||
<span class="badge badge-pill badge-warning">
|
||||
[[${source.getCategoryName()}]]
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -138,8 +138,8 @@
|
||||
<span th:text="${session.loginUser.getUsername()}"></span>
|
||||
<br>
|
||||
<small>
|
||||
<span th:if="${session.loginUser.getRole()=='ADMIN'}" class="badge badge-primary">超级管理员</span>
|
||||
<span th:if="${session.loginUser.getRole()!='ADMIN'}" th:class="${session.loginUser.getRole()=='VIP'?'badge badge-warning':'badge badge-success'}"
|
||||
<span th:if="${session.loginUser.getRole()=='KOBE'}" class="badge badge-primary">超级管理员</span>
|
||||
<span th:if="${session.loginUser.getRole()!='KOBE'}" th:class="${session.loginUser.getRole()=='VIP'?'badge badge-warning':'badge badge-success'}"
|
||||
th:text="${session.loginUser.getRole()=='VIP'?'VIP会员':'普通用户'}">
|
||||
</span>
|
||||
</small>
|
||||
|
||||
Reference in New Issue
Block a user