endorsement/templates/allusers.html

43 lines
1.3 KiB
HTML
Raw Normal View History

{% extends 'base.html' %}
{% block head %}
<script src="/js/users.js"></script>
{% endblock %}
{% block content %}
<div class="section">
<div class="container">
<h1 class="title is-2">Endorsements</h1>
<div class="field">
<p class="control has-icons-left has-icons-right">
<input oninput="searchUser(this.value)" class="input" type="text" placeholder="Search">
<span class="icon is-small is-left">
<i class="fas fa-search"></i>
</span>
</p>
</div>
<div class="tile is-ancestor">
<div id="users-parent" class="tile is-parent is-vertical">
{% for user in data -%}
<!-- If you update this block, update it also in the js search function -->
<a href="{{url_for('get_user', id=user.id)}}" class="tile is-child box is-4">
<!-- The magical tile element! -->
<p class="title">{{ user.id }}</p>
<div class="content">
{{ user.achievements|length }} achievement{{ "s" if (user.achievements|length != 1) else "" }}
</div>
</a>
{% endfor -%}
</div>
</div>
</div>
</div>
<script>
var users = {{ data|safe }};
</script>
{% endblock %}