fix filtering

i2p
lza_menace 4 years ago
parent 34700c09f6
commit 6a1ecc0b7d

@ -37,6 +37,7 @@ def index():
nettype = request.args.get("nettype", "mainnet") nettype = request.args.get("nettype", "mainnet")
crypto = request.args.get("crypto", "monero") crypto = request.args.get("crypto", "monero")
onion = request.args.get("onion", False)
nodes = Node.select().where( nodes = Node.select().where(
Node.validated==True Node.validated==True
@ -47,6 +48,9 @@ def index():
).order_by( ).order_by(
Node.datetime_entered.desc() Node.datetime_entered.desc()
) )
if onion:
nodes = nodes.where(Node.is_tor==True)
paginated = nodes.paginate(page, itp) paginated = nodes.paginate(page, itp)
total_pages = nodes.count() / itp total_pages = nodes.count() / itp
return render_template( return render_template(

@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Monero icon</title><path d="M12 0C5.365 0 0 5.373 0 12.015c0 1.335.228 2.607.618 3.81h3.577V5.729L12 13.545l7.805-7.815v10.095h3.577c.389-1.203.618-2.475.618-3.81C24 5.375 18.635 0 12 0zm-1.788 15.307l-3.417-3.421v6.351H1.758C3.87 21.689 7.678 24 12 24s8.162-2.311 10.245-5.764h-5.04v-6.351l-3.386 3.421-1.788 1.79-1.814-1.79h-.005z"/></svg>

After

Width:  |  Height:  |  Size: 419 B

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1847.7 599.61"><defs><style>.cls-1{fill:#ff2ad4;}.cls-2{fill:#fc0;}.cls-3{fill:#fff;}.cls-4{isolation:isolate;}</style></defs><title>WOW-WOW</title><g id="Layer_2" data-name="Layer 2"><g id="svg24"><g id="Identity"><g id="g10"><path id="path6" class="cls-1" d="M1194.14,183.11a300.32,300.32,0,0,0-159.5-159.49,300.08,300.08,0,0,0-233.39,0A300.26,300.26,0,0,0,641.76,183.11a300.08,300.08,0,0,0,0,233.39A300.32,300.32,0,0,0,801.25,576a300.19,300.19,0,0,0,233.39,0,300.39,300.39,0,0,0,159.5-159.5,300.19,300.19,0,0,0,0-233.39Z"/><path id="path4" class="cls-2" d="M785.66,204.14l9.78,172.23L918,240.49l122.32,136.16s8.85-145.66,10.42-172.23H1189.8C1150.41,92.06,1043.59,11.72,918,11.72c-125.28,0-232.19,80.44-271.77,192.43C664.63,204.33,785.66,204.14,785.66,204.14Z"/><path id="path8" class="cls-3" d="M1193.49,214.85H1060.38l-10.8,188.09c-13.83-16.05-124.53-138-131.82-146.58-4.33,4.89-131.64,146.21-131.64,146.21l-10.7-187.72H642.59A287.12,287.12,0,0,0,630,299.25C630,458.1,759.1,587.34,918,587.34s288.09-129.24,288.09-288.09a290.07,290.07,0,0,0-12.64-84.4ZM918,567.42c-146.21,0-264.85-118.63-264.85-264.85a262.53,262.53,0,0,1,8.21-65.86h93.45c.56,9.5,12.73,221.49,12.73,221.49L918.22,291.78,1069.6,458.84s0,.09,12.92-222.13H1175a267.18,267.18,0,0,1,7.84,65.86c0,146.22-118.63,264.85-264.84,264.85Z"/></g></g><g class="cls-4"><path class="cls-3" d="M442.64,369.92,503.38,37.85H630L517.56,567.42H385.17L314.25,265.54,244.78,567.42h-132L0,37.85H126.94l60.73,332.07L260.42,37.85H368.8Z"/></g><g class="cls-4"><path class="cls-3" d="M1660.39,369.92l60.74-332.07H1847.7L1735.31,567.42H1602.92L1532,265.54l-69.47,301.88h-132L1217.75,37.85h126.94l60.74,332.07,72.74-332.07h108.39Z"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -43,7 +43,7 @@
<tbody> <tbody>
{% for node in nodes %} {% for node in nodes %}
<tr> <tr>
<td>{% if node.is_tor %}<img src="/static/images/tor.svg" width="20px">{% endif %}{{ node.url }}</td> <td>{% if node.is_tor %}<img src="/static/images/tor.svg" width="15px">{% endif %}{{ node.url }}</td>
<td> <td>
{% if node.available %} {% if node.available %}
<div class="icon-check" style="color:green;"></div> <div class="icon-check" style="color:green;"></div>
@ -68,10 +68,13 @@
<p>No nodes in the database yet...</p> <p>No nodes in the database yet...</p>
{% endif %} {% endif %}
<br> <br>
<a href="/?nettype=mainnet"><button class="pure-button search-btn">Mainnet</button></a> <a href="{% if 'crypto' in request.args %}{{ request.url }}&{% else %}/?{% endif %}nettype=mainnet"><button class="pure-button search-btn">Mainnet</button></a>
<a href="/?nettype=testnet"><button class="pure-button search-btn">Testnet</button></a> <a href="{% if 'crypto' in request.args %}{{ request.url }}&{% else %}/?{% endif %}nettype=testnet"><button class="pure-button search-btn">Testnet</button></a>
<a href="/?nettype=stagenet"><button class="pure-button search-btn">Stagenet</button></a> <a href="{% if 'crypto' in request.args %}{{ request.url }}&{% else %}/?{% endif %}nettype=stagenet"><button class="pure-button search-btn">Stagenet</button></a>
<a href="/?crypto=wownero"><button class="pure-button search-btn wownero">Wownero</button></a> {% if 'onion' not in request.args %}<a href="{% if 'nettype' in request.args or 'crypto' in request.args %}{{ request.url }}&{% else %}/?{% endif %}onion=true"><button class="pure-button search-btn"><img src="/static/images/tor.svg" width=15px> Onion</button></a>{% endif %}
<a href="/?crypto=wownero"><button class="pure-button search-btn wownero"><img src="/static/images/wownero.svg" width=50px></button></a>
<br>
<a href="/"><button class="pure-button search-btn button-warning">Clear</button></a>
</div> </div>
</div> </div>

Loading…
Cancel
Save