51 lines
2.7 KiB
HTML
51 lines
2.7 KiB
HTML
<section class="stack-lg" aria-labelledby="post-form-title">
|
||
<header class="page-header">
|
||
<h1 class="page-title" id="post-form-title">{{ @pageTitle }}</h1>
|
||
|
||
<div class="page-actions">
|
||
<a class="button button--ghost" href="{{ 'dashboard' | alias }}">Retour</a>
|
||
</div>
|
||
</header>
|
||
|
||
<form class="panel stack editor-form" method="post" action="{{ @formAction }}">
|
||
<include href="partials/csrf_field.html" />
|
||
|
||
<label class="field">
|
||
<span class="field-label">Titre</span>
|
||
<input class="control" type="text" name="title" value="{{ @post.title }}" maxlength="{{ @titleMax }}" required data-char-count>
|
||
<span class="char-counter"><span data-char-count-value>0</span> / {{ @titleMax }}</span>
|
||
</label>
|
||
|
||
<label class="field">
|
||
<span class="field-label">Extrait</span>
|
||
<textarea class="control" name="excerpt" rows="3" maxlength="{{ @excerptMax }}" required data-char-count>{{ @post.excerpt }}</textarea>
|
||
<span class="char-counter"><span data-char-count-value>0</span> / {{ @excerptMax }}</span>
|
||
</label>
|
||
|
||
<section class="field">
|
||
<div class="field-head">
|
||
<div>
|
||
<h2 class="field-label">Contenu</h2>
|
||
<p class="field-help">Rédige en Markdown. La première image du contenu sert de visuel dans les listes d’articles.</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="toolbar" role="toolbar" aria-label="Outils Markdown">
|
||
<button class="button button--ghost button--small" type="button" data-md-action="bold"><strong>Gras</strong></button>
|
||
<button class="button button--ghost button--small" type="button" data-md-action="italic"><em>Italique</em></button>
|
||
<button class="button button--ghost button--small" type="button" data-md-action="heading">Titre</button>
|
||
<button class="button button--ghost button--small" type="button" data-md-action="list">Liste</button>
|
||
<button class="button button--ghost button--small" type="button" data-md-action="quote">Citation</button>
|
||
<button class="button button--ghost button--small" type="button" data-md-action="link">Lien</button>
|
||
<button class="button button--ghost button--small" type="button" data-md-action="code">Code</button>
|
||
<a class="button button--ghost button--small" href="{{ 'media_index' | alias }}" target="_blank" rel="noopener">Ouvrir la médiathèque</a>
|
||
</div>
|
||
|
||
<textarea class="control editor-textarea" name="body_markdown" rows="18" required data-markdown-editor>{{ @post.body_markdown }}</textarea>
|
||
<p class="field-help">Laisse une ligne vide entre deux blocs. Pour ajouter une image, ouvre la médiathèque, copie le Markdown, puis colle-le ici.</p>
|
||
</section>
|
||
|
||
<button class="button" type="submit">Enregistrer</button>
|
||
</form>
|
||
</section>
|