java-web/examples/chapter03/tasks/参考实现/index.html
2024-10-13 11:35:20 +08:00

71 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chapter03 Example</title>
<!-- 引入 Bootstrap -->
<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.3/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
<style>
.card-img-top {
width: 100%;
height: 15vw;
object-fit: cover;
}
</style>
<script src="index.js"></script>
<!-- async-index.js 是使用异步函数的实现-->
<!-- <script src="async-index.js"></script>-->
</head>
<body>
<div class="container mt-8" id="top-post">
</div>
<div class="container mt-8 bg-light" id="posts">
</div>
<div class="container mb-5 bg-body-tertiary">
<!-- POST 请求表单 -->
<form class="mt-5" action="#">
<h2>发布新帖子</h2>
<div class="mb-3">
<label for="title" class="form-label">标题</label>
<input type="text" class="form-control" id="title" placeholder="输入帖子标题">
</div>
<div class="mb-3">
<label for="body" class="form-label">内容</label>
<textarea class="form-control" id="body" rows="3" placeholder="输入帖子内容"></textarea>
</div>
<div class="mb-3">
<label for="cover" class="form-label">封面图片</label>
<input type="text" class="form-control" id="cover" placeholder="image"/>
</div>
<div class="mb-3">
<label for="thumbnail" class="form-label">图片</label>
<input type="text" class="form-control" id="thumbnail" placeholder="image"/>
</div>
<div class="mb-3">
<label for="userId" class="form-label">用户ID</label>
<input type="text" class="form-control" id="userId" placeholder="输入用户id">
</div>
<button class="btn btn-primary" id="submit">发布</button>
</form>
</div>
<div class="container bg-body-secondary">
<div class="row">
<div class="col-12">
<p class="text-center">Copyright © 2024. All rights reserved.</p>
</div>
</div>
</div>
</body>
</html>