mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Made chat_box and added hello world
This commit is contained in:
parent
b9eb927676
commit
b50ef14dce
3 changed files with 53 additions and 6 deletions
|
@ -11,7 +11,6 @@ def post_search(request, search: SearchWithPlugins) -> None:
|
|||
search_request = search.search_query
|
||||
container = search.result_container
|
||||
# container.infoboxes.append(container.infoboxes[0])
|
||||
container.chat_box = container.infoboxes
|
||||
print(search_request)
|
||||
|
||||
container.chat_box = {'chat_box': 'hello world'}
|
||||
print(container.infoboxes)
|
||||
print("HELLO WORLD =====================================================================")
|
48
searx/templates/kvanDark/elements/chat_box.html
Normal file
48
searx/templates/kvanDark/elements/chat_box.html
Normal file
|
@ -0,0 +1,48 @@
|
|||
<aside class="chat_box" aria-label="{{ chat_box.chat_box }}">
|
||||
<h2 class="title"><bdi>{{ chat_box.chat_box }}</bdi></h2>
|
||||
<!-- {%- if infobox.img_src -%}<img src="{{ image_proxify(infobox.img_src) }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}">{%- endif -%} -->
|
||||
<!-- <p><bdi>{{ infobox.content | safe }}</bdi></p> -->
|
||||
<!-- {%- if infobox.attributes -%}
|
||||
<div class="attributes">
|
||||
{%- for attribute in infobox.attributes -%}
|
||||
<dl>
|
||||
<dt><bdi>{{ attribute.label }} :</bdi></dt>
|
||||
{%- if attribute.image -%}
|
||||
<dd><img src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}"></dd>
|
||||
{%- else -%}
|
||||
<dd><bdi>{{ attribute.value }}</bdi></dd>
|
||||
{%- endif -%}
|
||||
</dl>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
{%- endif -%} -->
|
||||
<!-- {%- if infobox.urls -%}
|
||||
<div class="urls">
|
||||
<ul>
|
||||
{%- for url in infobox.urls -%}
|
||||
<li class="url"><bdi><a href="{{ url.url }}" {%- if results_on_new_tab -%}target="_blank" rel="noopener noreferrer"{%- else -%}rel="noreferrer"{%- endif -%}>{{ url.title }}</a></bdi></li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
</div>
|
||||
{%- endif -%} -->
|
||||
<!-- {%- if infobox.relatedTopics -%}
|
||||
<div class="relatedTopics">
|
||||
{%- for topic in infobox.relatedTopics -%}
|
||||
<div>
|
||||
<h3><bdi>{{ topic.name }}</bdi></h3>
|
||||
{%- for suggestion in topic.suggestions -%}
|
||||
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
|
||||
<input type="hidden" name="q" value="{{ suggestion }}">
|
||||
<input type="hidden" name="time_range" value="{{ time_range }}">
|
||||
<input type="hidden" name="language" value="{{ current_language }}">
|
||||
<input type="hidden" name="safesearch" value="{{ safesearch }}">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
{%- if timeout_limit -%}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{%- endif -%}
|
||||
<input type="submit" value="{{ suggestion }}" />
|
||||
</form>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
{%- endif -%} -->
|
||||
</aside>
|
|
@ -46,9 +46,9 @@
|
|||
{%- if chat_box -%}
|
||||
<div id="chat_box">
|
||||
<details open class="sidebar-collapsable">
|
||||
<summary class="title">{{ _('Info') }}</summary>
|
||||
{%- for infobox in infoboxes -%}
|
||||
{%- include 'kvanDark/elements/infobox.html' -%}
|
||||
<summary class="title">{{ _('Chat') }}</summary>
|
||||
{%- for infobox in chat_box -%}
|
||||
{%- include 'kvanDark/elements/chat_box.html' -%}
|
||||
{%- endfor -%}
|
||||
</details>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue