mirror of
https://github.com/flancian/garden.git
synced 2026-08-11 17:21:44 +00:00
Well, a lot.
This commit is contained in:
+5
-4
@@ -176,7 +176,8 @@ def node(node,user_list=[]):
|
|||||||
search_subnodes = db.search_subnodes(node)
|
search_subnodes = db.search_subnodes(node)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
'node_rendered.html',
|
# yuck
|
||||||
|
'content.html',
|
||||||
node=n,
|
node=n,
|
||||||
backlinks=n.back_links(),
|
backlinks=n.back_links(),
|
||||||
pull_nodes=n.pull_nodes() if n.subnodes else permutations,
|
pull_nodes=n.pull_nodes() if n.subnodes else permutations,
|
||||||
@@ -184,7 +185,7 @@ def node(node,user_list=[]):
|
|||||||
search=search_subnodes,
|
search=search_subnodes,
|
||||||
pulling_nodes=n.pulling_nodes(),
|
pulling_nodes=n.pulling_nodes(),
|
||||||
pushing_nodes=n.pushing_nodes(),
|
pushing_nodes=n.pushing_nodes(),
|
||||||
q=n.wikilink.replace('-', '%20'),
|
query=n.wikilink.replace('-', '%20'),
|
||||||
# disabled a bit superstitiously due to [[heisenbug]] after I added this everywhere :).
|
# disabled a bit superstitiously due to [[heisenbug]] after I added this everywhere :).
|
||||||
# sorry for the fuzzy thinking but I'm short on time and want to get things done.
|
# sorry for the fuzzy thinking but I'm short on time and want to get things done.
|
||||||
# (...famous last words).
|
# (...famous last words).
|
||||||
@@ -235,14 +236,14 @@ def subnode(node, user):
|
|||||||
search_subnodes = db.search_subnodes_by_user(node, user)
|
search_subnodes = db.search_subnodes_by_user(node, user)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
'subnode_rendered.html',
|
'subnode.html',
|
||||||
node=n,
|
node=n,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@bp.route('/subnode/<path:subnode>')
|
@bp.route('/subnode/<path:subnode>')
|
||||||
def old_subnode(subnode):
|
def old_subnode(subnode):
|
||||||
return render_template('subnode_rendered.html', subnode=db.subnode_by_uri(subnode), backlinks=db.subnodes_by_outlink(subnode))
|
return render_template('subnode.html', subnode=db.subnode_by_uri(subnode), backlinks=db.subnodes_by_outlink(subnode))
|
||||||
|
|
||||||
@bp.route('/u/<user>')
|
@bp.route('/u/<user>')
|
||||||
@bp.route('/user/<user>')
|
@bp.route('/user/<user>')
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ nav { font-family: sans-serif}
|
|||||||
padding: 0.8em; background: white; }
|
padding: 0.8em; background: white; }
|
||||||
.entries { list-style: none; margin: 0; padding: 0; }
|
.entries { list-style: none; margin: 0; padding: 0; }
|
||||||
.add-entry { font-size: 0.9em; border-bottom: 1px solid #ccc; }
|
.add-entry { font-size: 0.9em; border-bottom: 1px solid #ccc; }
|
||||||
.add-entry dl { font-weight: bold; }
|
.add-entry dl { font-weight: bolder; }
|
||||||
.metanav { text-align: right; font-size: 0.8em; padding: 0.3em;
|
.metanav { text-align: right; font-size: 0.8em; padding: 0.3em;
|
||||||
margin-bottom: 1em; background: #fafafa; }
|
margin-bottom: 1em; background: #fafafa; }
|
||||||
.flash { background: #cee5F5; padding: 0.5em;
|
.flash { background: #cee5F5; padding: 0.5em;
|
||||||
@@ -47,28 +47,37 @@ nav { font-family: sans-serif}
|
|||||||
content: "]]"
|
content: "]]"
|
||||||
}
|
}
|
||||||
|
|
||||||
.subnode {
|
.node, .context, .stoa {
|
||||||
/* background: #351a4a; */
|
/*border-color: #7f5af0;*/
|
||||||
/* background: #2a153b; */
|
border-color: gray;
|
||||||
background: #12091a;
|
border-style: dotted;
|
||||||
color: #cfcfcf;
|
margin: 10px;
|
||||||
padding: 0.5em;
|
border-radius: 20px;
|
||||||
margin-bottom: 10px;
|
padding: 10px;
|
||||||
border-radius: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pulled-subnode {
|
.subnode, .links {
|
||||||
|
background: #12091a;
|
||||||
|
/* background: #150d38; */
|
||||||
|
color: #cfcfcf;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 10px;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pulled-subnode, .pushed-subnode, .search, .stoa-public {
|
||||||
background: #101010;
|
background: #101010;
|
||||||
color: #cfcfcf;
|
color: #cfcfcf;
|
||||||
padding: 0.5em;
|
padding: 10px;
|
||||||
margin-bottom: 10px;
|
margin: 10px;
|
||||||
border-radius: 10px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.node-header {
|
.node-header, .context-header, .stoa-header {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
margin-left: 0.2em;
|
margin-left: 0.2em;
|
||||||
|
font-weight: bolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
.not-found {
|
.not-found {
|
||||||
@@ -82,43 +91,27 @@ nav { font-family: sans-serif}
|
|||||||
/*.subnode li { margin: 0.8em 1.2em; }*/
|
/*.subnode li { margin: 0.8em 1.2em; }*/
|
||||||
/*.subnode li h2 { margin-left: -1em; }*/
|
/*.subnode li h2 { margin-left: -1em; }*/
|
||||||
|
|
||||||
.subnode-header {
|
.subnode-header, .subnode-footer, .links-header, .search-header, .subnode-id {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
font-weight: bolder;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 10px;
|
|
||||||
border-radius: 10px;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subnode-footer {
|
.links-subnode {
|
||||||
font-style: italic;
|
|
||||||
width: 100%;
|
|
||||||
background: #1f1f1f;
|
|
||||||
color: #cfcfcf;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.subnode-id {
|
.links-flex {
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subnode-links {
|
.search-flex {
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.links {
|
.links {
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
background: #080808;
|
|
||||||
color: #cfcfcf;
|
|
||||||
padding: 0.5em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border-radius: 10px;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
/*
|
|
||||||
-webkit-transition: height 2s;
|
|
||||||
transition: height 2s;
|
|
||||||
*/
|
|
||||||
max-height: 250px;
|
max-height: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,53 +155,28 @@ nav { font-family: sans-serif}
|
|||||||
|
|
||||||
.pushlinks {
|
.pushlinks {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
background: #080808;
|
|
||||||
color: #cfcfcf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pulllinks {
|
.pulllinks {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
background: #080808;
|
|
||||||
color: #cfcfcf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.forwardlinks {
|
.forwardlinks {
|
||||||
background: #080808;
|
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.backlinks-header, .pushlinks-header, .pulllinks-header, .forwardlinks-header {
|
.backlinks-header, .pushlinks-header, .pulllinks-header, .forwardlinks-header {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.links-header {
|
|
||||||
font-weight: bold;
|
|
||||||
text-align: left;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
margin-left: 0.2em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
width: 100%;
|
background: #080808;
|
||||||
display: flex;
|
|
||||||
background: #080808;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
color: #cfcfcf;
|
|
||||||
padding: 0.5em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border-radius: 10px;
|
|
||||||
gap: 10px;
|
|
||||||
/*
|
|
||||||
-webkit-transition: height 2s;
|
|
||||||
transition: height 2s;
|
|
||||||
*/
|
|
||||||
max-height: 250px;
|
max-height: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-header {
|
.search-header {
|
||||||
font-weight: bold;
|
font-weight: bolder;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
margin-left: 0.2em;
|
margin-left: 0.2em;
|
||||||
@@ -227,7 +195,7 @@ nav { font-family: sans-serif}
|
|||||||
|
|
||||||
.search-agora-header, .search-internet-header {
|
.search-agora-header, .search-internet-header {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-weight: bold;
|
font-weight: bolder;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
{% include "node.html" %}
|
||||||
|
|
||||||
|
{% include "context.html" %}
|
||||||
|
|
||||||
|
{% include "stoa.html" %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<div class="context">
|
||||||
|
<span class="context-header">Context for [[do]] ↓</span><br />
|
||||||
|
|
||||||
|
{% include "links.html" %}
|
||||||
|
|
||||||
|
{% include "search.html" %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
+46
-48
@@ -14,56 +14,57 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- todo: rename context -->
|
|
||||||
<span class="links-header">Context</span><br />
|
|
||||||
<div class="links">
|
<div class="links">
|
||||||
<div class="backlinks">
|
<span class="links-header">Links</span>
|
||||||
<span class="backlinks-header">← back</span><br />
|
<div class="links-flex">
|
||||||
{% for link in backlinks %}
|
<div class="backlinks">
|
||||||
<a href="/node/{{link}}">{{link}}</a><br />
|
<span class="backlinks-header">← back</span><br />
|
||||||
{% endfor %}
|
{% for link in backlinks %}
|
||||||
<br />
|
<a href="/node/{{link}}">{{link}}</a><br />
|
||||||
</div>
|
{% endfor %}
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="pushlinks">
|
<div class="pushlinks">
|
||||||
<span class="pushlinks-header">↑ pushing</span><br />
|
<span class="pushlinks-header">↑ pushing</span><br />
|
||||||
{% if pushing_nodes %}
|
{% if pushing_nodes %}
|
||||||
{% for node in pushing_nodes %}
|
{% for node in pushing_nodes %}
|
||||||
<a href="/node/{{node.uri}}">{{node.uri}}</a><br />
|
<a href="/node/{{node.uri}}">{{node.uri}}</a><br />
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
(none)
|
(none)
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<div class="pulllinks">
|
<div class="pulllinks">
|
||||||
<span class="pulllinks-header"> ↑pushing</span><br />
|
<span class="pulllinks-header"> ↑pushing</span><br />
|
||||||
{% for node in pull_nodes %}
|
{% for node in pull_nodes %}
|
||||||
<a href="/node/{{node.uri}}">{{node.uri}}</a><br />
|
<a href="/node/{{node.uri}}">{{node.uri}}</a><br />
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<br />
|
<br />
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<span class="pulllinks-header">↓ pulling</span><br />
|
<span class="pulllinks-header">↓ pulling</span><br />
|
||||||
{% if pulling_nodes %}
|
{% if pulling_nodes %}
|
||||||
{% for node in pulling_nodes %}
|
{% for node in pulling_nodes %}
|
||||||
<a href="/node/{{node.uri}}">{{node.uri}}</a><br />
|
<a href="/node/{{node.uri}}">{{node.uri}}</a><br />
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
(none)
|
(none)
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="forwardlinks">
|
<div class="forwardlinks">
|
||||||
<span class="forwardlinks-header">→ forward</span><br />
|
<span class="forwardlinks-header">→ forward</span><br />
|
||||||
{% for link in forwardlinks %}
|
{% for link in forwardlinks %}
|
||||||
<a href="/node/{{link}}">{{link}}</a><br />
|
<a href="/node/{{link}}">{{link}}</a><br />
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<br />
|
<br />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -85,6 +86,3 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -14,9 +14,6 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
{% extends "base.html" %}
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
{% if not node.subnodes and not node.pushed_subnodes() %}
|
{% if not node.subnodes and not node.pushed_subnodes() %}
|
||||||
<div class="not-found">
|
<div class="not-found">
|
||||||
No node found at [[{{node.uri}}]].
|
No node found at [[{{node.uri}}]].
|
||||||
@@ -24,32 +21,31 @@ No node found at [[{{node.uri}}]].
|
|||||||
If you <a href="https://flancia.org/go/agora">contributed a matching subnode</a> with basename '{{node.uri}}' to the Agora (e.g. a note named {{node}}.md or an image named {{node}}.jpg), this node would exist :)
|
If you <a href="https://flancia.org/go/agora">contributed a matching subnode</a> with basename '{{node.uri}}' to the Agora (e.g. a note named {{node}}.md or an image named {{node}}.jpg), this node would exist :)
|
||||||
<br /><br />
|
<br /><br />
|
||||||
You can try searching or listing <a href="/nodes">all nodes</a>.<br /><br />
|
You can try searching or listing <a href="/nodes">all nodes</a>.<br /><br />
|
||||||
<strong>Existing permutations</strong> are optimistically pulled below.<br/>
|
Existing permutations are optimistically pulled below.<br/>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if node.subnodes %}
|
{% if node.subnodes %}
|
||||||
<div class="node">
|
<div class="node">
|
||||||
<span class="node-header"><strong>Node</strong> <a href="/node/{{node.uri}}">[[{{node.uri}}]]</a></span>:
|
<span class="node-header">Node <a href="/node/{{node.uri}}">[[{{node.uri}}]]</a> ↓</span>
|
||||||
|
|
||||||
{% for subnode in node.subnodes %}
|
{% for subnode in node.subnodes %}
|
||||||
<div class="subnode">
|
<div class="subnode">
|
||||||
<div class="subnode-header">
|
<div class="subnode-header">
|
||||||
<span class="subnode-id"><strong>Subnode</strong> <a href="/@{{subnode.user}}/{{node.uri}}">[[@{{subnode.user}}/{{node.uri}}]]</a></span><br />
|
<span class="subnode-id">Subnode <a href="/@{{subnode.user}}/{{node.uri}}">[[@{{subnode.user}}/{{node.uri}}]]</a></span><br />
|
||||||
<span class="subnode-links"><strong>from</strong> <a href="/raw/{{subnode.uri}}">{{subnode.uri}}</a> by <a href="/@{{subnode.user}}">@{{subnode.user}}</a></span>
|
<span class="subnode-links">from <a href="/raw/{{subnode.uri}}">{{subnode.uri}}</a> by <a href="/@{{subnode.user}}">@{{subnode.user}}</a></span>
|
||||||
</div>
|
</div>
|
||||||
{{ subnode.render()|linkify|safe }}
|
{{ subnode.render()|linkify|safe }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if node.pushed_subnodes() %}
|
{% if node.pushed_subnodes() %}
|
||||||
{% for subnode in node.pushed_subnodes() %}
|
{% for subnode in node.pushed_subnodes() %}
|
||||||
<div class="pulled-subnode">
|
<div class="pushed-subnode">
|
||||||
<div class="subnode-header">
|
<div class="subnode-header">
|
||||||
<span class="subnode-id"><strong>Subnode</strong> <a href="/@{{subnode.user}}/{{node.uri}}">[[@{{subnode.user}}/{{node.uri}}]]</a></span><br />
|
<span class="subnode-id">Subnode <a href="/@{{subnode.user}}/{{node.uri}}">[[@{{subnode.user}}/{{node.uri}}]]</a></span><br />
|
||||||
<span class="subnode-links"><strong>pushed from</strong> <a href="/subnode/{{subnode.uri}}">{{subnode.uri}}</a> by <a href="/@{{subnode.user}}">@{{subnode.user}}</a></span>
|
<span class="subnode-links">pushed from <a href="/subnode/{{subnode.uri}}">{{subnode.uri}}</a> by <a href="/@{{subnode.user}}">@{{subnode.user}}</a></span>
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
{{ subnode.render()|linkify|safe }}
|
{{ subnode.render()|linkify|safe }}
|
||||||
@@ -61,14 +57,14 @@ You can try searching or listing <a href="/nodes">all nodes</a>.<br /><br />
|
|||||||
|
|
||||||
{% for node in pull_nodes %}
|
{% for node in pull_nodes %}
|
||||||
<div class="node">
|
<div class="node">
|
||||||
<span class="node-header"><strong>Pulled node</strong> <a href="/node/{{node.uri}}">[[{{node.uri}}]]</a></span>:
|
<span class="node-header">Pulled node <a href="/node/{{node.uri}}">[[{{node.uri}}]]</a></span>:
|
||||||
|
|
||||||
{% if node.subnodes %}
|
{% if node.subnodes %}
|
||||||
{% for subnode in node.subnodes %}
|
{% for subnode in node.subnodes %}
|
||||||
<div class="pulled-subnode">
|
<div class="pulled-subnode">
|
||||||
<div class="subnode-header">
|
<div class="subnode-header">
|
||||||
<span class="subnode-id"><strong>Subnode</strong> <a href="/@{{subnode.user}}/{{node.uri}}">[[@{{subnode.user}}/{{node.uri}}]]</a></span><br />
|
<span class="subnode-id">Subnode <a href="/@{{subnode.user}}/{{node.uri}}">[[@{{subnode.user}}/{{node.uri}}]]</a></span><br />
|
||||||
<span class="subnode-links"><strong>from</strong> <a href="/raw/{{subnode.uri}}">{{subnode.uri}}</a> by <a href="/@{{subnode.user}}">@{{subnode.user}}</a></span>
|
<span class="subnode-links">from <a href="/raw/{{subnode.uri}}">{{subnode.uri}}</a> by <a href="/@{{subnode.user}}">@{{subnode.user}}</a></span>
|
||||||
</div>
|
</div>
|
||||||
{{ subnode.render()|linkify|safe }}
|
{{ subnode.render()|linkify|safe }}
|
||||||
</div>
|
</div>
|
||||||
@@ -79,11 +75,4 @@ You can try searching or listing <a href="/nodes">all nodes</a>.<br /><br />
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
{% include "links.html" %}
|
|
||||||
|
|
||||||
{% include "node_search.html" %}
|
|
||||||
|
|
||||||
{% include "stoa.html" %}
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright 2020 Google LLC
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<span class="search-header">Searching '{{node}}'</span><br />
|
|
||||||
<div class="search">
|
|
||||||
<div class="search-internet">
|
|
||||||
<span class="search-internet-header">Around the internet</span> <br />
|
|
||||||
↪ <a href="https://www.google.com/search?q={{q}}">Google</a> <br />
|
|
||||||
↪ <a href="https://www.duckduckgo.com/{{q}}">DuckDuckGo</a> <br />
|
|
||||||
↪ <a href="https://en.wikipedia.org/wiki/Special:Search/{{q}}">Wikipedia</a> <br />
|
|
||||||
↪ <a href="https://twitter.com/search/?f=live&q={{q}}">Twitter</a> <br />
|
|
||||||
↪ <a href="https://github.com/search?q={{q}}">Github</a> <br />
|
|
||||||
↪ <a href="https://forum.effectivealtruism.org/search?terms={{q}}">Effective Altruism</a> <br />
|
|
||||||
↪ <a href="https://www.lesswrong.com/search?terms={{q}}">Less Wrong</a> <br />
|
|
||||||
↪ <a href="http://encyclopedia.uia.org/en/problems?combine={{q}}">Encyclopedia of World Problems</a> <br />
|
|
||||||
↪ <a href="https://www.pubpub.org/search?q={{q}}">PubPub</a> <br />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="search-agora">
|
|
||||||
<span class="search-agora-header">In this Agora</span> <br />
|
|
||||||
{% if search %}
|
|
||||||
{% for subnode in search %}
|
|
||||||
<a href="/@{{subnode.user}}/{{subnode.wikilink}}">@{{subnode.user}}/{{subnode.wikilink}}</a><br />
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
No search results.
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<!--
|
||||||
|
Copyright 2020 Google LLC
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<!--{% if form.errors %}
|
||||||
|
{{ form.errors }}
|
||||||
|
{% endif %}
|
||||||
|
-->
|
||||||
|
|
||||||
|
<div class="listing">
|
||||||
|
<div class="formwrapper">
|
||||||
|
<h1>Search</h1>
|
||||||
|
<form method="POST" action="{{url_for('agora.oldsearch')}}">
|
||||||
|
<div class="form-field">{{ form.query.label }} {{ form.query(size=20, autofocus=true) }}
|
||||||
|
{{ form.csrf_token }}
|
||||||
|
{{ form.submit }}</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if subnodes %}
|
||||||
|
<br />
|
||||||
|
<h2> Results </h2>
|
||||||
|
{% for subnode in subnodes %}
|
||||||
|
(user: {{subnode.user}}) {{ subnode.uri }}: <a href="{{subnode.url}}">{{subnode.wikilink}}</a><br />
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
+25
-26
@@ -14,32 +14,31 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
{% extends 'base.html' %}
|
<div class="search">
|
||||||
|
<div class="search-flex">
|
||||||
|
<div class="search-internet">
|
||||||
|
<span class="search-internet-header">Search for '{{query}}' around the web</span> <br />
|
||||||
|
↪ <a href="https://www.google.com/search?q={{q}}">Google</a> <br />
|
||||||
|
↪ <a href="https://www.duckduckgo.com/{{q}}">DuckDuckGo</a> <br />
|
||||||
|
↪ <a href="https://en.wikipedia.org/wiki/Special:Search/{{q}}">Wikipedia</a> <br />
|
||||||
|
↪ <a href="https://twitter.com/search/?f=live&q={{q}}">Twitter</a> <br />
|
||||||
|
↪ <a href="https://github.com/search?q={{q}}">Github</a> <br />
|
||||||
|
↪ <a href="https://forum.effectivealtruism.org/search?terms={{q}}">Effective Altruism</a> <br />
|
||||||
|
↪ <a href="https://www.lesswrong.com/search?terms={{q}}">Less Wrong</a> <br />
|
||||||
|
↪ <a href="http://encyclopedia.uia.org/en/problems?combine={{q}}">Encyclopedia of World Problems</a> <br />
|
||||||
|
↪ <a href="https://www.pubpub.org/search?q={{q}}">PubPub</a> <br />
|
||||||
|
</div>
|
||||||
|
|
||||||
{% block content %}
|
<div class="search-agora">
|
||||||
|
<span class="search-agora-header">Search for '{{query}}' in the Agora</span> <br />
|
||||||
<!--{% if form.errors %}
|
{% if search %}
|
||||||
{{ form.errors }}
|
{% for subnode in search %}
|
||||||
{% endif %}
|
<a href="/@{{subnode.user}}/{{subnode.wikilink}}">@{{subnode.user}}/{{subnode.wikilink}}</a><br />
|
||||||
-->
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
<div class="listing">
|
No search results.
|
||||||
<div class="formwrapper">
|
{% endif %}
|
||||||
<h1>Search</h1>
|
</div>
|
||||||
<form method="POST" action="{{url_for('agora.oldsearch')}}">
|
</div>
|
||||||
<div class="form-field">{{ form.query.label }} {{ form.query(size=20, autofocus=true) }}
|
|
||||||
{{ form.csrf_token }}
|
|
||||||
{{ form.submit }}</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if subnodes %}
|
|
||||||
<br />
|
|
||||||
<h2> Results </h2>
|
|
||||||
{% for subnode in subnodes %}
|
|
||||||
(user: {{subnode.user}}) {{ subnode.uri }}: <a href="{{subnode.url}}">{{subnode.wikilink}}</a><br />
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|||||||
@@ -14,11 +14,10 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div class="node">
|
<div class="stoa">
|
||||||
<div class="node-header">
|
<span class="stoa-header">Stoa for [[{{node.uri}}]] ↓</span><br />
|
||||||
<span class="subnode-id"><strong>Stoas for '{{node.uri}}'</strong></span><br />
|
<div class="stoa-public">
|
||||||
<div class="pulled-subnode">
|
<span class="subnode-header">from <a href="https://stoa.anagora.org/p/{{node.uri}}">stoa.anagora.org/p/{{node.uri}}</a></span><br />
|
||||||
<span class="subnode-id"><strong>Scratchpad</strong> <a href="https://stoa.anagora.org/p/{{node.uri}}">/p/{{node.uri}}</a></span><br />
|
|
||||||
<iframe name="embed_readwrite" src="https://stoa.anagora.org/p/{{node.uri}}?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false" width="100%" height="600" frameborder="0"></iframe>
|
<iframe name="embed_readwrite" src="https://stoa.anagora.org/p/{{node.uri}}?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false" width="100%" height="600" frameborder="0"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,10 +30,8 @@ Try going up to node <a href="/node/{{node.uri}}">[[{{node.uri}}]]</a> or perhap
|
|||||||
{% for subnode in node.subnodes %}
|
{% for subnode in node.subnodes %}
|
||||||
<div class="subnode">
|
<div class="subnode">
|
||||||
<div class="subnode-header">
|
<div class="subnode-header">
|
||||||
|
<span>Subnode <a href="/@{{subnode.user}}/{{node.uri}}">[[@{{subnode.user}}/{{node.uri}}]]</a></span> in node <a href="/node/{{subnode.wikilink}}">[[{{subnode.wikilink}}]]</a></span><br />
|
||||||
|
<span class="subnode-links">from <a href="/raw/{{subnode.uri}}">{{subnode.uri}}</a> by <a href="/@{{subnode.user}}">@{{subnode.user}}</a></span>
|
||||||
<span><strong>Subnode</strong> <a href="/@{{subnode.user}}/{{node.uri}}">[[@{{subnode.user}}/{{node.uri}}]]</a></span> in <strong>node</strong> <a href="/node/{{subnode.wikilink}}">[[{{subnode.wikilink}}]]</a></span><br />
|
|
||||||
<span class="subnode-links"><strong>from</strong> <a href="/raw/{{subnode.uri}}">{{subnode.uri}}</a> by <a href="/@{{subnode.user}}">@{{subnode.user}}</a></span>
|
|
||||||
</div>
|
</div>
|
||||||
{{ subnode.render()|linkify|safe }}
|
{{ subnode.render()|linkify|safe }}
|
||||||
</div>
|
</div>
|
||||||
@@ -51,7 +49,7 @@ Try going up to node <a href="/node/{{node.uri}}">[[{{node.uri}}]]</a> or perhap
|
|||||||
<!-- old_subnode uses this -->
|
<!-- old_subnode uses this -->
|
||||||
{% if subnode %}
|
{% if subnode %}
|
||||||
<div class="subnode">
|
<div class="subnode">
|
||||||
<span class="subnode-header"><strong>Subnode</strong> <a href="/{{subnode.uri}}">[[{{subnode.uri}}]]</a> by <a href="/@{{subnode.user}}">@{{subnode.user}}</a> in node <a href="/node/{{subnode.wikilink}}">[[{{subnode.wikilink}}]]</a></span>
|
<span class="subnode-header">Subnode <a href="/{{subnode.uri}}">[[{{subnode.uri}}]]</a> by <a href="/@{{subnode.user}}">@{{subnode.user}}</a> in node <a href="/node/{{subnode.wikilink}}">[[{{subnode.wikilink}}]]</a></span>
|
||||||
{{ subnode.render()|linkify|safe }}
|
{{ subnode.render()|linkify|safe }}
|
||||||
</div>
|
</div>
|
||||||
<div class="links">
|
<div class="links">
|
||||||
|
|||||||
Reference in New Issue
Block a user