Mercurial > libervia-templates
diff 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 |
line wrap: on
line diff
--- a/sat_templates/templates/bulma/blog/publish.html Thu Apr 29 20:52:17 2021 +0200 +++ b/sat_templates/templates/bulma/blog/publish.html Sat May 01 18:41:11 2021 +0200 @@ -6,7 +6,13 @@ {% block body %} <div class="panel is-primary mt-4"> - <p class="panel-heading">New blog post</p> + <p class="panel-heading"> + {% if publish_title is defined %} + {{ publish_title }} + {% else %} + {% trans %}New blog post{% endtrans %} + {% endif %} + </p> <p class="panel-tabs"> <a class="tab__btn click_to_edit is-active" href="#"> @@ -19,10 +25,12 @@ </a> </p> <div id="tab_edit" class="panel-block is-active tab__page state_clicked"> - {% call form.form(id="blog_post_edit", class="is-flex-grow-1") %} - {{ field.text("title", _("title"), help=_("title is optional"))}} - {{ field.text("tags", _("tags"), placeholder=_("tags are comma separated"))}} - {{ field.textarea("body", "", rows=12, cols=none, help=_("You can use markdown syntax"), + {% call form.form(id=post_form_id or "blog_post_edit", class="is-flex-grow-1") %} + {{ field.text("title", title_label or _("title"), required=title_required, help=_("title is optional") if not title_required)}} + {% if not no_tabs %} + {{ field.text("tags", _("tags"), placeholder=_("tags are comma separated"))}} + {% endif %} + {{ field.textarea("body", body_label, rows=12, cols=none, help=_("You can use markdown syntax"), required=true) }} {{ field.submit(_("Publish"), class="is-fullwidth is-outlined has-text-weight-bold") }} {% endcall %}