1
0
Fork 0
EnglishPal/app/templates/admin_index.html

113 lines
3.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
</head>
<body class="container" style="width: 800px; margin: auto; margin-top:24px;">
<nav class="navbar navbar-expand-lg bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">你好 {{ username }}</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/logout">退出登录</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="card" style="margin-top:24px;">
<h5>重置选中用户密码</h5>
<form action="" method="post" class="container mb-3">
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">用户</label>
<select
id="username"
name="username"
class="form-select"
aria-label="Default select example">
<option selected>选择用户</option>
{% for user in user_list %}
<option value="{{ user['name'] }}">{{ user['name'] }}</option>
{% endfor %}
</select>
</div>
<input type="submit" value="重置密码为123456" class="btn btn-primary">
</form>
</div>
<div class="card" style="margin-top:24px;">
{% if tips %}
<div class="alert alert-success" role="alert">
{{ tips }}
</div>
{% endif %}
<div class="card-content">
<h5>录入文章</h5>
<form action="" method="post" class="container mb-3">
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">文章内容</label>
<textarea
id="content"
name="content"
class="form-control"
placeholder="请输入文章内容"
></textarea>
<label for="exampleInputEmail1" class="form-label">文章来源</label>
<textarea
id="source"
name="source"
class="form-control"
placeholder="请输入来源"
></textarea>
<label for="exampleInputEmail1" class="form-label">文章问题</label>
<textarea
id="question"
name="question"
class="form-control"
placeholder="请输入问题"
></textarea>
</div>
<input type="submit" value="保存" class="btn btn-primary">
</form>
</div>
</div>
<div class="card" style="margin-top:24px;">
<h5>文章列表</h5>
<div class="list-group">
{% for text in text_list %}
<div class="list-group-item list-group-item-action" aria-current="true">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">{{ text['source'] }}</h5>
<small>Date:{{ text['date'] }} Level:{{ text['level'] }}</small>
</div>
<p class="mb-1">{{ text['text'] }}</p>
</div>
{% endfor %}
</div>
</div>
</body>
</html>