AgPerry's picture
Add files using upload-large-folder tool
3ba647a verified
Raw History Blame Contribute Delete
1.67 kB
{% extends "base.html" %}
{% block title %}{% if query %}{{ query }} - {% endif %}Apple{% endblock %}
{% block content %}
<div class="wrap">
<div class="search-head">
<h1>Explore</h1>
<form class="search-form" method="get" action="/us/search">
<input type="search" name="q" value="{{ query }}" aria-label="Search apple.com"
placeholder="Search apple.com">
<button class="pill" type="submit">Submit</button>
<a class="pill ghost" href="/us/search">Reset</a>
</form>
</div>
{% if query %}
<nav class="search-tabs" aria-label="Search sections">
<a href="/us/search?q={{ query|urlencode }}" aria-current="page">Explore</a>
<a href="/shop/accessories/all/cases-protection">Accessories</a>
<a href="/shop/bag">Bag</a>
</nav>
<p class="count">{{ total }} {{ "result" if total == 1 else "results" }} found</p>
{% if results %}
<ul class="product-grid">
{% for product in results %}
<li class="product-card">
<a href="{{ product.href }}"><img src="{{ product.image }}" alt="{{ product.name }}" loading="lazy" width="890" height="890"></a>
<a class="name" href="{{ product.href }}">{{ product.name }}</a>
<span class="price">{{ product.price_display }}</span>
</li>
{% endfor %}
</ul>
{% else %}
<div class="empty-state">
<h2>No results found for &ldquo;{{ query }}&rdquo;.</h2>
<p>Check the spelling or try another search.</p>
<a class="pill" href="/shop/accessories/all/cases-protection">Browse accessories</a>
</div>
{% endif %}
{% else %}
<p>Enter a search term to explore products and accessories.</p>
{% endif %}
</div>
{% endblock %}