annotate sat_templates/templates/bulma/blog/publish.html @ 325:8c779fb46384

bulma (components/block): interests_grid is more customisable: - new `delete_icon` argument can be set to `false` if delete icon is not desired - the macro can now be called, the caller then get 2 arguments: part to customise and current interest. Part to customise can be: * `header-title`: markup to put in the title * `content`: car content (replaces the default `interest.name`)
author Goffi <goffi@goffi.org>
date Sat, 01 May 2021 18:44:47 +0200
parents 580fa5482e88
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
320
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 {% if not embedded %}{% extends 'base/base.html' %}{% endif %}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
2 {% import 'input/textbox.html' as textbox with context %}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
3 {% import 'blog/macros.html' as blog with context %}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 {% import 'input/form.html' as form with context %}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 {% import 'input/field.html' as field with context %}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
6
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 {% block body %}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 <div class="panel is-primary mt-4">
324
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
9 <p class="panel-heading">
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
10 {% if publish_title is defined %}
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
11 {{ publish_title }}
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
12 {% else %}
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
13 {% trans %}New blog post{% endtrans %}
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
14 {% endif %}
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
15 </p>
320
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
16 <p class="panel-tabs">
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
17 <a class="tab__btn click_to_edit is-active"
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 href="#">
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 {% trans %}edit{% endtrans %}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 </a>
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
21
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 <a class="tab__btn click_to_preview nojs_hide"
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
23 href="#">
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
24 {% trans %}preview{% endtrans %}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
25 </a>
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
26 </p>
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
27 <div id="tab_edit" class="panel-block is-active tab__page state_clicked">
324
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
28 {% call form.form(id=post_form_id or "blog_post_edit", class="is-flex-grow-1") %}
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
29 {{ field.text("title", title_label or _("title"), required=title_required, help=_("title is optional") if not title_required)}}
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
30 {% if not no_tabs %}
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
31 {{ field.text("tags", _("tags"), placeholder=_("tags are comma separated"))}}
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
32 {% endif %}
580fa5482e88 bulma (blog/publish): make the template more customisable
Goffi <goffi@goffi.org>
parents: 320
diff changeset
33 {{ field.textarea("body", body_label, rows=12, cols=none, help=_("You can use markdown syntax"),
320
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 required=true) }}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
35 {{ field.submit(_("Publish"), class="is-fullwidth is-outlined has-text-weight-bold") }}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
36 {% endcall %}
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
37 </div>
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 <div id="tab_preview" class="panel-block tab__page">
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
39 </div>
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
40 </div>
b9e04a8a45c3 bulma (blog): new publish template:
Goffi <goffi@goffi.org>
parents:
diff changeset
41 {% endblock body %}