 af5dbdf768
			
		
	
	
		af5dbdf768
		
	
	
	
	
		
			
			This patch adds a new result type: KeyValue - Python class: searx/result_types/keyvalue.py - Jinja template: searx/templates/simple/result_templates/keyvalue.html - CSS (less) client/simple/src/less/result_types/keyvalue.less Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
		
			
				
	
	
		
			22 lines
		
	
	
		
			906 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			906 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <article class="result result-keyvalue {% if result.category -%}category-{{ result.category }}{%- endif -%}">
 | |
|   <table>
 | |
|     {%- if result.caption %}<caption>{{ result.caption }}</caption>{%- endif -%}
 | |
|     {%- if result.key_title or result.value_title %}
 | |
|       <thead>
 | |
|         <tr>
 | |
|           <th class="col-key" scope="col" >{{result.key_title}}</th>
 | |
|           <th class="col-value" scope="col" >{{result.value_title}}</th>
 | |
|         </tr>
 | |
|       </thead>
 | |
|     {%- endif -%}
 | |
|     {%- for key, value in result.kvmap.items() -%}
 | |
|       <tr class="{{ loop.cycle('odd', 'even') }}">
 | |
|         <th class="col-key" scope="row">{{ key }}</th>{{- '' -}}
 | |
|         <td class="col-value">{{ value }}</td>{{- '' -}}
 | |
|       </tr>
 | |
|     {%- endfor -%}
 | |
|   </table>{{- '' -}}
 | |
|   <div class="engines">{% for engine in result.engines %}<span>{{ engine }}</span>{% endfor %}</div>{{- '' -}}
 | |
|   <div class="break"></div>{{- '' -}}
 | |
| </article>
 |