master
kek7198 2021-12-02 21:30:54 -06:00
parent 13cc16594b
commit 9427c42d1c
1 changed files with 4 additions and 4 deletions

View File

@ -2,9 +2,9 @@
<form id="post-edit-form-{{p.id}}" class="flex flex-col w-full" action="/edit_post/{{p.id}}" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input type="hidden" name="current_page" value="{{request.path}}">
<input name="title" class="shadow-inner rounded-lg p-2 bg-gray-900 focus:bg-white border border-gray-700 border-dashed text-gray-200 focus:text-gray-900 mb-2" required placeholder="title" value="{{p.title}}">
<div class="rounded-lg border border-gray-700 border-dashed bg-gray-900 shadow-inner w-full">
<textarea name="body" maxlength="10000" id="post-edit-box-{{p.id}}" form="post-edit-form-{{p.id}}" class="w-full rounded-t-md p-3 text-gray-200 focus:text-gray-900 bg-transparent focus:bg-white shadow-inner resize-y focus:outline-none" aria-label="With textarea" placeholder="Add text to your post..." rows="10">{{p.body}}</textarea>
<input name="title" class="form-input mb-2" required placeholder="title" value="{{p.title}}">
<div class="rounded border border-gray-300 border-dashed bg-white shadow-inner w-full">
<textarea name="body" maxlength="10000" id="post-edit-box-{{p.id}}" form="post-edit-form-{{p.id}}" class="form-input" aria-label="With textarea" placeholder="Add text to your post..." rows="10">{{p.body}}</textarea>
<ul class="-mt-1 flex space-x-4 px-3 py-2 border-t border-dashed border-white border-opacity-10">
<li>
<button type="button" class="text-gray-500 hover:text-gray-400" onclick="makeBold('post-edit-box-{{p.id}}')">
@ -40,7 +40,7 @@
<button type="button" class="px-4 py-2 text-sm font-bold text-gray-500 hover:text-gray-400" onclick="togglePostEdit('{{p.id}}')">
Cancel
</button>
<button form="post-edit-form-{{p.id}}" class="ml-2 block px-4 py-2 bg-gradient-to-t from-pink-800 to-pink-700 hover:from-pink-700 hover:to-pink-800 active:shadow-inner border border-gray-900 rounded-md text-shadow-t shadow-inset-t-white-10 text-sm font-bold text-gray-300 focus:text-gray-500 focus:outline-none">
<button form="post-edit-form-{{p.id}}" class="ml-2 btn btn-green">
Save edit
</button>
</div>