here lies david saint evans

revamp-ui
lza_menace 1 year ago
parent e6733cd939
commit 950259450e

@ -26,6 +26,7 @@ def index():
crypto = request.args.get("chain", "monero")
onion = request.args.get("onion", False)
i2p = request.args.get("i2p", False)
country = request.args.get('country')
show_all = "true" == request.args.get("all", "false")
web_compatible = request.args.get("cors", False)
highest_block = get_highest_block(nettype, crypto)
@ -52,9 +53,6 @@ def index():
if i2p:
nodes = nodes.where(Node.is_i2p == True)
nodes = [n for n in nodes]
shuffle(nodes)
countries = {}
for node in nodes:
c = node.country_code
@ -63,6 +61,14 @@ def index():
if c not in countries:
countries[c] = 0
countries[c] += 1
if country:
if country == '??':
country = None
nodes = nodes.where(Node.country_code == country)
nodes = [n for n in nodes]
shuffle(nodes)
return render_template(
"index.html",

@ -5,6 +5,14 @@ body {
font-size: 14px;
}
.top-section {
padding: 3rem 1.5rem 0 1.5rem;
}
.bottom-section {
padding: 1rem 1.5rem;
}
.checkbox:hover, .radio:hover {
color: #f9f9f9;
}

@ -4,8 +4,7 @@
<div class="container">
<div class="columns section">
<div class="columns top-section">
<div class="column">
<h2 class="title is-4">Add A Node</h2>
<form method="POST" action="{{ url_for('meta.add') }}" id="addNodeForm">
@ -70,8 +69,7 @@
</form>
</div>
</div>
<div id="nodes" class="section">
<div id="nodes" class="bottom-section">
{% if (nodes | length) == 0 %}
<div class="section">
<h1 class="title is-5">No nodes in the database yet...</h1>
@ -100,11 +98,17 @@
</p>
{% for country in countries %}
<span class="tag is-dark">
<span class="fflag fflag-{{ country }} ff-md m-4" title="{{ country }}"></span>
{{ country }}
({{ countries[country] }})
</span>
{% if 'country' in request.args %}
<a href="{{ request.path }}?{{ request.args | pop_arg('country') }}&country={{ country }}">
{% else %}
<a href="{% if request.args %}{{ request.url }}&{% else %}?{% endif %}country={{ country}}">
{% endif %}
<span class="tag is-dark">
<span class="fflag fflag-{{ country }} ff-md m-4" title="{{ country }}"></span>
{{ country }}
({{ countries[country] }})
</span>
</a>
{% endfor %}
<br>

Loading…
Cancel
Save