templates/marketplace/index.html.twig line 1
{% extends 'base.html.twig' %}
{% block title %}Marketplace - Fisher's Quest{% endblock %}
{% block body %}
<div class="grid-container fluid full-width">
<div class="grid-x grid-padding-y" style="max-width: 1300px; margin: 0 auto;">
<div class="small-12 cell" style="text-align: center;">
<h1 style="margin-top: 75px;">Marketplace <span style="color: #cd4243;">Beta</span></h1>
</div>
<div class="small-12 large-3 cell">
<div style="background: #1a1a23; padding: 25px; border-radius: 15px;">
{{ form_start(form) }}
<h2>SORT</h2>
<label class="check">
{{ form_errors(form.sort) }}
{{ form_widget(form.sort) }}
<span>{{ form.sort.vars.label }}</span>
</label>
<h2>FILTERS</h2>
<strong>COLLECTION</strong>
<label class="check">
{{ form_errors(form.collection) }}
{{ form_widget(form.collection) }}
<span>{{ form.collection.vars.label }}</span>
</label>
<strong>TYPE</strong>
<label class="check">
{{ form_errors(form.genus) }}
{{ form_widget(form.genus) }}
<span>{{ form.genus.vars.label }}</span>
</label>
<strong>CATEGORY</strong>
{% for category in form.category %}
<label class="check">
{{ form_errors(category) }}
{{ form_widget(category) }}
<span>{{ category.vars.label }}</span>
</label>
{% endfor %}
{{ form_widget(form) }}
<button class="button" style="display: block; width: 100%;">{{ button_label|default('Apply') }}</button>
{{ form_end(form) }}
</div>
</div>
<div class="small-12 large-9 cell">
<div class="grid-container">
<div class="grid-x">
<div class="small-12 cell">
<a href="{{ path('marketplace', { state: 1, domain: app_domain }) }}"><button class="button market-listings market-button market-active">Listings</button></a>
<a href="{{ path('marketplace', { state: 2, domain: app_domain }) }}"><button class="button market-history market-button">History</button></a>
</div>
</div>
</div>
<turbo-frame id="market-item-list-{{ pager.currentPage }}">
<div class="grid-container">
<div class="grid-x">
{% if pager|length == 0 %}
<div class="small-12 cell">
<p style="text-align: center; margin-top: 100px;">Sorry, no results found. Try a different search.</p>
</div>
{% else %}
{% for marketItem in pager %}
{% if marketItem.isSold is same as(false) %}
{# Show the asset card for currently listed NFTs #}
<div class="small-12 large-3 cell">
{% include 'explorer/includes/asset-card.html.twig' with {'nftMetadata': marketItem.nftHub.nftMetadata, 'app': app} %}
</div>
{% else %}
{# Show sale details for sold NFTs #}
<div class="small-12 cell" style="margin-bottom: 10px;">
{% include 'marketplace/includes/market-sold.html.twig' with {'marketItem': marketItem, 'app': app} %}
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
{% if pager.hasNextPage %}
{% if params %}
<turbo-frame id="market-item-list-{{ pager.nextPage }}"
src="{{ pagerfanta_page_url(pager, pager.nextPage, {'routeParams': {
sort: ('sort' in params|keys) ? params.sort : '',
collection: ('collection' in params|keys) ? params.collection : '',
genus: ('genus' in params|keys ? params.genus : ''),
category: ('category' in params|keys ? params.category : ''),
state: ('state' in params|keys ? params.state : ''),
}}) }}"
loading="lazy"></turbo-frame>
{% else %}
<turbo-frame id="market-item-list-{{ pager.nextPage }}"
src="{{ pagerfanta_page_url(pager, pager.nextPage) }}"
loading="lazy"></turbo-frame>
{% endif %}
{% endif %}
</turbo-frame>
</div>
</div>
</div>
{% endblock %}