comparison sat_templates/templates/bulma/blog/publish.html @ 324:580fa5482e88

bulma (blog/publish): make the template more customisable
author Goffi <goffi@goffi.org>
date Sat, 01 May 2021 18:41:11 +0200
parents b9e04a8a45c3
children
comparison
equal deleted inserted replaced
323:34b8de7be336 324:580fa5482e88
4 {% import 'input/form.html' as form with context %} 4 {% import 'input/form.html' as form with context %}
5 {% import 'input/field.html' as field with context %} 5 {% import 'input/field.html' as field with context %}
6 6
7 {% block body %} 7 {% block body %}
8 <div class="panel is-primary mt-4"> 8 <div class="panel is-primary mt-4">
9 <p class="panel-heading">New blog post</p> 9 <p class="panel-heading">
10 {% if publish_title is defined %}
11 {{ publish_title }}
12 {% else %}
13 {% trans %}New blog post{% endtrans %}
14 {% endif %}
15 </p>
10 <p class="panel-tabs"> 16 <p class="panel-tabs">
11 <a class="tab__btn click_to_edit is-active" 17 <a class="tab__btn click_to_edit is-active"
12 href="#"> 18 href="#">
13 {% trans %}edit{% endtrans %} 19 {% trans %}edit{% endtrans %}
14 </a> 20 </a>
17 href="#"> 23 href="#">
18 {% trans %}preview{% endtrans %} 24 {% trans %}preview{% endtrans %}
19 </a> 25 </a>
20 </p> 26 </p>
21 <div id="tab_edit" class="panel-block is-active tab__page state_clicked"> 27 <div id="tab_edit" class="panel-block is-active tab__page state_clicked">
22 {% call form.form(id="blog_post_edit", class="is-flex-grow-1") %} 28 {% call form.form(id=post_form_id or "blog_post_edit", class="is-flex-grow-1") %}
23 {{ field.text("title", _("title"), help=_("title is optional"))}} 29 {{ field.text("title", title_label or _("title"), required=title_required, help=_("title is optional") if not title_required)}}
24 {{ field.text("tags", _("tags"), placeholder=_("tags are comma separated"))}} 30 {% if not no_tabs %}
25 {{ field.textarea("body", "", rows=12, cols=none, help=_("You can use markdown syntax"), 31 {{ field.text("tags", _("tags"), placeholder=_("tags are comma separated"))}}
32 {% endif %}
33 {{ field.textarea("body", body_label, rows=12, cols=none, help=_("You can use markdown syntax"),
26 required=true) }} 34 required=true) }}
27 {{ field.submit(_("Publish"), class="is-fullwidth is-outlined has-text-weight-bold") }} 35 {{ field.submit(_("Publish"), class="is-fullwidth is-outlined has-text-weight-bold") }}
28 {% endcall %} 36 {% endcall %}
29 </div> 37 </div>
30 <div id="tab_preview" class="panel-block tab__page"> 38 <div id="tab_preview" class="panel-block tab__page">