Files
quinn-bbc/src/main/resources/templates/blog/write.html

85 lines
3.5 KiB
HTML

<!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="@{/wangedit/css/wang.style.css}"/>
<style>
.nav-underline .nav-link {
padding-top: .75rem;
padding-bottom: .75rem;
font-size: .875rem;
color: #6c757d;
}
</style>
</head>
<body style="background: #f2f2f2;">
<!-- 导航栏 -->
<div th:replace="~{common/header::header(activeUrl='blog')}"></div>
<main role="main" class="container mt-3 p-3 bg-white rounded">
<div class="row">
<div class="col-md-12 blog-main">
<div class="col-md-12 order-md-1">
<h4 class="mb-3">发布文章</h4>
<form 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()}">
<input type="hidden" name="authorAvatar" th:value="${session.loginUser.getAvatar()}">
<div class="row">
<div class="col-md-10 mb-3">
<label for="firstName">文章标题</label>
<input type="text" name="title" class="form-control" id="firstName" value="" required>
</div>
<div class="col-md-2 mb-3">
<label for="country">文章标签</label>
<select name="categoryId" class="custom-select d-block w-100" id="country">
<option th:each="category:${categoryList}"
th:value="${category.getId()}" th:text="${category.getCategory()}">
</option>
</select>
</div>
<div class="col-md-12 mb-3">
<p>文章内容</p>
<div id="blog-content">
<div id="editor-toolbar"></div>
<div id="editor-text-area" style="height: 400px;border: 1px solid lightgrey"></div>
<textarea id="content-textarea" name="content" style="display: none;"></textarea>
<textarea id="contentText-textarea" name="contentJson" style="display: none;"></textarea>
</div>
</div>
</div>
<button class="btn btn-primary btn-lg btn-block" type="submit" onclick="this.disabled=true; this.form.submit();" >发布文章</button>
</form>
</div>
</div>
</div>
</main>
<div th:replace="~{common/footer::footer}"></div>
<a class="to-top">返回顶部</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 th:src="@{/wangedit/js/wang.min.js}"></script>
<script th:src="@{/wangedit/js/wang.init.js}"></script>
<script th:src="@{/layer/layer.js}"></script>
<script th:src="@{/js/axios.js}"></script>
</body>
</html>