mirror of
https://github.com/flancian/garden.git
synced 2026-08-11 17:21:44 +00:00
search, cosmetic
This commit is contained in:
+4
-1
@@ -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)))
|
||||
|
||||
@@ -30,7 +30,7 @@ You can try searching or listing <a href="/nodes">all nodes</a>.<br /><br />
|
||||
|
||||
{% if node.subnodes %}
|
||||
<div class="node">
|
||||
<span class="node-header"><strong>Node</strong> <a href="/node/{{node.uri}}">[[{{node.uri}}]]</a></span>
|
||||
<span class="node-header"><strong>Node</strong> <a href="/node/{{node.uri}}">[[{{node.uri}}]]</a></span>:
|
||||
|
||||
{% for subnode in node.subnodes %}
|
||||
<div class="subnode">
|
||||
@@ -61,7 +61,7 @@ You can try searching or listing <a href="/nodes">all nodes</a>.<br /><br />
|
||||
|
||||
{% for node in pull_nodes %}
|
||||
<div class="node">
|
||||
<span class="node-header"><strong>Pulled node</strong> <a href="/node/{{node.uri}}">[[{{node.uri}}]]</a></span>
|
||||
<span class="node-header"><strong>Pulled node</strong> <a href="/node/{{node.uri}}">[[{{node.uri}}]]</a></span>:
|
||||
|
||||
{% if node.subnodes %}
|
||||
{% for subnode in node.subnodes %}
|
||||
@@ -74,7 +74,7 @@ You can try searching or listing <a href="/nodes">all nodes</a>.<br /><br />
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
not found. <br />
|
||||
empty. <br />
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user