| 
									
										
										
										
											2014-12-22 16:07:02 +01:00
										 |  |  | <!-- Draw glyphicon icon from bootstrap-theme --> | 
					
						
							| 
									
										
										
										
											2014-09-27 10:23:05 +02:00
										 |  |  | {% macro icon(action) -%} | 
					
						
							|  |  |  |     <span class="glyphicon glyphicon-{{ action }}"></span> | 
					
						
							|  |  |  | {%- endmacro %} | 
					
						
							| 
									
										
										
										
											2014-12-22 16:07:02 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | <!-- Draw favicon --> | 
					
						
							|  |  |  | <!-- TODO: using url_for methode --> | 
					
						
							|  |  |  | {% macro draw_favicon(favicon) -%} | 
					
						
							| 
									
										
										
										
											2015-01-09 21:25:13 +01:00
										 |  |  |     <img width="32" height="32" class="favicon" src="static/themes/oscar/img/icons/{{ favicon }}.png" alt="{{ favicon }}" /> | 
					
						
							| 
									
										
										
										
											2014-12-22 16:07:02 +01:00
										 |  |  | {%- endmacro %} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-04 15:56:46 +02:00
										 |  |  | {%- macro result_link(url, title, classes='') -%} | 
					
						
							| 
									
										
										
										
											2017-01-26 21:18:10 +01:00
										 |  |  | <a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ title }}</a> | 
					
						
							| 
									
										
										
										
											2016-09-04 15:56:46 +02:00
										 |  |  | {%- endmacro -%} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-22 16:07:02 +01:00
										 |  |  | <!-- Draw result header --> | 
					
						
							| 
									
										
										
										
											2016-09-04 15:56:46 +02:00
										 |  |  | {% macro result_header(result, favicons) -%} | 
					
						
							|  |  |  | <h4 class="result_header">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{{ result_link(result.url, result.title|safe) }}</h4> | 
					
						
							| 
									
										
										
										
											2014-12-22 16:07:02 +01:00
										 |  |  | {%- endmacro %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <!-- Draw result sub header --> | 
					
						
							|  |  |  | {% macro result_sub_header(result) -%} | 
					
						
							|  |  |  |     {% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %} | 
					
						
							| 
									
										
										
										
											2016-09-04 15:56:46 +02:00
										 |  |  |     {% if result.magnetlink %}<small> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</small>{% endif %} | 
					
						
							|  |  |  |     {% if result.torrentfile %}<small> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</small>{% endif %} | 
					
						
							| 
									
										
										
										
											2014-12-22 16:07:02 +01:00
										 |  |  | {%- endmacro %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <!-- Draw result footer --> | 
					
						
							|  |  |  | {% macro result_footer(result) -%} | 
					
						
							|  |  |  |     <div class="clearfix"></div> | 
					
						
							| 
									
										
										
										
											2015-10-03 17:46:12 +02:00
										 |  |  |     <div class="pull-right"> | 
					
						
							|  |  |  |     {% for engine in result.engines %} | 
					
						
							|  |  |  |         <span class="label label-default">{{ engine }}</span> | 
					
						
							|  |  |  |     {% endfor %} | 
					
						
							| 
									
										
										
										
											2016-09-04 15:56:46 +02:00
										 |  |  |     <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small> | 
					
						
							| 
									
										
										
										
											2016-10-17 00:22:41 +02:00
										 |  |  |     {% if proxify %} | 
					
						
							|  |  |  |     <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small> | 
					
						
							|  |  |  |     {% endif %} | 
					
						
							| 
									
										
										
										
											2015-10-03 17:46:12 +02:00
										 |  |  | </div> | 
					
						
							| 
									
										
										
										
											2016-12-29 00:20:30 +01:00
										 |  |  | <div class="external-link">{{ result.pretty_url }}</div> | 
					
						
							| 
									
										
										
										
											2014-12-22 16:07:02 +01:00
										 |  |  | {%- endmacro %} | 
					
						
							| 
									
										
										
										
											2015-02-10 15:23:56 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | <!-- Draw result footer --> | 
					
						
							|  |  |  | {% macro result_footer_rtl(result) -%} | 
					
						
							|  |  |  |     <div class="clearfix"></div> | 
					
						
							| 
									
										
										
										
											2016-06-26 01:57:43 +02:00
										 |  |  |     {% for engine in result.engines %} | 
					
						
							|  |  |  |         <span class="label label-default">{{ engine }}</span> | 
					
						
							|  |  |  |     {% endfor %} | 
					
						
							| 
									
										
										
										
											2016-09-04 15:56:46 +02:00
										 |  |  |     <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small> | 
					
						
							| 
									
										
										
										
											2016-10-17 00:22:41 +02:00
										 |  |  |     {% if proxify %} | 
					
						
							|  |  |  |     <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small> | 
					
						
							|  |  |  |     {% endif %} | 
					
						
							| 
									
										
										
										
											2016-12-29 00:20:30 +01:00
										 |  |  |     <div class="external-link">{{ result.pretty_url }}</div> | 
					
						
							| 
									
										
										
										
											2015-02-10 15:23:56 +01:00
										 |  |  | {%- endmacro %} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-11 20:53:06 +01:00
										 |  |  | {% macro preferences_item_header(info, label, rtl) -%} | 
					
						
							| 
									
										
										
										
											2015-02-11 20:08:04 +01:00
										 |  |  |     {% if rtl %} | 
					
						
							| 
									
										
										
										
											2015-02-10 15:23:56 +01:00
										 |  |  |     <div class="row form-group"> | 
					
						
							| 
									
										
										
										
											2015-02-13 01:03:18 +01:00
										 |  |  |         <label class="col-sm-3 col-md-2 pull-right">{{ label }}</label> | 
					
						
							|  |  |  |         <span class="col-sm-5 col-md-6 help-block pull-left">{{ info }}</span> | 
					
						
							| 
									
										
										
										
											2015-02-10 15:23:56 +01:00
										 |  |  |         <div class="col-sm-4 col-md-4"> | 
					
						
							|  |  |  |     {% else %} | 
					
						
							|  |  |  |     <div class="row form-group"> | 
					
						
							| 
									
										
										
										
											2015-02-11 20:53:06 +01:00
										 |  |  |         <label class="col-sm-3 col-md-2">{{ label }}</label> | 
					
						
							| 
									
										
										
										
											2015-02-10 15:23:56 +01:00
										 |  |  |         <div class="col-sm-4 col-md-4"> | 
					
						
							|  |  |  |     {% endif %} | 
					
						
							|  |  |  | {%- endmacro %} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-11 20:53:06 +01:00
										 |  |  | {% macro preferences_item_footer(info, label, rtl) -%} | 
					
						
							| 
									
										
										
										
											2015-02-11 20:08:04 +01:00
										 |  |  |     {% if rtl %} | 
					
						
							| 
									
										
										
										
											2015-02-10 15:23:56 +01:00
										 |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |     {% else %} | 
					
						
							|  |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2015-02-11 20:53:06 +01:00
										 |  |  |         <span class="col-sm-5 col-md-6 help-block">{{ info }}</span> | 
					
						
							| 
									
										
										
										
											2015-02-10 15:23:56 +01:00
										 |  |  |     </div> | 
					
						
							|  |  |  |     {% endif %} | 
					
						
							|  |  |  | {%- endmacro %} | 
					
						
							| 
									
										
										
										
											2015-03-10 23:03:06 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | {% macro checkbox_toggle(id, blocked) -%} | 
					
						
							| 
									
										
										
										
											2016-08-07 23:25:27 +02:00
										 |  |  |     <div class="onoffswitch"> | 
					
						
							|  |  |  |         <input type="checkbox" id="{{ id }}" name="{{ id }}"{% if blocked %} checked="checked"{% endif %} class="onoffswitch-checkbox"> | 
					
						
							|  |  |  |         <label class="onoffswitch-label" for="{{ id }}"> | 
					
						
							|  |  |  |             <span class="onoffswitch-inner"></span> | 
					
						
							|  |  |  |             <span class="onoffswitch-switch"></span> | 
					
						
							|  |  |  |         </label> | 
					
						
							| 
									
										
										
										
											2015-03-10 23:03:06 +01:00
										 |  |  |     </div> | 
					
						
							|  |  |  | {%- endmacro %} |