<!doctype html>
{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
<html lang="{{ eccube_config.locale }}">
<head prefix="og: https://ogp.me/ns# fb: https://ogp.me/ns/fb# product: https://ogp.me/ns/product#">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="eccube-csrf-token" content="{{ csrf_token(constant('Eccube\\Common\\Constant::TOKEN_NAME')) }}">
<title>{{ BaseInfo.shop_name }}{% if subtitle is defined and subtitle is not empty %} / {{ subtitle }}{% elseif title is defined and title is not empty %} / {{ title }}{% endif %}</title>
{% if Page.meta_tags is not empty %}
{{ include(template_from_string(Page.meta_tags)) }}
{% if Page.description is not empty %}
<meta name="description" content="{{ Page.description }}">
{% endif %}
{% else %}
{{ include('meta.twig') }}
{% endif %}
{% if Page.author is not empty %}
<meta name="author" content="{{ Page.author }}">
{% endif %}
{% if Page.keyword is not empty %}
<meta name="keywords" content="{{ Page.keyword }}">
{% endif %}
{% if Page.meta_robots is not empty %}
<meta name="robots" content="{{ Page.meta_robots }}">
{% endif %}
{% if app.request.get('_route') == 'product_detail' %}
<link rel="stylesheet" href="{{ asset('assets/css/swiper-bundle.min.css', 'user_data') }}">
{% endif %}
<link rel="stylesheet" href="{{ asset('assets/css/customize.css', 'user_data') }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ asset('assets/favicon/apple-touch-icon.png', 'user_data') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ asset('assets/favicon/favicon-32x32.png', 'user_data') }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('assets/favicon/favicon-16x16.png', 'user_data') }}">
<link rel="manifest" href="{{ asset('assets/favicon/site.webmanifest', 'user_data') }}">
<link rel="mask-icon" href="{{ asset('assets/favicon/safari-pinned-tab.svg', 'user_data') }}" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link rel="stylesheet" href="{{ asset('assets/css/style.css') }}">
<script src="{{ asset('front.bundle.js', 'bundle') }}"></script>
<!-- OGP -->
<meta property="og:url" content="{{ app.request.uri }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ BaseInfo.shop_name }}{% if subtitle is defined and subtitle is not empty %} / {{ subtitle }}{% elseif title is defined and title is not empty %} / {{ title }}{% endif %}" />
<meta property="og:description" content="{{ Page.description }}" />
<meta property="og:site_name" content="{{ BaseInfo.shop_name }}" />
<meta property="og:image" content="{{ asset('assets/ogp/ogp.jpg' , 'user_data') }}" />
{% block stylesheet %}{% endblock %}
<script>
$(function() {
$.ajaxSetup({
'headers': {
'ECCUBE-CSRF-TOKEN': $('meta[name="eccube-csrf-token"]').attr('content')
}
});
});
</script>
<script>
WebFontConfig = {google: {families: ['Noto+Sans+JP:400,500,700']}};
(function () {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
</script>
<script>
function onAddCart(e, self, quantity, callback) {
e.stopImmediatePropagation();
e.preventDefault();
var $form = $(self).parents('.popular-item').find('form.topBlocks__form');
var productId = $(self).parents('.popular-item').find('input[name="product_id"]').val() * 1;
// 個数フォームのチェック
$form.parent().find('.quantity').val(quantity);
$.ajax({
url: $form.attr('action'),
type: $form.attr('method'),
data: $form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
$(self).prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
$.each(data.messages, function() {
$('#ec-modal-header').text(this);
});
var $currentQuantityLabelEl = $(self).parents('.popular-item').find(".quantity_label");
var $quantityLabelEl = $(document).find(`.quantity_label_${productId}`);
var newQuantity = $currentQuantityLabelEl.text() * 1 + quantity * 1;
$quantityLabelEl.text(newQuantity);
if(callback) {
callback();
}
// カートブロックを更新する
$.ajax({
url: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
$(self).prop('disabled', false);
}).always(function(data) {
checkRenderButton();
});
return false;
}
function checkRenderButton() {
$itemEls = $(".popular-item");
$itemEls.each(function(index, el) {
let stockVal = $(el).find('.stock').val() * 1;
var $quantityLabelEl = $(el).find('.quantity_label');
var productId = $(el).find('input[name="product_id"]').val() * 1;
var _quantity = $quantityLabelEl.text() * 1;
if(_quantity == 0) {
// enable minus button
$(el).find(".minus__btn").prop('disabled', false);
$(el).find(".ec-productRole__btn--only").removeClass("d-none");
$(el).find(".ec-regular__btn").prop('disabled', false);
$(el).find(".ec-productRole__btn--group").addClass("d-none");
}
if(_quantity > 0 && _quantity <= stockVal) {
// Buttonを有効にする
if (_quantity < stockVal) {
$(el).find('.minus__btn').prop('disabled', false);
$(el).find('.plus__btn').prop('disabled', false);
}
$(el).find(".ec-productRole__btn--only").addClass("d-none");
$(el).find(".ec-productRole__btn--group").removeClass("d-none");
} else {
$(el).find('.plus__btn').prop('disabled', true);
}
});
}
$(document).ready(function() {
$('.ec-blockFavoriteBtn').on("click", function(e) {
e.stopImmediatePropagation();
e.preventDefault();
event.stopPropagation();
var $form = $(this).parents('form.ec-favoriteForm');
$form.attr('action', $(this).attr("data-action"));
$form.attr('method', $(this).attr("data-method"));
$.ajax({
url: $form.attr('action'),
type: $form.attr('method'),
}).done(function(data) {
$($form).find(".ec-blockFavoriteBtnDisable").removeClass("d-none");
$($form).find(".ec-blockFavoriteBtn").addClass("d-none");
}).fail(function(data) {
alert('{{ 'お気に入りの追加に失敗しました。'|trans }}');
});
return false;
})
$('.ec-blockFavoriteBtnDisable').on("click", function(e) {
e.stopImmediatePropagation();
e.preventDefault();
event.stopPropagation();
var $form = $(this).parents('form.ec-favoriteForm');
$form.attr('action', $(this).attr("data-action"));
$form.attr('method', $(this).attr("data-method"));
$.ajax({
url: $form.attr('action'),
type: $form.attr('method'),
}).done(function(data) {
$($form).find(".ec-blockFavoriteBtnDisable").addClass("d-none");
$($form).find(".ec-blockFavoriteBtn").removeClass("d-none");
}).fail(function(data) {
alert('{{ 'お気に入りの追加に失敗しました。'|trans }}');
});
return false;
})
})
</script>
{# Layout: HEAD #}
{% if Layout.Head %}
{{ include('block.twig', {'Blocks': Layout.Head}) }}
{% endif %}
{# プラグイン用styleseetやmetatagなど #}
{% if plugin_assets is defined %}{{ include('@admin/snippet.twig', { snippets: plugin_assets }) }}{% endif %}
</head>
<body id="page_{{ app.request.get('_route') }}" class="{{ body_class|default('other_page') }}">
{# Layout: BODY_AFTER #}
{% if Layout.BodyAfter %}
{{ include('block.twig', {'Blocks': Layout.BodyAfter}) }}
{% endif %}
{% if isMaintenance %}
<div class="ec-maintenanceAlert">
<div>
<div class="ec-maintenanceAlert__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"/></div>
{{ 'メンテナンスモードが有効になっています。'|trans }}
</div>
</div>
{% endif %}
<div class="ec-layoutRole">
{# Layout: HEADER #}
{% if Layout.Header %}
<header class="ec-layoutRole__header">
{{ include('block.twig', {'Blocks': Layout.Header}) }}
</header>
{% endif %}
{# Layout: CONTENTS_TOP #}
{% if Layout.ContentsTop %}
<div class="ec-layoutRole__contentTop">
{{ include('block.twig', {'Blocks': Layout.ContentsTop}) }}
</div>
{% endif %}
<div class="ec-layoutRole__contents">
{# Layout: SIDE_LEFT #}
{% if Layout.SideLeft %}
<aside class="ec-layoutRole__left">
{{ include('block.twig', {'Blocks': Layout.SideLeft}) }}
</aside>
{% endif %}
{% set layoutRoleMain = 'ec-layoutRole__main' %}
{% if Layout.ColumnNum == 2 %}
{% set layoutRoleMain = 'ec-layoutRole__mainWithColumn' %}
{% elseif Layout.ColumnNum == 3 %}
{% set layoutRoleMain = 'ec-layoutRole__mainBetweenColumn' %}
{% endif %}
<main class="{{ layoutRoleMain }}">
{# Layout: MAIN_TOP #}
{% if Layout.MainTop %}
<div class="ec-layoutRole__mainTop">
{{ include('block.twig', {'Blocks': Layout.MainTop}) }}
</div>
{% endif %}
{# MAIN AREA #}
{% block main %}{% endblock %}
{# Layout: MAIN_Bottom #}
{% if Layout.MainBottom %}
<div class="ec-layoutRole__mainBottom">
{{ include('block.twig', {'Blocks': Layout.MainBottom}) }}
</div>
{% endif %}
</main>
{# Layout: SIDE_RIGHT #}
{% if Layout.SideRight %}
<aside class="ec-layoutRole__right">
{{ include('block.twig', {'Blocks': Layout.SideRight}) }}
</aside>
{% endif %}
</div>
{# Layout: CONTENTS_BOTTOM #}
{% if Layout.ContentsBottom %}
<div class="ec-layoutRole__contentBottom">
{{ include('block.twig', {'Blocks': Layout.ContentsBottom}) }}
</div>
{% endif %}
{# Layout: CONTENTS_FOOTER #}
{% if Layout.Footer %}
<footer class="ec-layoutRole__footer">
{{ include('block.twig', {'Blocks': Layout.Footer}) }}
</footer>
{% endif %}
</div><!-- ec-layoutRole -->
<div class="ec-overlayRole"></div>
<div class="ec-drawerRole">
<div class="ec-drawerRoleClose"><i class="fas fa-times"></i></div>
{# Layout: DRAWER #}
{% if Layout.Drawer %}
{{ include('block.twig', {'Blocks': Layout.Drawer}) }}
{% endif %}
</div>
<div class="sp-hamburger-content" id="hamburger_menu">
{{ include('Block/hamburger_menu.twig') }}
</div>
{# <div class="ec-blockTopBtn pagetop">{{'ページトップへ'|trans}}</div> #}
{% include('@common/lang.twig') %}
<script src="{{ asset('assets/js/function.js') }}"></script>
<script src="{{ asset('assets/js/eccube.js') }}"></script>
{% if app.request.get('_route') == 'product_detail' %}
<script src="{{ asset('assets/js/swiper-bundle.min.js') }}"></script>
{% endif %}
{% block javascript %}{% endblock %}
{# Layout: CLOSE_BODY_BEFORE #}
{% if Layout.CloseBodyBefore %}
{{ include('block.twig', {'Blocks': Layout.CloseBodyBefore}) }}
{% endif %}
{# プラグイン用Snippet #}
{% if plugin_snippets is defined %}
{{ include('snippet.twig', { snippets: plugin_snippets }) }}
{% endif %}
<script src="{{ asset('assets/js/customize.js', 'user_data') }}"></script>
{% set currentRoute = app.request.get('_route') %}
{% set currentUrl = app.request.pathinfo %}
{% set routeParams = app.request.get('_route_params') %}
{% if currentRoute != 'cart' and currentRoute != 'mypage_login' and 'shopping' not in currentRoute and 'shopping' not in routeParams and 'forgot' not in currentRoute and 'forgot' not in routeParams and 'mypage' not in currentRoute and 'mypage' not in routeParams %}
{# ここに条件が満たされる場合のコードを追加 #}
<div class="sp-fixed-footer">
<div class="sp-fixed-footer__inner {% if is_granted('ROLE_USER') %} {% else %} flex {% endif %}">
{% if is_granted('ROLE_USER') %}
{{ include('Block/cart.twig') }}
{% else %}
<div class="sp-fixed-footer__left">
<p class="sp-fixed-footer__text">ブレバース<br>ネットショッピング</p>
<a href="" class="sp-fixed-footer__link">新規会員はこちら</a>
</div>
<div class="sp-fixed-footer__right">
<a href="{{ url('mypage_login') }}" class="sp-fixed-footer__btn">
{{ 'ログイン'|trans }}
</a>
</div>
{% endif %}
</div>
</div>
{% endif %}
<div id="loginModal" class="modal-outer">
<div class="modal-inner modal-login">
<p class="modal-login__title">
サービスをご利用いただくには、
<br>ブレイバースショップへのログインが必要です。
</p>
<a href="{{ url('mypage_login') }}" class="modal-login__btn">ログイン</a>
</div>
</div>
</body>
</html>