annotate sat_templates/templates/bulma/blog/blog.html @ 411:f7a434581872 default tip

chat: Add forward, rich editing and extra recipients: - There is a new "forward" menu in message. For now, a simple prompt ask for recipient JID. - A new "extra" menu is available next to input field. Inside there are 2 items for now: add extra recipient, and toggle rich edit mode. - Extra recipient option add a field to add an email-like "to", "cc" or "bcc" recipients. - Rich edit let use rich styling such as bold, italic, underline, etc. rel 461
author Goffi <goffi@goffi.org>
date Fri, 04 Jul 2025 17:33:22 +0200
parents 5016fb0ff62f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
405
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
1 {# blog_page indicate if blog is included in an other page or if it is the main one #}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
2 {% if not embedded %}{% extends 'base/base.html' %}{% set blog_page = True %}{% endif %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
3 {% set single = blog_items['items']|length == 1 %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
4 {% set dates_format='relative' if single else 'short' %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
5 {% import 'components/avatar.html' as avatar with context %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
6 {% import 'blog/macros.html' as blog with context %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
7 {% import 'input/navigation.html' as navigation with context %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
8 {% import 'input/textbox.html' as textbox with context %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
9
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
10 {%- block title scoped -%}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
11 {%- if blog_page -%}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
12 {%- if single -%}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
13 {{- blog_items['items'][0].title|default(blog_items['items'][0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
14 {%- else -%}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
15 {{C.APP_NAME}}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
16 {# {{- super() -}}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
17 FIXME: super() is failing if blog is embedded (i.e. base/base.html is not its direct parent)
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
18 not sure what's the best way to avoid that, so just using C.APP_NAME for now #}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
19 {%- endif -%}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
20 {%- endif -%}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
21 {%- endblock title -%}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
22
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
23 {% block body %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
24 {{ icon_defs(
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
25 "ellipsis", "regular face-smile", "reply", "share", "star"
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
26 ) }}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
27
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
28
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
29 <div class="columns is-gapless blog-container">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
30 <!-- Left Panel -->
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
31 <div class="column is-2 left-sidebar has-background-dark" id="left_panel">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
32 {% include 'blog/discover_panel.html' %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
33 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
34 <div class="column is-8 main-panel blog-main" id="main_panel">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
35 <div class="panel-header">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
36 <div class="level is-mobile">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
37 <div class="level-left">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
38 <div class="level-item">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
39 <button class="button is-small" id="left_panel-toggle" aria-label="Toggle left panel">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
40 <span class="icon"><i class="fas fa-bars"></i></span>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
41 </button>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
42 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
43 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
44 <div class="level-right">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
45 <div class="level-item">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
46 <button class="button is-small is-primary">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
47 <span class="icon"><i class="fas fa-circle-plus"></i></span>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
48 <span>New Post</span>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
49 </button>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
50 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
51 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
52 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
53 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
54 {% if blog_items['items'] %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
55 <div class="container mt-4">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
56 <div id="blog_items" class="columns">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
57 <div class="column">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
58 {{ blog.show_items(blog_items['items'], expanded=single) }}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
59 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
60 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
61 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
62 {% else %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
63 <div class="message mt-4">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
64 <div class="message-body">
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
65 {% trans %}No articles found in this blog!{% endtrans %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
66 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
67 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
68 {% endif %}
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
69 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
70 </div>
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
71
5016fb0ff62f Blog redesign: work in progress redesign of the blog.
Goffi <goffi@goffi.org>
parents:
diff changeset
72 {% endblock body %}