2021-04-10 22:19:05 +02:00
|
|
|
{% extends "dash/_frame.twig" %}
|
|
|
|
{#
|
|
|
|
if page is in 'edit' mode, set variables
|
|
|
|
if not, just make them empty
|
|
|
|
#}
|
|
|
|
{% if mode == 'edit' %}
|
|
|
|
{% set id = page['id'] %}
|
|
|
|
{% set uuid = page['uuid'] %}
|
|
|
|
{% set slug = page['slug'] %}
|
2021-04-14 00:20:57 +02:00
|
|
|
{% set layout = page['layout'] %}
|
2021-04-10 22:19:05 +02:00
|
|
|
{% set feature = page['feature'] %}
|
|
|
|
{% set _title = page['title'] %}
|
|
|
|
{% set tags = page['tags'] %}
|
|
|
|
{% set content = page['content'] %}
|
2021-04-10 22:44:43 +02:00
|
|
|
{% set date = page['created'] %}
|
2021-12-19 00:42:16 +01:00
|
|
|
{% set updated = page['updated'] %}
|
2022-02-12 19:35:09 +01:00
|
|
|
{% set media = page['media'] %}
|
2021-04-10 22:19:05 +02:00
|
|
|
{% else %}
|
|
|
|
{% set id = '' %}
|
|
|
|
{% set uuid = '' %}
|
|
|
|
{% set slug = '' %}
|
2021-04-19 02:50:30 +02:00
|
|
|
{% set layout = 'page' %}
|
2021-04-10 22:19:05 +02:00
|
|
|
{% set feature = '' %}
|
|
|
|
{% set title = '' %}
|
|
|
|
{% set tags = '' %}
|
|
|
|
{% set content = '' %}
|
2021-04-10 22:44:43 +02:00
|
|
|
{% set date = '' %}
|
2021-12-19 00:42:16 +01:00
|
|
|
{% set updated = '' %}
|
2022-02-12 19:35:09 +01:00
|
|
|
{% set media = '' %}
|
2021-04-10 22:19:05 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{{ title }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block stylesheets %}
|
2022-02-12 19:35:09 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="/assets/css/dash.css?=weret">
|
2021-04-10 22:19:05 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block mainContent %}
|
2021-04-14 00:20:57 +02:00
|
|
|
<div id="post-edit-index" data-index="{{ id }}" data-uuid="{{ uuid }}" data-slug="{{ slug }}" data-layout="{{ layout }}">
|
2021-04-10 22:19:05 +02:00
|
|
|
<div id="post-edit-index-wrapper">
|
|
|
|
<div id="post-feature">
|
|
|
|
{% if page['feature'] == null %}
|
|
|
|
<div id="featured-image-drop">
|
2021-04-14 05:49:12 +02:00
|
|
|
DRAG AND DROP IMAGE OR <label for="featured-image-upload">CLICK TO CHOSE</label>
|
2021-04-10 22:19:05 +02:00
|
|
|
</div>
|
|
|
|
{% else %}
|
2022-02-12 19:35:09 +01:00
|
|
|
<div id="page-file-manager">
|
|
|
|
<div id="page-file-wrapper">
|
|
|
|
<div id="page-file-drop">
|
|
|
|
<label for="page-files-upload">DRAG AND DROP FILES OR CLICK TO SELECT</label>
|
|
|
|
</div>
|
|
|
|
IMAGES AND VIDEO
|
|
|
|
<div id="page-images-list">
|
|
|
|
{% if media|length > 1 %}
|
|
|
|
{% for image in media %}
|
|
|
|
<div id="{{loop.index0}}" class="img-item" style="background: url({{ image }}) no-repeat center center / cover"></div>
|
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
|
|
<div id="0" class="img-item" style="background: url({{ media[0] }}) no-repeat center center / cover">
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div id="page-files-list"></div>
|
|
|
|
</div>
|
|
|
|
|
2021-04-10 22:19:05 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div id="post-header">
|
|
|
|
<div id="post-header-wrapper" class="columns">
|
|
|
|
<div id="post-title" class="column">
|
|
|
|
<label>TITLE</label>
|
|
|
|
<textarea id="post_title" type="text" name="post_title" class="post-edit" placeholder="TITLE">
|
|
|
|
{{- _title -}}
|
|
|
|
</textarea>
|
2021-12-19 00:42:16 +01:00
|
|
|
|
2021-11-22 23:29:50 +01:00
|
|
|
<div id="layouts">
|
|
|
|
<label>LAYOUTS</label>
|
|
|
|
<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 %}
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
2021-12-19 00:42:16 +01:00
|
|
|
<label>CREATED</label>
|
|
|
|
<span id="post-date" type="text">
|
|
|
|
{{ date }}
|
|
|
|
</span>
|
2021-04-10 22:19:05 +02:00
|
|
|
</div>
|
|
|
|
<div id="post-meta" class="column">
|
|
|
|
<label>TAGS</label>
|
|
|
|
<textarea id="post_tags" type="text" name="post_tags" class="form-control" placeholder="tags [comma seperated]">
|
|
|
|
{{- tags -}}
|
|
|
|
</textarea>
|
|
|
|
<label>OPTIONS</label>
|
|
|
|
{% apply spaceless %}
|
|
|
|
{{ include("dash/partials/options.twig") }}
|
2021-12-19 00:42:16 +01:00
|
|
|
{% endapply %}
|
|
|
|
<label>UPDATED</label>
|
|
|
|
<span id="post-date" type="text">
|
|
|
|
{{ updated }}
|
|
|
|
</span>
|
2022-02-12 19:35:09 +01:00
|
|
|
<input id="page-files-upload" type="file" name="page-files-upload" multiple/>
|
2021-04-10 22:19:05 +02:00
|
|
|
<input id="post-image-upload" type="file" name="post-image-upload"/>
|
2021-09-14 00:43:54 +02:00
|
|
|
<input id="form_token" name="token" type="hidden" value="{{ token }}">
|
2021-04-10 22:19:05 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="edit-post">
|
|
|
|
{% apply spaceless %}
|
|
|
|
{{ include("dash/partials/editor.twig") }}
|
|
|
|
{% endapply %}
|
|
|
|
<div id="edit-post-wrapper">
|
2021-12-28 23:48:54 +01:00
|
|
|
<textarea id="edit" spellcheck="false">{{- content -}}</textarea>
|
|
|
|
<pre id="highlight">
|
|
|
|
<code id="highlight-content" class="language-md">
|
|
|
|
|
|
|
|
</code>
|
|
|
|
</pre>
|
2021-04-10 22:19:05 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block javascripts %}
|
2022-02-12 19:35:09 +01:00
|
|
|
<script src="/assets/scripts/Start.js?=dfgbg" type="text/javascript"></script>
|
2021-04-10 22:19:05 +02:00
|
|
|
{% endblock %}
|