comparison sat_templates/templates/bulma/blog/articles.html @ 296:fbea1b9a558f

bulma: new search box, used in blog for now
author Goffi <goffi@goffi.org>
date Thu, 10 Dec 2020 11:29:04 +0100
parents 40fccd3b7cf0
children 3db3509cbad1
comparison
equal deleted inserted replaced
295:1de599c5a68f 296:fbea1b9a558f
3 {% set single = blog_items['items']|length == 1 %} 3 {% set single = blog_items['items']|length == 1 %}
4 {% set dates_format='relative' if single else 'short' %} 4 {% set dates_format='relative' if single else 'short' %}
5 {% import 'components/avatar.html' as avatar with context %} 5 {% import 'components/avatar.html' as avatar with context %}
6 {% import 'blog/macros.html' as blog with context %} 6 {% import 'blog/macros.html' as blog with context %}
7 {% import 'input/navigation.html' as navigation with context %} 7 {% import 'input/navigation.html' as navigation with context %}
8 {% import 'input/textbox.html' as textbox with context %}
8 9
9 {%- block title scoped -%} 10 {%- block title scoped -%}
10 {%- if blog_page -%} 11 {%- if blog_page -%}
11 {%- if single -%} 12 {%- if single -%}
12 {{- blog_items['items'][0].title|default(blog_items['items'][0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}} 13 {{- blog_items['items'][0].title|default(blog_items['items'][0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}}
21 22
22 {% block body %} 23 {% block body %}
23 24
24 {% if blog_items['items'] %} 25 {% if blog_items['items'] %}
25 <div class="container mt-4"> 26 <div class="container mt-4">
27 <nav class="level mb-4">
28 <div class="level-left">
29 </div>
30 <div class="level-right">
31 <div class="level-item">
32 {{ textbox.search() }}
33 </div>
34 </div>
35 </nav>
26 <div id="blog_items" class="columns"> 36 <div id="blog_items" class="columns">
27 <div class="column"> 37 <div class="column">
28 {{ blog.show_items(blog_items['items'], expanded=single) }} 38 {{ blog.show_items(blog_items['items'], expanded=single) }}
29 </div> 39 </div>
30 </div> 40 </div>