기능 추가
This commit is contained in:
33
templates/view.html
Normal file
33
templates/view.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h2>{{ title }}</h2>
|
||||
|
||||
<div class="card">
|
||||
{% if editable %}
|
||||
<form method="post">
|
||||
<textarea name="content" class="editor">{{ content }}</textarea>
|
||||
|
||||
<div class="actions-row" style="margin-top:16px;">
|
||||
<button type="submit">Save</button>
|
||||
<button type="button" onclick="history.back()">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<pre>{{ content }}</pre>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if not editable %}
|
||||
<div class="card actions-row">
|
||||
<button onclick="history.back()">Back</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user