@@ -19,9 +19,9 @@
20<!-- Draw result sub header -->
20<!-- Draw result sub header -->
21{% macro result_sub_header(result, id) -%}
21{% macro result_sub_header(result, id) -%}
22− {% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
22+ {%- if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif -%}
23− {% if result.magnetlink %}<small> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink", id) }}</small>{% endif %}
23+ {%- if result.magnetlink %}<small> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink", id) }}</small>{% endif -%}
24− {% if result.torrentfile %}<small> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile", id) }}</small>{% endif %}
24+ {%- if result.torrentfile %}<small> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile", id) }}</small>{% endif -%}
25{%- endmacro %}
25{%- endmacro %}
27<!-- Draw result footer -->
27<!-- Draw result footer -->
@@ -32,11 +32,11 @@
32 <span class="label label-default">{{ engine }}</span>
32 <span class="label label-default">{{ engine }}</span>
33 {%- endfor -%}
33 {%- endfor -%}
34 {%- if result.url -%}
34 {%- if result.url -%}
35− {% if result.cached_url %}
35+ {%- if result.cached_url -%}
36 <small>{{ result_link(result.cached_url, icon('link') + _('cached'), "text-info", id) }}</small>
36 <small>{{ result_link(result.cached_url, icon('link') + _('cached'), "text-info", id) }}</small>
37− {% elif not result.is_onion %}
37+ {%- elif not result.is_onion -%}
38 <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
38 <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
39− {% endif %}
39+ {%- endif -%}
40 {%- endif -%}
40 {%- endif -%}
41 {%- if proxify -%}
41 {%- if proxify -%}
42 <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
42 <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
@@ -49,73 +49,73 @@
50<!-- Draw result footer without cache link -->
50<!-- Draw result footer without cache link -->
51{% macro result_footer_nocache(result) -%}
51{% macro result_footer_nocache(result) -%}
52− <div class="clearfix"></div>
52+ <div class="clearfix"></div>{{- "" -}}
53 <div class="pull-right">
53 <div class="pull-right">
54− {% for engine in result.engines %}
54+ {%- for engine in result.engines -%}
55 <span class="label label-default">{{ engine }}</span>
55 <span class="label label-default">{{ engine }}</span>
56− {% endfor %}
56+ {%- endfor -%}
57− {% if proxify %}
57+ {%- if proxify -%}
58 <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
58 <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
59− {% endif %}
59+ {%- endif -%}
60−</div>
60+</div>{{- "" -}}
61<div class="external-link">{{ result.pretty_url }}</div>
61<div class="external-link">{{ result.pretty_url }}</div>
62{%- endmacro %}
62{%- endmacro %}
64<!-- Draw result footer -->
64<!-- Draw result footer -->
65{% macro result_footer_rtl(result, id) -%}
65{% macro result_footer_rtl(result, id) -%}
66− <div class="clearfix"></div>{{- "" -}}
66+ <div class="clearfix"></div>
67− {% for engine in result.engines -%}
67+ {%- for engine in result.engines -%}
68 <span class="label label-default">{{ engine }}</span>
68 <span class="label label-default">{{ engine }}</span>
69− {%- endfor %}
69+ {%- endfor -%}
70 {%- if result.url -%}
70 {%- if result.url -%}
71− {% if result.cached_url %}
71+ {%- if result.cached_url -%}
72 <small>{{ result_link(result.cached_url, icon('link') + _('cached'), "text-info", id) }}</small>
72 <small>{{ result_link(result.cached_url, icon('link') + _('cached'), "text-info", id) }}</small>
73− {% elif not result.is_onion %}
73+ {%- elif not result.is_onion -%}
74 <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
74 <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
75− {% endif %}
75+ {%- endif -%}
76 {%- endif -%}
76 {%- endif -%}
77− {% if proxify -%}
77+ {%- if proxify -%}
78 <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
78 <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
79− {%- endif %}
79+ {%- endif -%}
80 {%- if result.pretty_url -%}
80 {%- if result.pretty_url -%}
81 <div class="external-link">{{ result.pretty_url }}</div>
81 <div class="external-link">{{ result.pretty_url }}</div>
82− {%- endif %}
82+ {%- endif -%}
83{%- endmacro %}
83{%- endmacro %}
85<!-- Draw result footer without cache link -->
85<!-- Draw result footer without cache link -->
86{% macro result_footer_nocache_rtl(result) -%}
86{% macro result_footer_nocache_rtl(result) -%}
87 <div class="clearfix"></div>
87 <div class="clearfix"></div>
88− {% for engine in result.engines %}
88+ {%- for engine in result.engines -%}
89 <span class="label label-default">{{ engine }}</span>
89 <span class="label label-default">{{ engine }}</span>
90− {% endfor %}
90+ {%- endfor -%}
91− {% if proxify %}
91+ {%- if proxify -%}
92 <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
92 <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
93− {% endif %}
93+ {%- endif -%}
94 <div class="external-link">{{ result.pretty_url }}</div>
94 <div class="external-link">{{ result.pretty_url }}</div>
95{%- endmacro %}
95{%- endmacro %}
97{% macro preferences_item_header(info, label, rtl, id) -%}
97{% macro preferences_item_header(info, label, rtl, id) -%}
98− {% if rtl %}
98+ {%- if rtl -%}
99− <div class="row form-group">
99+ <div class="row form-group">{{- "" -}}
100− <label class="col-sm-3 col-md-2 pull-right"{% if id %} for="{{id}}"{% endif %}>{{ label }}</label>
100+ <label class="col-sm-3 col-md-2 pull-right"{% if id %} for="{{id}}"{% endif %}>{{ label }}</label>{{- "" -}}
101− <span class="col-sm-5 col-md-6 help-block pull-left">{{ info }}</span>
101+ <span class="col-sm-5 col-md-6 help-block pull-left">{{ info }}</span>{{- "" -}}
102 <div class="col-sm-4 col-md-4">
102 <div class="col-sm-4 col-md-4">
103− {% else %}
103+ {%- else -%}
104− <div class="row form-group">
104+ <div class="row form-group">{{- "" -}}
105− <label class="col-sm-3 col-md-2"{% if id %} for="{{id}}"{% endif %}>{{ label }}</label>
105+ <label class="col-sm-3 col-md-2"{% if id %} for="{{id}}"{% endif %}>{{ label }}</label>{{- "" -}}
106 <div class="col-sm-4 col-md-4">
106 <div class="col-sm-4 col-md-4">
107− {% endif %}
107+ {%- endif -%}
108{%- endmacro %}
108{%- endmacro %}
110{% macro preferences_item_footer(info, label, rtl) -%}
110{% macro preferences_item_footer(info, label, rtl) -%}
111− {% if rtl %}
111+ {%- if rtl -%}
112− </div>
112+ </div>{{- "" -}}
114− {% else %}
114+ {%- else -%}
116− <span class="col-sm-5 col-md-6 help-block">{{ info }}</span>
116+ <span class="col-sm-5 col-md-6 help-block">{{ info }}</span>{{- "" -}}
118− {% endif %}
118+ {%- endif -%}
119{%- endmacro %}
119{%- endmacro %}
121{% macro custom_select_class(rtl) -%}
121{% macro custom_select_class(rtl) -%}
@@ -123,24 +123,24 @@ custom-select{% if rtl %}-rtl{% endif %}
123{%- endmacro %}
123{%- endmacro %}
125{% macro checkbox_toggle(id, blocked) -%}
125{% macro checkbox_toggle(id, blocked) -%}
126− <div class="onoffswitch">
126+ <div class="onoffswitch">{{- "" -}}
127− <input type="checkbox" id="{{ id }}" name="{{ id }}"{% if blocked %} checked="checked"{% endif %} class="onoffswitch-checkbox">
127+ <input type="checkbox" id="{{ id }}" name="{{ id }}"{% if blocked %} checked="checked"{% endif %} class="onoffswitch-checkbox">{{- "" -}}
128− <label class="onoffswitch-label" for="{{ id }}">
128+ <label class="onoffswitch-label" for="{{ id }}">{{- "" -}}
129− <span class="onoffswitch-inner"></span>
129+ <span class="onoffswitch-inner"></span>{{- "" -}}
130− <span class="onoffswitch-switch"></span>
130+ <span class="onoffswitch-switch"></span>{{- "" -}}
131− </label>
131+ </label>{{- "" -}}
132− <label class="visually-hidden" for="{{ id }}">{{ _('Allow') }}</label>
132+ <label class="visually-hidden" for="{{ id }}">{{ _('Allow') }}</label>{{- "" -}}
133− </div>
133+ </div>{{- "" -}}
134{%- endmacro %}
134{%- endmacro %}
136{% macro support_toggle(supports) -%}
136{% macro support_toggle(supports) -%}
137− {% if supports %}
137+ {%- if supports -%}
138 <span class="label label-success">
138 <span class="label label-success">
139− {{ _("supported") }}
139+ {{- _("supported") -}}
141− {% else %}
141+ {%- else -%}
142 <span class="label label-danger">
142 <span class="label label-danger">
143− {{ _("not supported") }}
143+ {{- _("not supported") -}}
145− {% endif %}
145+ {%- endif -%}
146{%- endmacro %}
146{%- endmacro %}