templates/leaderboard/catchable/season-one.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2. {% block title %}Leaderboard Catchable{% endblock %}
  3. {% block body %}
  4.     {% set fodder, common, uncommon, rare, epic, legendary, extreme =  1,2,3,4,5,6,7 %}
  5.     <div class="grid-container">
  6.         <div class="grid-x grid-padding-x">
  7.             <div class="small-12 cell">
  8.                 <h1 style="text-align: center; margin-top: 75px;">Leaderboard</h1>
  9.             </div>
  10.             <div class="small-12 cell">
  11.                 <div class="grid-container">
  12.                     <div class="grid-x">
  13.                         <div class="small-12 medium-6 cell">
  14.                             <a href="{{ path('leaderboard_catchable_season_one', { domain: app_domain }) }}" style="border-radius: 5px; display: inline-block; padding: 5px 10px 5px 10px; background: #cd4243; color: #fff; font-weight: bold; margin-right: 5px;">Season 1</a>
  15.                             <a href="{{ path('leaderboard_catchable_season_two', { domain: app_domain }) }}" style="border-radius: 5px; display: inline-block; padding: 5px 10px 5px 10px; color: #fff; font-weight: bold; margin-right: 5px;">Season 2</a>
  16.                             <a href="{{ path('leaderboard_catchable_season_three', { domain: app_domain }) }}" style="border-radius: 5px; display: inline-block; padding: 5px 10px 5px 10px; color: #fff; font-weight: bold; margin-right: 5px;">Season 3</a>
  17.                             <a href="{{ path('leaderboard_catchable_season_four', { domain: app_domain }) }}" style="border-radius: 5px; display: inline-block; padding: 5px 10px 5px 10px; color: #fff; font-weight: bold; margin-right: 5px;">Season 4</a>
  18.                         </div>
  19.                         <div class="small-12 medium-6 cell">
  20.                             <h2 style="text-align: center;">Overall</h2>
  21.                         </div>
  22.                     </div>
  23.                 </div>
  24.             </div>
  25.             <div class="small-12 medium-6 cell">
  26. {#                <div class="grid-x" style="background: #161b25; padding: 15px 10px 10px 10px; border-radius: 15px;">#}
  27. {#                    <div class="small-12 cell">#}
  28. {#                        <h3>Uncommon</h3>#}
  29. {#                    </div>#}
  30. {#                    {% set i = 1 %}#}
  31. {#                    {% for nftMetadata in nftMetadatasByTier['Uncommon'] %}#}
  32. {#                        <div class="small-12 large-4 cell">#}
  33. {#                            {% include 'explorer/includes/asset-card.html.twig' with {'nftMetadata': nftMetadata, 'app': app} %}#}
  34. {#                            {% if i == 1 %}#}
  35. {#                                {% set background = 'goldenrod' %}#}
  36. {#                            {% elseif i == 2 %}#}
  37. {#                                {% set background = 'silver' %}#}
  38. {#                            {% elseif i == 3 %}#}
  39. {#                                {% set background = '#b15c10' %}#}
  40. {#                            {% endif %}#}
  41. {#                            <div style="height: 10px; background: {{ background }}; margin: 5px; border-radius: 15px;"></div>#}
  42. {#                            {% set i = i + 1 %}#}
  43. {#                        </div>#}
  44. {#                    {% endfor %}#}
  45. {#                </div>#}
  46.                 {# Remove highlighted element from the rest of the leaderboard #}
  47. {#                {% set nftMetadatasByTier = nftMetadatasByTier | filter((v, k) => k != 'Uncommon') %}#}
  48.                 {% set nftMetadatasByTier = nftMetadatasByTier %}
  49.                 {% for key, tier in nftMetadatasByTier %}
  50.                     <div class="grid-x" style="background: #1a1a23; padding: 15px 10px 10px 10px; border-radius: 15px; margin-top: 15px;">
  51.                         <div class="small-12 cell">
  52.                             <h3>{{ key }}</h3>
  53.                         </div>
  54.                         {% for nftMetadata in tier %}
  55.                             <div class="small-12 large-4 cell">
  56.                                 {% include 'explorer/includes/asset-card.html.twig' with {'nftMetadata': nftMetadata, 'app': app} %}
  57.                             </div>
  58.                         {% endfor %}
  59.                         {% if tier|length < 3 %}
  60.                             {% set tierPlaceholders = 3 - tier|length %}
  61.                             {% for placeholder in 1..tierPlaceholders %}
  62.                                 <div class="small-12 large-4 cell">
  63.                                     <div class="nft-container-placeholder" style="height: 250px; margin: 5px; padding: 50px;">
  64.                                         <span style="font-size: 6em;">?</span>
  65.                                     </div>
  66.                                 </div>
  67.                             {% endfor %}
  68.                         {% endif %}
  69.                     </div>
  70.                 {% endfor %}
  71.             </div>
  72.             <div class="small-12 medium-3 cell">
  73.                 <h3>Experience Points</h3>
  74.                 {% for user in expLeaders %}
  75.                     <div style="padding: 10px; background: #1a1a23; border-radius: 10px; margin-bottom: 5px;">
  76.                         {{ loop.index }} <span style="font-weight: bold;">{{ user.experience|number_format(0,'.',',') }}</span> <span style="float: right;">
  77.                             <a href="{{ path('user_profile', { userId: user.id, domain: app_domain }) }}">{{ user.username }}</a>
  78.                         </span>
  79.                     </div>
  80.                 {% endfor %}
  81.             </div>
  82.             <div class="small-12 medium-3 cell">
  83.                 <h3>Gear Score</h3>
  84.                 {% for user in gearScoreLeaders %}
  85.                     <div style="padding: 10px; background: #1a1a23; border-radius: 10px; margin-bottom: 5px;">
  86.                         {{ loop.index }} <span style="font-weight: bold;">{{ user.gearScore|number_format(2,'.',',') }}</span>
  87.                         <span style="float: right;">
  88.                             <a href="{{ path('user_profile', { userId: user.user.id, domain: app_domain }) }}">{{ user.user.username }}</a>
  89.                         </span>
  90.                     </div>
  91.                 {% endfor %}
  92.             </div>
  93.         </div>
  94.     </div>
  95.     </div>
  96. {% endblock %}