Debian Codegraph @

sat_templates/templates/bulma/blog/blog.html

raw symbols SCIP
1 {# blog_page indicate if blog is included in an other page or if it is the main one #}
2 {% if not embedded %}{% extends 'base/base.html' %}{% set blog_page = True %}{% endif %}
3 {% set single = blog_items['items']|length == 1 %}
4 {% set dates_format='relative' if single else 'short' %}
5 {% import 'components/avatar.html' as avatar with context %}
6 {% import 'blog/macros.html' as blog with context %}
7 {% import 'input/navigation.html' as navigation with context %}
8 {% import 'input/textbox.html' as textbox with context %}
9
10 {%- block title scoped -%}
11 {%- if blog_page -%}
12 {%- if single -%}
13 {{- blog_items['items'][0].title|default(blog_items['items'][0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}}
14 {%- else -%}
15 {{C.APP_NAME}}
16 {# {{- super() -}}
17 FIXME: super() is failing if blog is embedded (i.e. base/base.html is not its direct parent)
18 not sure what's the best way to avoid that, so just using C.APP_NAME for now #}
19 {%- endif -%}
20 {%- endif -%}
21 {%- endblock title -%}
22
23 {% block body %}
24 {{ icon_defs(
25 "ellipsis", "regular face-smile", "reply", "share", "star"
26 ) }}
27
28
29 <div class="columns is-gapless blog-container">
30 <!-- Left Panel -->
31 <div class="column is-2 left-sidebar has-background-dark" id="left_panel">
32 {% include 'blog/discover_panel.html' %}
33 </div>
34 <div class="column is-8 main-panel blog-main" id="main_panel">
35 <div class="panel-header">
36 <div class="level is-mobile">
37 <div class="level-left">
38 <div class="level-item">
39 <button class="button is-small" id="left_panel-toggle" aria-label="Toggle left panel">
40 <span class="icon"><i class="fas fa-bars"></i></span>
41 </button>
42 </div>
43 </div>
44 <div class="level-right">
45 <div class="level-item">
46 <button class="button is-small is-primary">
47 <span class="icon"><i class="fas fa-circle-plus"></i></span>
48 <span>New Post</span>
49 </button>
50 </div>
51 </div>
52 </div>
53 </div>
54 {% if blog_items['items'] %}
55 <div class="container mt-4">
56 <div id="blog_items" class="columns">
57 <div class="column">
58 {{ blog.show_items(blog_items['items'], expanded=single) }}
59 </div>
60 </div>
61 </div>
62 {% else %}
63 <div class="message mt-4">
64 <div class="message-body">
65 {% trans %}No articles found in this blog!{% endtrans %}
66 </div>
67 </div>
68 {% endif %}
69 </div>
70 </div>
71
72 {% endblock body %}