Download tasks/backcountry/environment/reference/clone/frontend/templates/_tile.html from TIGER-Lab/WebsiteBench: direct link, hf CLI and curl.
- Browser
- Download file 1.95 kB
-
https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/backcountry/environment/reference/clone/frontend/templates/_tile.html
- Command line
-
hf download hf://datasets/TIGER-Lab/WebsiteBench/tasks/backcountry/environment/reference/clone/frontend/templates/_tile.html
-
curl -L -o _tile.html https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/backcountry/environment/reference/clone/frontend/templates/_tile.html
1.95 kB
| {% macro tile(p) %} | |
| <div class="tile" data-id="PLI" data-index="{{ p.listingIndex }}"> | |
| {% if p.badge %} | |
| <div class="tile__badge" data-id="productBadge"> | |
| <img src="/static/assets/brand/gearhead-top-pick.svg" alt="{{ p.badge }}" height="26"> | |
| </div> | |
| {% else %}<div class="tile__badge--empty"></div>{% endif %} | |
| <a class="tile__imagelink" href="{{ p.slug }}"> | |
| <div class="tile__image"> | |
| <img data-id="image" src="{{ (default_color(p).image if default_color(p) else p.mainImage) or p.mainImage }}" | |
| alt="{{ p.title }}" loading="lazy" width="300" height="300"> | |
| </div> | |
| </a> | |
| <div class="tile__swatches"> | |
| {% for c in p.colors[:5] %} | |
| <a class="tile__swatch{% if loop.first %} is-selected{% endif %}" data-id="colorTile" | |
| href="{{ p.slug }}?color={{ c.name | urlencode }}" title="{{ c.name }}"> | |
| <img src="{{ c.thumb or c.swatch }}" alt="{{ c.name }}" loading="lazy" width="35" height="35"> | |
| </a> | |
| {% endfor %} | |
| {% if p.colors | length > 5 %}<span class="tile__more">+{{ p.colors | length - 5 }}</span>{% endif %} | |
| </div> | |
| <p class="tile__brand" data-id="brandName">{{ p.brand }}</p> | |
| <h2 class="tile__title" data-id="title"><a href="{{ p.slug }}">{{ p.title }}</a></h2> | |
| {% if p.colors %}<p class="tile__colors" data-id="colorsCount">{{ p.colors | length }} color{{ '' if p.colors | length == 1 else 's' }}</p>{% endif %} | |
| <div class="tile__price"> | |
| <span data-id="price">{{ price_label(p) }}</span> | |
| {% if list_price_label(p) %}<span class="was">{{ list_price_label(p) }}</span>{% endif %} | |
| {% if discount_label(p) %}<span class="tile__sale" data-id="salePrice">{{ discount_label(p) }}</span>{% endif %} | |
| </div> | |
| {% if p.reviews.count %} | |
| <div class="tile__rating"> | |
| <span class="stars" data-id="reviewRating" aria-hidden="true">{{ stars(p.reviews.average) }}</span> | |
| <span data-id="reviewCount">({{ p.reviews.count }})</span> | |
| </div> | |
| {% endif %} | |
| </div> | |
| {% endmacro %} | |