{% extends 'index.html.tpl' %}

{% block css %}
{% include  'edit-tools/css/dropzone' %}
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css" rel="stylesheet">
<link href="/static/css/edit-toolbar.css" rel="stylesheet">

<link href="/static/css/prism.min.css" rel="stylesheet">
<!-- Include the highlight.js library -->
<link href="https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.snow.css" rel="stylesheet" />
{% endblock %}

{% block body %}

{% include 'themes/'+config.theme+'/_nav.html' %}
{% include 'admin/_menu-admin.html' %}

{% macro print_colors() %}
  {% endmacro %}

{% for bloc in myblocs.values() %}

{% if blocEdit == bloc.name %}

	{% include 'themes/'+config.theme+'/blocs/edit/_'+bloc.type+'.html' %}

{% else %}

	{% include 'themes/'+config.theme+'/blocs/_'+bloc.type+'.html' %}

	<button class="btn btn-success btn-xl pull-right"
		id="modify-{{ bloc.name }}"
		style="margin-top:-7rem; margin-right:1rem;"
		hx-get="{% if page %}/{{ page }}{% endif %}/edit/{{ bloc.name }}"
		hx-target="#{{bloc.name}}"
		hx-swap="oob"> Modifier </button>

{% endif %}
{% endfor %}
{% include '_flash_msgs.html' %} 

{% endblock %}

{% block js %}
<!-- Include the Quill library -->

<script src="/static/vendors/htmx/htmx.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/cpp.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.js"></script>

<script src="/static/js/prism.js"></script>
{% endblock %}
