NDOJ/templates/profile-table.html

77 lines
3.3 KiB
HTML
Raw Normal View History

2024-05-22 04:09:22 +00:00
{% if request.profile %}
<div class="blog-sidebox sidebox">
<h3 class="bold-text colored-text"><i class="fa fa-user"></i>{{ _('Profile') }}</h3>
<div class="toggled sidebox-content">
<div class="profile-card">
<div class="card-header">
<a href="{{url('user_page')}}">
<img class="avatar" src="{{ gravatar(request.profile) }}" alt="User Avatar">
</a>
<h4>{{ link_user(request.profile) }}</h4>
</div>
<div class="card-body">
<div class="user-info">
<div><i class="fa fa-star {{request.profile.css_class}}"></i> {{_('Rating')}}</div>
<div class="{{ request.profile.css_class }}">{{ request.profile.rating if request.profile.rating else '-' }}</div>
</div>
<div class="user-info">
<div
title="
{%- trans trimmed counter=request.profile.problem_count %}
{{ counter }} problem solved
{% pluralize %}
{{ counter }} problems solved
{% endtrans -%}"
><i class="green icofont-tick-mark"></i> {{_('Problems')}}</div>
2024-05-22 04:09:22 +00:00
<span class="user-info-body">{{ request.profile.problem_count }}</span>
</div>
<div class="user-info">
<div
title="{{_('Total points')}}"
><i class="fa fa-trophy darkcyan"></i> {{_('Points')}}</div>
2024-05-22 04:09:22 +00:00
<div class="user-info-body"><span title="{{ request.profile.performance_points|floatformat(2) }}">
{{ request.profile.performance_points|floatformat(0) }}
</span></div>
</div>
<div class="user-info">
<div title="{{_('Rank by rating')}}"><i class="fa fa-globe peru" ></i> {{_('Rating')}} #</div>
<div class="user-info-body">{{rating_rank if rating_rank else '-'}}</div>
</div>
2024-05-22 04:09:22 +00:00
<div class="user-info">
<div title="{{_('Rank by points')}}"><i class="fa fa-globe blue" ></i> {{_('Points')}} #</div>
<div class="user-info-body">{{points_rank if points_rank else '-'}}</div>
2024-05-22 04:09:22 +00:00
</div>
{% if awards.medals %}
<div class="user-info">
<div title="{{ _('Awards') }}"><i class="fa fa-medal"></i> {{ _('Awards') }}</div>
2024-05-22 04:09:22 +00:00
</div>
{% endif %}
</div>
{% if awards %}
<div class="medals-container">
{% if awards.gold_count > 0 %}
<div class="medal-item">
<img src="{{ static('awards/gold-medal.png') }}" alt="Gold Medal">
<span class="medal-count">{{ awards.gold_count }}</span>
</div>
{% endif %}
{% if awards.silver_count > 0 %}
<div class="medal-item">
<img src="{{ static('awards/silver-medal.png') }}" alt="Silver Medal">
<span class="medal-count">{{ awards.silver_count }}</span>
</div>
{% endif %}
{% if awards.bronze_count > 0 %}
<div class="medal-item">
<img src="{{ static('awards/bronze-medal.png') }}" alt="Bronze Medal">
<span class="medal-count">{{ awards.bronze_count }}</span>
</div>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}