From 4908f763e5b5b2d23ede167fb2e9644499542b80 Mon Sep 17 00:00:00 2001 From: Flancian <0@flancia.org> Date: Sat, 27 Feb 2021 17:03:55 +0100 Subject: [PATCH] search, cosmetic --- app/agora.py | 5 ++++- app/templates/node_rendered.html | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/agora.py b/app/agora.py index 87fb6e14d..6e862842e 100644 --- a/app/agora.py +++ b/app/agora.py @@ -144,10 +144,13 @@ def push(node, other): @bp.route('/search') @bp.route('/jump') def jump(): - """Redirects to a context; in "jump" mode, a node *always* exists (nodes map one to one to all possible queries).""" + """Redirects to an appropriate context. + Originally called "jump" because in the [[agora]] nodes *always* exist, as they map 1:1 to all possible queries. Thus [[agora search]]. + """ q = request.args.get('q') tokens = q.split(" ") # hack hack + # [[push]] [[2021-02-28]] in case I don't get to it today. if tokens[0] == 'go' and len(tokens) > 1: return redirect(url_for('.go', node=slugify(q[3:]))) return redirect(url_for('.node', node=slugify(q))) diff --git a/app/templates/node_rendered.html b/app/templates/node_rendered.html index 7e7c79fbe..aff0efd51 100644 --- a/app/templates/node_rendered.html +++ b/app/templates/node_rendered.html @@ -30,7 +30,7 @@ You can try searching or listing all nodes.

{% if node.subnodes %}
-Node [[{{node.uri}}]] +Node [[{{node.uri}}]]: {% for subnode in node.subnodes %}
@@ -61,7 +61,7 @@ You can try searching or listing all nodes.

{% for node in pull_nodes %}
-Pulled node [[{{node.uri}}]] +Pulled node [[{{node.uri}}]]: {% if node.subnodes %} {% for subnode in node.subnodes %} @@ -74,7 +74,7 @@ You can try searching or listing all nodes.

{% endfor %} {% else %} - not found.
+ empty.
{% endif %}
{% endfor %}