{#
This file is part of RecentlyViewedProducts Plugin
Copyright (C) 2023 Diezon.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% block stylesheet %}
<style>
.ec-historyRole {
padding: 40px 0;
}
.ec-historyRole__list {
list-style-type: none;
padding-left: 0;
display: flex;
flex-wrap: nowrap;
gap: 8px;
overflow-x: scroll;
white-space: nowrap;
width: 100%;
}
.ec-historyRole__list::-webkit-scrollbar {
display: none;
}
.ec-historyRole__listItem {
max-width: 107px;
min-width: 107px;
}
.ec-historyRole__listImage {
aspect-ratio: 1/1;
}
.ec-historyRole__listImage img {
width: 100%;
height: 100%;
object-position: center;
object-fit: contain;
}
.ec-historyRole__listItemTitle, .ec-historyRole__listItemPrice {
font-size: 10px;
color: #000;
margin-top: 8px;
line-height: 1.2;
white-space: initial;
}
.ec-historyRole__heading {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
}
.ec-historyRole__heading .ec-secHeading {
margin-bottom: 0;
}
.ec-historyRole__linkText {
font-size: 10px;
}
@media only screen and (max-width: 767px) {
.ec-historyRole__heading .ec-secHeading__line {
margin: 0 10px;
}
}
@media only screen and (min-width: 768px){
.ec-historyRole {
padding: 60px 0;
}
.ec-historyRole__list {
gap: 16px;
}
.ec-historyRole__listItem {
max-width: 128px;
min-width: 128px;
}
.ec-historyRole__listItemTitle, .ec-historyRole__linkText {
font-size: 12px;
}
}
</style>
{% endblock %}
{% if RecentlyViewedProducts|length > 0 %}
<div class="ec-role">
<div class="ec-historyRole">
<div class="ec-historyRole__heading">
{#<div class="ec-secHeading">#}
{# <span class="ec-secHeading__en">{{ 'recently_viewed_products.title.en'|trans }}</span>#}
{# <span class="ec-secHeading__line"></span>#}
{# <span class="ec-secHeading__ja">{{ 'recently_viewed_products.title.jp'|trans }}</span>#}
{#</div>#}
<a href="{{ url('block_recently_viewed_products_clear') }}" class="ec-historyRole__linkText">{{ 'recently_viewed_products.clear'|trans }}</a>
</div>
<div class="content-2">
{% for Product in RecentlyViewedProducts %}
<div class="card-2">
{% for ProductTags in Product.ProductTag %}
{% if ProductTags.Tag.id == 1 %}
<div class="new">
<div class="new-text">New</div>
</div>
{% endif %}
{% endfor %}
<a href="{{ url('product_detail', {id: Product.id}) }}">
<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" class="" alt="{{ Product.name }}"/>
</a>
<h3>タイトル:{{ Product.name }}</h3>
<p>著者:<span>{{ Product.author }}</span></p>
<p>¥<span>{{ Product.getPrice02IncTaxMax }}</span>税込</p>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}