2024-05-21 12:59:04 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en" class="h-full bg-white">
|
|
|
|
{% include "head.html" %}
|
|
|
|
<body class="h-full">
|
|
|
|
|
|
|
|
<div class="h-full">
|
|
|
|
{% set current_page = "documents" %}
|
|
|
|
{% include "components/sidebar.html" %}
|
|
|
|
|
|
|
|
<main class="pl-72 bg-gray-50 h-full">
|
2024-06-03 14:56:15 +00:00
|
|
|
<form action="/documents/edit/{{ document.id }}" method="POST" class="h-full flex flex-col">
|
|
|
|
<div class="py-1 px-1 gap-x-1 flex flex-row justify-center align-middle bg-accent text-accent-content">
|
|
|
|
<input type="text" id="title" name="title" class="grow font-bold" value="{{ document.title }}" />
|
|
|
|
<a class="btn btn-sm my-auto" href="/documents">
|
|
|
|
{{ "arrow-left"|heroicon("w-6 h-6")|safe }} Exit
|
|
|
|
</a>
|
|
|
|
<button class="btn btn-sm my-auto">Save</button>
|
2024-05-21 12:59:04 +00:00
|
|
|
</div>
|
|
|
|
|
2024-06-03 14:56:15 +00:00
|
|
|
<div class="flex flex-col h-full">
|
|
|
|
<div id="editor-{{ document.id }}" name="editor" class="w-full h-full">
|
|
|
|
<noscript>
|
|
|
|
<textarea id="content-{{ document.id }}" name="content" class="w-full h-full">{{ document.content }}</textarea>
|
|
|
|
</noscript>
|
|
|
|
</div>
|
2024-05-21 12:59:04 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="/static/main.js"></script>
|
|
|
|
<script type="text/javascript">
|
2024-06-03 14:56:15 +00:00
|
|
|
window.makeEditor("#editor-{{document.id}}", {{ document.content | tojson }});
|
2024-05-21 12:59:04 +00:00
|
|
|
</script>
|
2024-06-03 14:56:15 +00:00
|
|
|
|
2024-05-21 12:59:04 +00:00
|
|
|
</body>
|
|
|
|
</html>
|