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

{% block css %}
{% include  'edit-tools/css/dropzone' %}
<link href="/static/vendors/bootstrap/css/bootstrap.min.css" rel="stylesheet">


<link href="/static/vendors/highlight/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="/static/vendors/quills/quill.snow.css" rel="stylesheet" />
<link href="/static/vendors/quills/resize.css" rel="stylesheet" />
{% endblock %}

{% block body %}

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

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

{% set bloc = header %}

{% include 'themes/'+config.theme+'/header.html' ignore missing %}
{% if bloc is defined %}
<button class="btn btn-danger btn-xl  pull-right"
	id="close-edit-{{bloc.name}}"
	onclick="hideBtn()"
	hx-get="{% if page %}/{{ page }}{% endif %}/view/{{ bloc.name }}"
	hx-swap="outerHTML"
	hx-target="#{{ bloc.name }}" > X </button>


<button class="btn btn-success btn-xl btn-modify 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 %}


{% 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-danger  pull-right"
		id="close-edit-{{bloc.name}}"
		style="margin-top:-4rem; position:relative; z-index:999; margin-right:1rem; visibility: hidden;"
		onclick="enableModBtn()"
		hx-get="{% if page %}/{{ page }}{% endif %}/view/{{ bloc.name }}"
		hx-swap="outerHTML"
		hx-target="#{{ bloc.name }}" > X </button>


	<button class="btn btn-success btn-xl btn-modify 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' %} 
{% set bloc = footer %}
{% include 'themes/'+config.theme+'/blocs/footer.html' ignore missing %}
{% if bloc.name %}
<button class="btn btn-danger btn-xl  pull-right"
	id="close-edit-{{bloc.name}}"
	onclick="enableModBtn()"
	hx-get="{% if page %}/{{ page }}{% endif %}/view/{{ bloc.name }}"
	hx-swap="outerHTML"
	hx-target="#{{ bloc.name }}" > X </button>


<button class="btn btn-success btn-xl btn-modify 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 %}
{% endblock %}

{% block js %}
<script>
</script>
<!-- Include the Quill library -->
<!-- Bootstrap core JavaScript -->
<script src="/static/vendors/jquery/jquery.min.js"></script>
<script src="/static/vendors/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- Plugin JavaScript -->
<script src="/static/vendors/jquery-easing/jquery.easing.min.js"></script>
<script src="/static/vendors/scrollreveal/scrollreveal.min.js"></script>
<script src="/static/vendors/magnific-popup/jquery.magnific-popup.min.js"></script>
<script src="/static/vendors/htmx/htmx.min.js"></script>

<script src="/static/vendors/highlight/highlight.min.js"></script>

<script src="/static/vendors/quills/quill.js"></script>
<script src="/static/vendors/quills/resize.js"></script>


<script src="/static/js/prism.js"></script>

{% endblock %}

