blogs.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {% extends "tables/editor_table.html" %}
  2. {% block table_body %}
  3. {% for idx in range(0, length) %}
  4. <tbody>
  5. <tr>
  6. <td class="table__data">{{ idx }}</td>
  7. <td class="table__data">{{ blogs[idx].title }}</td>
  8. <td class="table__data">1</td>
  9. <td class="table__data">on</td>
  10. <td>
  11. <div class="d-flex justify-content-center">
  12. <a class="m-1 btn__edit" href="{{ url_for('editor.editor', url=blogs[idx].url) }}"><i class="fas fa-edit"></i></a>
  13. <form action="{{ url_for('blogs.remove', url=blogs[idx].url) }}" method="POST" class="m-1 inline_block">
  14. <button class="btn__delete" type="submit" value="delete"><i class="fas fa-trash-alt"></i></button>
  15. </form>
  16. </div>
  17. </td>
  18. </tr>
  19. </tbody>
  20. {% endfor %}
  21. {% endblock table_body %}
  22. {% block modal_body %}
  23. <form action="{{ url_for('blogs.create') }}" method="POST" enctype="multipart/form-data">
  24. <div class="form-group">
  25. {{ form.title.label(class="form-control-label modal__label mb-1") }}
  26. {{ form.title(class="form-control form-control-lg") }}
  27. {{ form.image.label(class="form-control-label modal__label mt-3 mb-1") }}
  28. {{ form.image(class="form-control form-control-lg modal__file") }}
  29. {{ form.categories.label(class="form-control-label modal__label mt-3 mb-1") }}
  30. {{ form.categories(class="form-control form-control-lg") }}
  31. </div>
  32. <div class="modal-footer pb-0 border-0">
  33. <button type="button" class="btn btn__cancel" data-dismiss="modal">取消</button>
  34. <input class="btn btn__submitadd" type="submit" value="完成">
  35. </div>
  36. </form>
  37. {% endblock modal_body %}