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'] %}
|
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 = '' %}
|
2021-04-10 22:19:05 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{{ title }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block stylesheets %}
|
2021-12-28 23:48:54 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="/assets/css/dash.css?=dfeef">
|
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 %}
|
|
|
|
<div id="featured-new-image-btn">
|
|
|
|
<button id="new-feature-upload">
|
|
|
|
<svg id="new-feature-upload" viewbox="0 0 20 20" class="icons"><use xlink:href="/assets/images/global/sprite.svg#entypo-image-inverted"/></svg>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div id="featured-image-drop">
|
|
|
|
<img id="featured-image" src="{{ feature }}"/>
|
|
|
|
</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>
|
2021-04-10 22:19:05 +02:00
|
|
|
<input id="featured-image-upload" type="file" name="featured-image-upload"/>
|
|
|
|
<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 %}
|
2021-12-28 01:42:10 +01:00
|
|
|
<script src="/assets/scripts/Start.js" type="text/javascript"></script>
|
2021-04-10 22:19:05 +02:00
|
|
|
{% endblock %}
|