Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Mailnews/admin.html
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
65 lines (62 sloc)
2.09 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> | |
<meta http-equiv="Pragma" content="no-cache" /> | |
<meta http-equiv="Expires" content="0" /> | |
<title>Admin Page</title> | |
</head> | |
<body> | |
<div> | |
<input value="{{push_time}}" placeholder="Push_time hh:mm:ss" id="time-input" /> | |
<button id="set-auto-btn">Set Push Time</button> | |
<button id="cancel-auto-btn">Cancel Push</button> | |
<button id="update-news-btn">Update news</button> | |
<button id="push-news-btn">Push News Now</button> | |
</div> | |
<div> | |
<h1>Subscriber List:</h1> | |
<table> | |
<tr> | |
<th>Name</th> | |
<th>Email</th> | |
<th>Action</th> | |
</tr> | |
{# jinja2 template #} | |
{% for p in subscriber_list %} | |
<tr> | |
<th>{{p['name']}}</th> | |
<th>{{p['email']}}</th> | |
<th><button id="{{loop.index - 1}}" class="del-btn-js">Remove</button></th> | |
</tr> | |
{% endfor %} | |
</table> | |
</div> | |
<div> | |
<input placeholder="Input Subscriber Name" id="name-input" /> | |
<input placeholder="Input Subscriber Email" id="email-input" /> | |
<button id="add-subscriber-btn">Add Subscriber</button> | |
</div> | |
<div> | |
<h1>Push News List:</h1> | |
<table border="1px"> | |
<tr> | |
<th>Title</th> | |
<th>Author</th> | |
<th>publishedAt</th> | |
</tr> | |
{# jinja2 template #} | |
{% for n in news_list %} | |
<tr> | |
<th><a href="{{n['url']}}" target="_blank">{{n['title']}}</a></th> | |
<th>{{n['author']}}</th> | |
<th>{{n['publishedAt']}}</th> | |
</tr> | |
{% endfor %} | |
</table> | |
</div> | |
</body> | |
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script> | |
<script src="/admin.js"></script> | |
</html> |