templates/user_profile/index.html.twig line 1
{% extends 'base.html.twig' %}
{% block title %}Profile{% endblock %}
{% block body %}
<div class="grid-container fluid full-width" style="padding: 50px 0 50px 0;">
<div class="grid-x grid-padding-y grid-padding-x">
<div class="small-12 cell">
<div class="grid-container" style="max-width: 1200px;">
<div class="grid-x">
<div class="small-12 large-2 cell" style="text-align: center;">
<img class="user-profile-avatar" style="display: block;" src="{{ asset('build/images/web/icon-profile-otter.png') }}" />
<h2 style="text-align: center; padding: 0; margin: 0;">{{ user.username ? user.username : '' }}</h2>
{% if user.activeWallet is defined and user.activeWallet.address is defined %}
<a href="https://explorer.thetatoken.org/account/{{ user.activeWallet.address }}" target="_blank"><span style="font-weight: normal; font-size: 1em; color: #999; font-family: sans-serif;">{{ user.activeWallet.address ? user.activeWallet.address|slice(0,6) ~ '...' ~ user.activeWallet.address|slice(37,42) : '' }}</span></a>
{% endif %}
</div>
<div class="small-12 large-8 cell">
<div class="grid-x">
<div class="small-12 large-offset-1 cell">
<span class='family-orgovan' style="font-size: 3em;">{{ user.experience|number_format(0,'.',',') }}</span>
<span style="font-size: 2em; font-weight: bold; color: goldenrod;"> <em>{{ currentRank }}</em></span>
</div>
<div class="small-12 large-offset-1 cell">
<div class="grid-x">
{% set luck, distance, tension = 0, 3, 0 %}
{% for gear in userGear %}
<div class="small-12 large-1 cell" style="padding:5px;">
{% if gear.inventoryEquipment is not null %}
{% set luck = luck + gear.inventoryEquipment.statStar %}
{% set distance = distance + gear.inventoryEquipment.statRectangle %}
{% set tension = tension + gear.inventoryEquipment.statCircle %}
<img style="border-radius: 10px;" src="{{ asset('https://tinyknightgames.s3.us-east-2.amazonaws.com' ~ gear.inventoryEquipment.template.imageUrl) }}" alt="{{ gear.inventoryEquipment.template.name }}"/></a>
{% endif %}
{% if gear.nftMetadata is not null %}
{% set luck = luck + gear.nftMetadata.statStar %}
{% set distance = distance + gear.nftMetadata.statRectangle %}
{% set tension = tension + gear.nftMetadata.statCircle %}
{% if gear.nftMetadata.nftMetadataQuest.progress > gear.nftMetadata.nftMetadataQuest.goal %}
{% set luck = luck + gear.nftMetadata.nftMetadataQuest.statStarMod %}
{% set distance = distance + gear.nftMetadata.nftMetadataQuest.statRectangleMod %}
{% set tension = tension + gear.nftMetadata.nftMetadataQuest.statCircleMod %}
{% endif %}
<a href="{{ path('explorer_asset_detail', { id: gear.nftMetadata.nftHub.id }) }}"><img style="border:3px solid #fff; border-radius: 7px;" src="{{ asset(gear.nftMetadata.imageUrl) }}" alt="{{ gear.nftMetadata.name }}"/></a>
{% endif %}
</div>
{% endfor %}
<div class="small-12 large-5 end cell"></div>
<div class="small-12 large-2 cell">
<div style="background: purple; margin: 5px; padding: 5px; border-radius: 5px; font-size: .9em; font-weight: bold; text-align: center;">
L: {{ luck }}
</div>
</div>
<div class="small-12 large-2 cell">
<div style="background: purple; margin: 5px; padding: 5px; border-radius: 5px; font-size: .9em; font-weight: bold; text-align: center;">
D: {{ distance }}
</div>
</div>
<div class="small-12 large-2 cell">
<div style="background: purple; margin: 5px; padding: 5px; border-radius: 5px; font-size: .9em; font-weight: bold; text-align: center;">
T: {{ tension }}
</div>
</div>
</div>
</div>
<div class="small-12 large-offset-1 cell" style="background: #222; border-radius: 10px; padding: 15px; margin-top: 15px;">
<div class="grid-container">
<div class="grid-x">
{% if userRecords is not null %}
<div class="small-12 large-3">
<p class="user-profile-record-num">{{ userRecords.totalCaught ? userRecords.totalCaught|number_format(0,'.',',') : 0 }}</p>
<p class="user-profile-record-label">Caught</p>
</div>
<div class="small-12 large-3">
<p class="user-profile-record-num">{{ userRecords.totalSalvaged ? userRecords.totalSalvaged|number_format(0,'.',',') : 0 }}</p>
<p class="user-profile-record-label">Salvaged</p>
</div>
<div class="small-12 large-3">
<p class="user-profile-record-num">{{ userRecords.totalCrafted ? userRecords.totalCrafted|number_format(0,'.',',') : 0 }}</p>
<p class="user-profile-record-label">Crafted Items</p>
</div>
<div class="small-12 large-3">
<p class="user-profile-record-num">{{ userRecords.totalConverted ? userRecords.totalConverted|number_format(0,'.',',') : 0 }}</p>
<p class="user-profile-record-label">Converted to NFT</p>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="grid-container" style="margin-top: 50px; margin-bottom: 50px;">
<div class="grid-x" >
<div class="small-12 medium-2 cell">
<ul class="vertical menu">
<li><a href="{{ path('user_profile', { userId: user.id, domain: app_domain }) }}">NFT Inventory</a></li>
<li><a href="{{ path('user_profile_crates', { userId: user.id, domain: app_domain }) }}">Ancient Crates</a></li>
<li><a href="{{ path('user_profile_opened_crates', { userId: user.id, domain: app_domain }) }}">Opened Crates</a></li>
<li>Market</li>
<li><a href="{{ path('user_sent_offers', { userId: user.id }) }}">Sent Offers</a></li>
<li><a href="{{ path('user_received_offers', { userId: user.id }) }}">Received Offers</a></li>
<li><a href="{{ path('user_active_listings', { userId: user.id }) }}">Active Listings</a></li>
<li><a href="{{ path('user_sold_listings', { userId: user.id }) }}">Sold Listings</a></li>
<li><a href="{{ path('user_purchased_listings', { userId: user.id }) }}">Purchased Listings</a></li>
<li><a href="{{ path('user_withdrawal_history', { userId: user.id }) }}">Withdrawal History</a></li>
</ul>
</div>
<div class="small-12 medium-10 cell">
<turbo-frame>
<div class="grid-x">
<div class="small-12 cell">
<h2>NFTs ({{ nftMetadatas|length }})</h2>
</div>
{% if nftMetadatas is empty %}
<div class="small-12 cell">
<p>Learn how to <a href="/support#howtopurchasenft">convert your items into NFTs</a>.</p>
</div>
{% else %}
{% for nftMetadata in nftMetadatas %}
<div class="small-12 large-3 cell">
{% include 'explorer/includes/asset-card.html.twig' with {'nftMetadata': nftMetadata, 'app': app} %}
</div>
{% endfor %}
{% endif %}
</div>
</turbo-frame>
</div>
</div>
</div>
{% endblock %}