2021-04-10 22:19:05 +02:00
|
|
|
{% extends "dash/_frame.twig" %}
|
|
|
|
{#
|
2022-05-12 02:41:56 +02:00
|
|
|
if page is in 'edit' mode, set variables
|
|
|
|
if not, just make them empty
|
|
|
|
#}
|
2021-04-10 22:19:05 +02:00
|
|
|
{% if mode == 'edit' %}
|
2022-05-10 23:13:31 +02:00
|
|
|
{% set id = page['id'] %}
|
|
|
|
{% set uuid = page['uuid'] %}
|
2022-04-23 20:28:20 +02:00
|
|
|
{% set slug = page['slug'] %}
|
|
|
|
{% set layout = page['layout'] %}
|
2022-05-10 23:13:31 +02:00
|
|
|
{% set feature = page['feature'] %}
|
2022-05-11 03:05:41 +02:00
|
|
|
{% set title = page['title'] %}
|
2022-05-10 23:13:31 +02:00
|
|
|
{% set tags = page['tags'] %}
|
|
|
|
{% set content = page['content'] %}
|
2022-04-23 20:28:20 +02:00
|
|
|
{% set date = page['created'] %}
|
|
|
|
{% set updated = page['updated'] %}
|
|
|
|
{% set media = page['media'] %}
|
|
|
|
{% set files = page['docs'] %}
|
2021-04-10 22:19:05 +02:00
|
|
|
{% else %}
|
2022-05-10 23:13:31 +02:00
|
|
|
{% set id = '' %}
|
|
|
|
{% set uuid = '' %}
|
2022-04-23 20:28:20 +02:00
|
|
|
{% set slug = '' %}
|
|
|
|
{% set layout = 'page' %}
|
2022-05-10 23:13:31 +02:00
|
|
|
{% set feature = '' %}
|
2022-04-23 20:28:20 +02:00
|
|
|
{% set title = '' %}
|
2022-05-10 23:13:31 +02:00
|
|
|
{% set tags = '' %}
|
|
|
|
{% set content = '' %}
|
2022-04-23 20:28:20 +02:00
|
|
|
{% set date = '' %}
|
|
|
|
{% set updated = '' %}
|
|
|
|
{% set media = '' %}
|
|
|
|
{% set files = '' %}
|
2021-04-10 22:19:05 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% block title %}
|
2022-04-23 20:28:20 +02:00
|
|
|
{{ title }}
|
2021-04-10 22:19:05 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block stylesheets %}
|
2023-03-23 21:55:34 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="/assets/css/dash/start.css?=vdthg">
|
2022-05-10 23:13:31 +02:00
|
|
|
{% endblock %}
|
2021-04-10 22:19:05 +02:00
|
|
|
|
2022-05-10 23:13:31 +02:00
|
|
|
{% block mainContent %}
|
2023-03-23 21:55:34 +01:00
|
|
|
<section data-index="{{ id }}" data-uuid="{{ uuid }}" data-slug="{{ slug }}" data-layout="{{ layout }}" role="file-manager">
|
|
|
|
{% if page['feature'] == null %}
|
|
|
|
<div role="file-drop">
|
|
|
|
<label for="page-files-upload">DRAG AND DROP FILES OR CLICK TO SELECT</label>
|
|
|
|
</div>
|
|
|
|
<label role="list-title">IMAGES AND VIDEO</label>
|
|
|
|
<div role="page-images-list"></div>
|
|
|
|
<label role="list-title">FILES</label>
|
|
|
|
<div role="page-files-list"></div>
|
|
|
|
{% else %}
|
|
|
|
<div role="file-drop">
|
|
|
|
<label for="page-files-upload">DRAG AND DROP FILES OR CLICK TO SELECT</label>
|
|
|
|
</div>
|
|
|
|
<label role="list-title">IMAGES AND VIDEO</label>
|
|
|
|
<div role="page-images-list">
|
|
|
|
{% if media|length > 1 %}
|
|
|
|
{% for item in media %}
|
|
|
|
{% set fileName = item.file|split('/') %}
|
|
|
|
{% if item.type == "mp4" %}
|
2022-04-23 20:28:20 +02:00
|
|
|
|
2023-03-23 21:55:34 +01:00
|
|
|
<div id="{{ loop.index0 }}" class="video-item" data-source="{{ item.file }}">
|
|
|
|
<video>
|
|
|
|
<source src="{{ item.file }}"/>
|
|
|
|
</video>
|
|
|
|
<button id="{{ loop.index0 }}" class="media-remove">
|
|
|
|
<i class="ti ti-x"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div id="{{ loop.index0 }}" class="img-item" data-source="{{ item.file }}" style="background: url({{ item.file }}) no-repeat center center / cover">
|
|
|
|
<button id="{{ loop.index0 }}" class="media-remove">
|
|
|
|
<i class="ti ti-x"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2022-05-10 23:13:31 +02:00
|
|
|
{% else %}
|
2023-03-23 21:55:34 +01:00
|
|
|
{% if media[0] != '' %}
|
|
|
|
{% set fileName = media[0].file|split('/') %}
|
|
|
|
{% if media[0].type == "mp4" %}
|
|
|
|
<div id="0" class="video-item" data-source="{{ media[0].file }}">
|
|
|
|
<button id="{{ loop.index0 }}" class="media-remove">X</button>
|
2022-05-10 23:13:31 +02:00
|
|
|
</div>
|
2022-04-23 20:28:20 +02:00
|
|
|
|
2023-03-23 21:55:34 +01:00
|
|
|
{% else %}
|
|
|
|
<div id="0" class="img-item" data-source="{{ media[0].file }}" style="background: url({{ media[0].file }}) no-repeat center center / cover">
|
|
|
|
<button id="{{ loop.index0 }}" class="media-remove">
|
|
|
|
<i class="ti ti-x"></i>
|
|
|
|
</button>
|
2022-05-10 23:13:31 +02:00
|
|
|
</div>
|
2023-03-23 21:55:34 +01:00
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<label role="list-title">FILES</label>
|
|
|
|
<div role="page-files-list">
|
|
|
|
{% if files|length > 1 %}
|
|
|
|
{% for item in files %}
|
|
|
|
{% set fileName = item.file|split('/') %}
|
|
|
|
{% if item.type == "mp3" %}
|
|
|
|
<div id="{{ loop.index0 }}" class="audio-item" data-source="{{ item.file }}">
|
|
|
|
<audio controls>
|
|
|
|
<source src="{{ item.file }}"/>
|
|
|
|
</audio>
|
|
|
|
<button id="{{ loop.index0 }}" class="media-remove">
|
|
|
|
<i class="ti ti-x"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div id="{{ loop.index0 }}" class="file-item" data-source="{{ item.file }}">
|
|
|
|
<a href="{{ item.file }}" target="_blank">{{ fileName[6] }}"</a>
|
|
|
|
<button id="{{ loop.index0 }}" class="media-remove">
|
|
|
|
<i class="ti ti-x"></i>
|
|
|
|
</button>
|
2022-05-10 23:13:31 +02:00
|
|
|
</div>
|
2023-03-23 21:55:34 +01:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
|
|
{% if files[0] != '' %}
|
|
|
|
{% set fileName = files[0].file|split('/') %}
|
|
|
|
{% if files[0].type == "mp3" %}
|
|
|
|
<div id="0" class="audio-item" data-source="{{ files[0].file }}">
|
|
|
|
<audio controls>
|
|
|
|
<source src="{{ files[0].file }}"/>
|
|
|
|
</audio>
|
|
|
|
<button id="{{ loop.index0 }}" class="media-remove">
|
|
|
|
<i class="ti ti-x"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div id="0" class="file-item" data-source="{{ files[0].file }}">
|
|
|
|
<a href="{{ item.file }}" target="_blank">{{ fileName[6] }}"</a>
|
|
|
|
<button id="{{ loop.index0 }}" class="media-remove">
|
|
|
|
<i class="ti ti-x"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% else %}
|
2022-03-14 01:46:42 +01:00
|
|
|
|
2023-03-23 21:55:34 +01:00
|
|
|
{% endif %}
|
2022-05-10 23:13:31 +02:00
|
|
|
{% endif %}
|
2021-04-10 22:19:05 +02:00
|
|
|
|
2022-05-10 23:13:31 +02:00
|
|
|
</div>
|
2023-03-23 21:55:34 +01:00
|
|
|
{% endif %}
|
|
|
|
</section>
|
|
|
|
<section role="page-meta">
|
|
|
|
<div role="page-meta-wrapper">
|
|
|
|
<div role="page-title">
|
|
|
|
<strong>TITLE</strong>
|
|
|
|
<textarea id="post-title-text" type="text" name="post-title-text" class="post-edit" placeholder="TITLE">{{ title }}</textarea>
|
|
|
|
</div>
|
|
|
|
<div role="page-tags">
|
|
|
|
<strong>TAGS</strong>
|
|
|
|
<textarea id="post-tags" type="text" name="post-tags" class="form-control" placeholder="tags [comma seperated]">{{ tags }}</textarea>
|
|
|
|
</div>
|
|
|
|
<div role="page-layouts">
|
|
|
|
<strong>LAYOUTS</strong>
|
|
|
|
<select id="page-templates">
|
|
|
|
{% for view in views %}
|
|
|
|
{% if view == page['layout'] %}
|
|
|
|
<option value={{ view }} selected>{{ view }}</option>
|
|
|
|
{% else %}
|
|
|
|
<option value={{ view }}>{{ view }}</option>
|
|
|
|
{% endif %}
|
2022-04-23 20:28:20 +02:00
|
|
|
|
2023-03-23 21:55:34 +01:00
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div role="page-options">
|
|
|
|
<strong>OPTIONS</strong>
|
|
|
|
{% apply spaceless %}
|
|
|
|
{{ include("dash/partials/options.twig") }}
|
|
|
|
{% endapply %}
|
|
|
|
</div>
|
|
|
|
<div role="page-updated">
|
|
|
|
<strong>UPDATED</strong>
|
|
|
|
<span id="post-date" type="text">
|
|
|
|
{{ updated }}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div role="page-created">
|
|
|
|
<strong>CREATED</strong>
|
|
|
|
<span id="post-date" type="text">
|
|
|
|
{{ date }}
|
|
|
|
</span>
|
|
|
|
<input id="page-files-upload" type="file" name="page-files-upload" multiple/>
|
|
|
|
<input id="post-image-upload" type="file" name="post-image-upload"/>
|
|
|
|
<input id="form_token" name="token" type="hidden" value="{{ token }}"></div>
|
2022-04-23 20:28:20 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-03-23 21:55:34 +01:00
|
|
|
</section>
|
|
|
|
<section role="text-editor">
|
|
|
|
{% apply spaceless %}
|
|
|
|
{{ include("dash/partials/editor.twig") }}
|
|
|
|
{% endapply %}
|
|
|
|
<div role="edit-post-wrapper">
|
|
|
|
<textarea id="edit" spellcheck="false">{{ content }}</textarea>
|
|
|
|
<pre id="highlight">
|
|
|
|
<code id="highlight-content" class="language-md"></code>
|
|
|
|
</pre>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{% endblock %}
|