diff --git a/app/agora.py b/app/agora.py index 6e862842e..7eaa77b58 100644 --- a/app/agora.py +++ b/app/agora.py @@ -176,7 +176,8 @@ def node(node,user_list=[]): search_subnodes = db.search_subnodes(node) return render_template( - 'node_rendered.html', + # yuck + 'content.html', node=n, backlinks=n.back_links(), pull_nodes=n.pull_nodes() if n.subnodes else permutations, @@ -184,7 +185,7 @@ def node(node,user_list=[]): search=search_subnodes, pulling_nodes=n.pulling_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 :). # sorry for the fuzzy thinking but I'm short on time and want to get things done. # (...famous last words). @@ -235,14 +236,14 @@ def subnode(node, user): search_subnodes = db.search_subnodes_by_user(node, user) return render_template( - 'subnode_rendered.html', + 'subnode.html', node=n, ) @bp.route('/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/') @bp.route('/user/') diff --git a/app/static/css/screen-dark.css b/app/static/css/screen-dark.css index cb38b4400..bbe37753d 100644 --- a/app/static/css/screen-dark.css +++ b/app/static/css/screen-dark.css @@ -30,7 +30,7 @@ nav { font-family: sans-serif} padding: 0.8em; background: white; } .entries { list-style: none; margin: 0; padding: 0; } .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; margin-bottom: 1em; background: #fafafa; } .flash { background: #cee5F5; padding: 0.5em; @@ -47,28 +47,37 @@ nav { font-family: sans-serif} content: "]]" } -.subnode { - /* background: #351a4a; */ - /* background: #2a153b; */ - background: #12091a; - color: #cfcfcf; - padding: 0.5em; - margin-bottom: 10px; - border-radius: 10px; +.node, .context, .stoa { + /*border-color: #7f5af0;*/ + border-color: gray; + border-style: dotted; + margin: 10px; + border-radius: 20px; + padding: 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; color: #cfcfcf; - padding: 0.5em; - margin-bottom: 10px; - border-radius: 10px; + padding: 10px; + margin: 10px; + border-radius: 20px; } -.node-header { +.node-header, .context-header, .stoa-header { text-align: left; margin-bottom: 1em; margin-left: 0.2em; + font-weight: bolder; } .not-found { @@ -82,43 +91,27 @@ nav { font-family: sans-serif} /*.subnode li { margin: 0.8em 1.2em; }*/ /*.subnode li h2 { margin-left: -1em; }*/ -.subnode-header { - font-style: italic; +.subnode-header, .subnode-footer, .links-header, .search-header, .subnode-id { + font-style: italic; + font-weight: bolder; width: 100%; - margin-bottom: 10px; - border-radius: 10px; display: inline-block; } -.subnode-footer { - font-style: italic; - width: 100%; - background: #1f1f1f; - color: #cfcfcf; - margin-bottom: 10px; - border-radius: 10px; +.links-subnode { } -.subnode-id { +.links-flex { + display: flex; } -.subnode-links { +.search-flex { + display: flex; } .links { - width: 100%; - display: flex; - background: #080808; - color: #cfcfcf; - padding: 0.5em; - margin-bottom: 10px; - border-radius: 10px; overflow: auto; gap: 10px; - /* - -webkit-transition: height 2s; - transition: height 2s; - */ max-height: 250px; } @@ -162,53 +155,28 @@ nav { font-family: sans-serif} .pushlinks { width: 20%; - background: #080808; - color: #cfcfcf; } .pulllinks { width: 20%; - background: #080808; - color: #cfcfcf; } .forwardlinks { - background: #080808; width: 50%; } .backlinks-header, .pushlinks-header, .pulllinks-header, .forwardlinks-header { 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 { - width: 100%; - display: flex; - background: #080808; + background: #080808; 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; } .search-header { - font-weight: bold; + font-weight: bolder; text-align: left; margin-bottom: 1em; margin-left: 0.2em; @@ -227,7 +195,7 @@ nav { font-family: sans-serif} .search-agora-header, .search-internet-header { font-style: italic; - font-weight: bold; + font-weight: bolder; margin-bottom: 1em; } diff --git a/app/templates/content.html b/app/templates/content.html new file mode 100644 index 000000000..eb129a473 --- /dev/null +++ b/app/templates/content.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block content %} + +{% include "node.html" %} + +{% include "context.html" %} + +{% include "stoa.html" %} + +{% endblock %} + diff --git a/app/templates/context.html b/app/templates/context.html new file mode 100644 index 000000000..4a7622f35 --- /dev/null +++ b/app/templates/context.html @@ -0,0 +1,10 @@ +
+Context for [[do]] ↓
+ +{% include "links.html" %} + +{% include "search.html" %} + +
+ + diff --git a/app/templates/links.html b/app/templates/links.html index 7833c0ebc..f426545de 100644 --- a/app/templates/links.html +++ b/app/templates/links.html @@ -14,56 +14,57 @@ limitations under the License. --> - -Context
{% endif %} - - - diff --git a/app/templates/node_rendered.html b/app/templates/node.html similarity index 55% rename from app/templates/node_rendered.html rename to app/templates/node.html index aff0efd51..00ab6267e 100644 --- a/app/templates/node_rendered.html +++ b/app/templates/node.html @@ -14,9 +14,6 @@ limitations under the License. --> -{% extends "base.html" %} -{% block content %} - {% if not node.subnodes and not node.pushed_subnodes() %}
No node found at [[{{node.uri}}]]. @@ -24,32 +21,31 @@ No node found at [[{{node.uri}}]]. If you contributed a matching subnode with basename '{{node.uri}}' to the Agora (e.g. a note named {{node}}.md or an image named {{node}}.jpg), this node would exist :)

You can try searching or listing all nodes.

-Existing permutations are optimistically pulled below.
+Existing permutations are optimistically pulled below.
{% endif %} {% if node.subnodes %}
-Node [[{{node.uri}}]]: +Node [[{{node.uri}}]] {% for subnode in node.subnodes %} {% endfor %} -
{% endif %} {% if node.pushed_subnodes() %} {% for subnode in node.pushed_subnodes() %} -
+
diff --git a/app/templates/node_search.html b/app/templates/node_search.html deleted file mode 100644 index 2d772321d..000000000 --- a/app/templates/node_search.html +++ /dev/null @@ -1,44 +0,0 @@ - -
- -Searching '{{node}}'
- - diff --git a/app/templates/oldsearch.html b/app/templates/oldsearch.html new file mode 100644 index 000000000..431e397da --- /dev/null +++ b/app/templates/oldsearch.html @@ -0,0 +1,45 @@ + + +{% extends 'base.html' %} + +{% block content %} + + + +
+
+

Search

+
+
{{ form.query.label }} {{ form.query(size=20, autofocus=true) }} + {{ form.csrf_token }} + {{ form.submit }}
+
+
+ +{% if subnodes %} +
+

Results

+{% for subnode in subnodes %} +(user: {{subnode.user}}) {{ subnode.uri }}: {{subnode.wikilink}}
+{% endfor %} +{% endif %} +
+ +{% endblock %} diff --git a/app/templates/search.html b/app/templates/search.html index 431e397da..9e88cfb15 100644 --- a/app/templates/search.html +++ b/app/templates/search.html @@ -14,32 +14,31 @@ limitations under the License. --> -{% extends 'base.html' %} +