new: usr: add new profile charts and stats - & add new logo to the tech stack #5
This commit is contained in:
@@ -225,10 +225,13 @@
|
||||
<a href="https://vitejs.dev" target="_blank" rel="noopener" class="tech-link">
|
||||
<img src="{{ asset('images/technologies/vite.svg') }}" alt="Vite"/>
|
||||
</a>
|
||||
<a href="https://bun.sh" target="_blank" rel="noopener" class="tech-link">
|
||||
<img src="{{ asset('images/technologies/bun.svg') }}" alt="Bun"/>
|
||||
</a>
|
||||
<a href="https://www.jetbrains.com/phpstorm" target="_blank" rel="noopener" class="tech-link">
|
||||
<a href="https://bun.sh" target="_blank" rel="noopener" class="tech-link">
|
||||
<img src="{{ asset('images/technologies/bun.svg') }}" alt="Bun"/>
|
||||
</a>
|
||||
<a href="https://www.postgresql.org" target="_blank" rel="noopener" class="tech-link">
|
||||
<img src="{{ asset('images/technologies/postgresql.svg') }}" alt="PostgreSQL"/>
|
||||
</a>
|
||||
<a href="https://www.jetbrains.com/phpstorm" target="_blank" rel="noopener" class="tech-link">
|
||||
<img src="{{ asset('images/technologies/phpstorm.svg') }}" alt="PHPStorm"/>
|
||||
</a>
|
||||
<a href="https://archlinux.org" target="_blank" rel="noopener" class="tech-link">
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{% extends 'Game/index.html.twig' %}
|
||||
|
||||
{% macro stat_val(value, suffix) %}
|
||||
{%- set abbr = value >= 1000 -%}
|
||||
<span class="profile-stat__value"{% if abbr %} title="{{ value }}"{% endif %}>{% if abbr %}{{ (value / 1000)|round(1, 'floor') }}k{% else %}{{ value }}{% endif %}{% if suffix %}<small>{{ suffix }}</small>{% endif %}</span>
|
||||
{% endmacro %}
|
||||
|
||||
{% block title %} - Profile{% endblock %}
|
||||
|
||||
{% block metas %}
|
||||
@@ -45,44 +50,64 @@
|
||||
<div class="profile-stats">
|
||||
<div class="profile-stat">
|
||||
<i class="fas fa-gamepad profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.total }}</span>
|
||||
{{ _self.stat_val(stats.total) }}
|
||||
<span class="profile-stat__label">Games played</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--win">
|
||||
<i class="fas fa-trophy profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.wins }}</span>
|
||||
{{ _self.stat_val(stats.wins) }}
|
||||
<span class="profile-stat__label">Victories</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--loss">
|
||||
<i class="fas fa-flag profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.losses }}</span>
|
||||
{{ _self.stat_val(stats.losses) }}
|
||||
<span class="profile-stat__label">Defeats</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--draw">
|
||||
<i class="fas fa-minus profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.draws }}</span>
|
||||
{{ _self.stat_val(stats.draws) }}
|
||||
<span class="profile-stat__label">Draws</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--rate">
|
||||
<i class="fas fa-percent profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.winRate }}<small>%</small></span>
|
||||
{{ _self.stat_val(stats.winRate, '%') }}
|
||||
<span class="profile-stat__label">Win rate</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--avg">
|
||||
<i class="fas fa-chart-line profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.avgScore }}</span>
|
||||
{{ _self.stat_val(stats.avgScore) }}
|
||||
<span class="profile-stat__label">Avg score</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--best">
|
||||
<i class="fas fa-star profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.bestScore }}</span>
|
||||
<span class="profile-stat__label">Best score</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--bomb">
|
||||
<i class="fas fa-bomb profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.bombs }}</span>
|
||||
{{ _self.stat_val(stats.minesHit) }}
|
||||
<span class="profile-stat__label">Mines hit</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--bonus">
|
||||
<i class="fas fa-star profile-stat__icon"></i>
|
||||
{{ _self.stat_val(stats.bonusPoints) }}
|
||||
<span class="profile-stat__label">Bonus points</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--avg-bonus">
|
||||
<i class="fas fa-chart-simple profile-stat__icon"></i>
|
||||
{{ _self.stat_val(stats.avgBonus) }}
|
||||
<span class="profile-stat__label">Avg bonus</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--chain">
|
||||
<i class="fas fa-link profile-stat__icon"></i>
|
||||
{{ _self.stat_val(stats.bestChain) }}
|
||||
<span class="profile-stat__label">Best chain</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--blind">
|
||||
<i class="fas fa-bullseye profile-stat__icon"></i>
|
||||
{{ _self.stat_val(stats.blindHits) }}
|
||||
<span class="profile-stat__label">Blind hits</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--edge">
|
||||
<i class="fas fa-border-style profile-stat__icon"></i>
|
||||
{{ _self.stat_val(stats.edgeMines) }}
|
||||
<span class="profile-stat__label">Edge mines</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if stats.total > 0 %}
|
||||
|
||||
Reference in New Issue
Block a user