<div id="content">
    {% if act == 'delete' %}
        <div class=title>{{lang.edm_t_d_t}}</div>
        <div class=mess><form method="POST">
            <input type="hidden" value="{{csrf}}" name="csrf">
            {{lang.edm_t_d_m}}<br>
            <input type="submit" name="ok" value="{{lang.w_next}}">
        </form></div><a href="?" class="link"><span class="icon"><i class="fas fa-arrow-left"></i></span> {{lang.back}}</a>
    {% elseif act == 'edit' %}
        <div class=title>{{lang.edm_t_create2}}</div>
        <div class=mess><form method="POST">
         <input type="hidden" value="{{csrf}}" name="csrf">
         {{lang.edm_t_name}}: <br>
         <input type="text" name="name" value="{{page.name}}"><br>
         {{lang.edm_t_link}}: <br>
         <input type="text" name="link" value="{{page.link}}"><br>
         {{lang.edm_t_icon}}: <br>
         <input type="text" name="icon" value="{{page.icon}}"><br>
         {{lang.edm_t_count}}: <br>
         <input type="text" name="count" value="{{page.count_table}}" placeholder="{{lang.w_empty}}"><br>
         <input type="submit" name="ok" value="{{lang.w_save_b}}">
        </form></div>
        <a href="?" class="link"><span class="icon"><i class="fas fa-arrow-left"></i></span> {{lang.back}}</a>
        <a href="?act=delete&id={{page.id}}" class="link"><span class="icon"><i class="fas fa-folder-minus"></i></span> {{lang.edm_t_delete}}</a>
    {% elseif act == 'create' %}
        <div class=title>{{lang.edm_t_create2}}</div>
        <div class=mess><form method="POST">
         <input type="hidden" value="{{csrf}}" name="csrf">
         {{lang.edm_t_name}}: <br>
         <input type="text" name="name" value=""><br>
         {{lang.edm_t_link}}: <br>
         <input type="text" name="link"><br>
         {{lang.edm_t_icon}}: <br>
         <input type="text" name="icon" value="empty"><br>
         {{lang.edm_t_count}}: <br>
         <input type="text" name="count" value="" placeholder="{{lang.w_empty}}"><br>
         <input type="submit" name="ok" value="{{lang.W_create}}">
        </form></div>
        <a href="?" class="link"><span class="icon"><i class="fas fa-arrow-left"></i></span> {{lang.back}}</a>
    {% else %}
        <div class="title">Выберите пункт для редактирования меню</div>
        {% for mm in menu %}
        <div id="{{mm.id}}">
           <a href="?act=edit&id={{mm.id}}" class="link"><span class="icon"><i class="fas fa-{{mm.icon}}"></i></span> {{mm.name}} <span class=c>{{mm.id}}</span></a>
        </div>
        {% endfor %}
        <a href="?act=create" class="link"><span class="icon"><i class="fas fa-folder-plus"></i></span> {{lang.edm_t_create}}</a>
    {% endif %}
</div>