Configure shop app, admin sidebar, media routing, and Stripe dependencies
This commit is contained in:
commit
93d83a0d63
188 files changed
+9220
No files matched your search
@@ -0,0 +1,49 @@
|
||||
{% extends 'base.html' %}{% load slx_brand static %}
|
||||
{% block title %}Shop · SLUMP X LAND{% endblock %}
|
||||
{% block scripts %}<script defer src="{% static 'shop.js' %}"></script>{% endblock %}
|
||||
{% block content %}
|
||||
<main class="section theme-shop product-shop">
|
||||
<p class="kicker">{{ "SLUMP X LAND"|slx_brand }} · OFFICIAL SHOP</p><h1>Shop</h1>
|
||||
{% if product_groups %}
|
||||
<nav class="shop-categories" aria-label="Product categories">
|
||||
{% for group in product_groups %}<a href="#shop-{{ group.key }}">{{ group.name }}</a>{% endfor %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% for group in product_groups %}
|
||||
<section class="shop-group" aria-labelledby="shop-{{ group.key }}">
|
||||
<div class="section-head"><h2 id="shop-{{ group.key }}">{{ group.name }}</h2></div>
|
||||
<div class="shop-grid">
|
||||
{% for product in group.products %}
|
||||
<article class="card shop-product" data-product>
|
||||
<header>
|
||||
<h3>{{ product.title|slx_brand }}</h3>
|
||||
{% if product.description %}<p>{{ product.description|slx_brand|linebreaksbr }}</p>{% endif %}
|
||||
</header>
|
||||
{% if product.store_variants %}
|
||||
<label class="shop-variant-label" hidden>
|
||||
<strong>Choose a format or option</strong>
|
||||
<select data-variant-picker>
|
||||
{% for variant in product.store_variants %}<option value="{{ variant.pk }}">{{ variant }}</option>{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
{% for variant in product.store_variants %}
|
||||
<section class="shop-option" data-variant-panel="{{ variant.pk }}">
|
||||
{% include 'shop-image.html' with primary=variant.art fallback=product.cover title=product.title only %}
|
||||
<p class="shop-format">{{ variant }}{% if variant.price_usd != None %} <span>· ${{ variant.price_usd|floatformat:"2" }}</span>{% endif %}</p>
|
||||
<a class="cta" href="{{ variant.paypal_url }}">Buy {{ variant.get_format_display }} on PayPal →</a>
|
||||
</section>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<section class="shop-option">
|
||||
{% include 'shop-image.html' with primary=product.cover title=product.title only %}
|
||||
{% if product.legacy_checkout %}<a class="cta" href="{{ product.legacy_checkout }}">Buy on PayPal →</a>
|
||||
{% else %}<p class="shop-format">Currently unavailable</p>{% endif %}
|
||||
</section>
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% empty %}<p>No products are listed right now.</p>{% endfor %}
|
||||
</main>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user