turn search into include, limit user results, minimum term search 2, show date of address addition

This commit is contained in:
dsc 2022-03-12 22:06:22 +02:00
parent 37208b102b
commit b13f03855d
10 changed files with 50 additions and 48 deletions

View file

@ -77,7 +77,7 @@
</div>
<div id="footer">
2022 - ... [the future is w0w]
{{ year }} - ... [the future is w0w]
</div>
</body>
</html>

View file

@ -9,7 +9,7 @@
<a href="{{ url_for('bp_routes.login') }}">Login</a>
{% else %}
<a href="{{ url_for('bp_routes.logout') }}">Logout</a>
<a href="{{ url_for('bp_routes.dashboard') }}">Dashboard</a>
<a href="{{ url_for('bp_routes.dashboard') }}">My Profile</a>
{% endif %}
<a href="{{ url_for('bp_routes.search') }}">Yell<span>WOW</span>Page search</a>
<a href="{{ url_for('bp_routes.about') }}">About</a>

View file

@ -0,0 +1,3 @@
<form action="{{ url_for('bp_routes.search') }}" method="GET">
<input type="text" name="username" placeholder="Search for an username...">
</form>

View file

@ -0,0 +1,11 @@
<div id="addresses">
{% for user in users %}
<article>
<header>
<em>{{user.username}}</em>
<small style="float: right">Added: {{ user.created_dt }}</small>
</header>
<kbd>{{user.address}}</kbd>
</article>
{% endfor %}
</div>

View file

@ -10,7 +10,13 @@
</main>
<div>
The first <img src="../../static/wownero.png" alt=""> addresses library -
from the community to the community
from the community, for the community.
</div>
<br><br>
<div style="margin-top:40px;">
<a style="text-decoration: none;" href="{{ url_for('bp_routes.search') }}">
<button style="max-width:320px;">start searching</button>
</a>
</div>
</div>

View file

@ -5,20 +5,9 @@
</div>
<div id="main">
<form action="{{ url_for('bp_routes.search') }}" method="GET">
<input type="text" name="username" placeholder="Search for an username...">
</form>
{% include 'includes/search.html' %}
<div id="addresses">
{% for user in users %}
<article>
<header>
<em>{{user.username}}</em>
</header>
<kbd>{{user.address}}</kbd>
</article>
{% endfor %}
</div>
{% include 'includes/user_results.html' %}
</div>
<style>
@ -42,13 +31,7 @@
#addresses::-webkit-scrollbar {
display: none;
}
#footer {
height: 12vh;
width: 100%;
text-align: center;
}
@media (max-width: 800px) {
kbd {
width: 100vw;

View file

@ -5,25 +5,15 @@
</div>
<div id="main">
<form action="{{ url_for('bp_routes.search') }}" method="GET">
<input type="text" name="username" placeholder="Username to search">
</form>
{% include 'includes/search.html' %}
<br>
Result(s): {{users|length}}
{% if not users %}
<br>Nothing found...
<br>Nothing found...
{% else %}
<div id="addresses">
{% for user in users %}
<article>
<header>
<em>{{user.username}}</em>
</header>
<kbd>{{user.address}}</kbd>
</article>
{% endfor %}
</div>
{% include 'includes/user_results.html' %}
{% endif %}
</div>
@ -45,11 +35,6 @@
#addresses::-webkit-scrollbar{
display: none;
}
#footer{
height: 12vh;
width: 100%;
text-align: center;
}
@media (max-width: 800px) {
kbd{
width: 100vw;