crablog/templates/admin/panel.html

120 lines
4.3 KiB
HTML
Raw Normal View History

2019-04-21 16:14:37 +04:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="/statics/admin.css">
<title>Admin Panel</title>
</head>
<body>
2019-04-21 16:14:37 +04:00
<header class="admin">
<section class="container">
<img src="/statics/cloud.png" alt="" class="logo">
<nav>
<a href="">Dashboard</a>
<a href="">Articles</a>
<a href="">User Management</a>
<a href="">Site Setting</a>
</nav>
{{ admin.username }}
</section>
</header>
<section class="content">
<section class="container">
2019-04-21 16:14:37 +04:00
<section class="box">
<header>
Articles
<span><a href="/admin/article/new">new article</a></span>
</header>
<section class="body">
<table class="articles">
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>URL</th>
<th>Published Time</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% for article in articles %}
<tr>
<td>{{ article.id }}</td>
<td>
{% if article.published == false %}
DRAW
{% endif %}
{{ article.title }}
</td>
<td>{{ article.url }}</td>
<td>{{ article.publish_at | date(format="%B %d, %Y") }}</td>
<td class="action">
<a href="/admin/article/{{ article.id }}">EDIT</a>
<form action="/admin/article/delete/{{ article.id }}" method="POST">
<input type="hidden" name="_method" value="DELETE">
<button>DELETE</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
</section>
2018-10-24 07:48:36 +04:00
2019-04-21 16:14:37 +04:00
<section class="box">
<header>
Change Password
</header>
<section class="body">
<form action="/admin/password" method="post">
2018-10-24 07:48:36 +04:00
2019-04-21 16:14:37 +04:00
<input type="password" name="password" placeholder="new password" required>
2018-10-24 07:48:36 +04:00
2019-04-21 16:14:37 +04:00
<button>change</button>
</form>
</section>
</section>
<section class="box">
<header>
Change setting
</header>
<section class="body">
<form action="/admin/setting" method="post">
Site Title:
<input type="hidden" name="name" value="title" required>
<input type="text" name="value" placeholder="value" value="{{ setting.title }}" required>
<button>change</button>
</form>
<form action="/admin/setting" method="post">
Description:
<input type="hidden" name="name" value="description" required>
<input type="text" name="value" placeholder="value" value="{{ setting.description }}" required>
<button>change</button>
</form>
<form action="/admin/setting" method="post">
URL:
<input type="hidden" name="name" value="url" required>
<input type="text" name="value" placeholder="value" value="{{ setting.url }}" required>
<button>change</button>
</form>
<form action="/admin/setting" method="post">
Analysis:
<input type="hidden" name="name" value="analysis" required>
<input type="text" name="value" placeholder="value" value="{{ setting.analysis }}" required>
2019-04-21 16:14:37 +04:00
<button>change</button>
</form>
</section>
</section>
2018-10-24 07:48:36 +04:00
2019-04-21 16:14:37 +04:00
</section>
2019-04-21 16:14:37 +04:00
</section>
2019-04-21 16:14:37 +04:00
</body>
</html>