{#
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.
#}
{% block stylesheet %}
{#<link rel="stylesheet" href="{{ asset('assets/css/main_module.css', 'user_data') }}">#}
{#<link rel="stylesheet" href="{{ asset('assets/css/header_style.css', 'user_data') }}">#}
<link rel="stylesheet" href="{{ asset('assets/css/page/header_stock_photo.css', 'user_data') }}">
{% endblock %}
{% block javascript %}
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="{{ asset('assets/js/header.js', 'user_data') }}"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
if (window.innerWidth <= 768) { // スマホサイズ判定
const navLinks = document.querySelectorAll('.ec-categoryNaviRole .ec-itemNav__nav > li > a');
navLinks.forEach(function(link) {
link.addEventListener('click', function(e) {
// もし親liに「開くためのイベント」が登録されてるなら、それだけ止める
e.stopPropagation(); // 親要素への伝播を止める(クリックイベントが親に届かない)
// e.preventDefault() は書かない → これを書かないから「リンク移動はする」!!
});
});
}
});
</script>
{% endblock %}
<div class="fixed-header">
<section>
<div id="site_header">
<div class="header_logo">
<a href="{{url('books')}}">
<img src="{{ asset('assets/img/common/photopub_title.svg', 'user_data') }}">
</a>
</div>
<div class="header_menus">
<div class="header_inner1">
{#{{ render(path('block_search_product')) }}#}
<div class="ec-headerSearch">
<form method="get" class="search-form pc" action="{{ path('product_list') }}">
<input type="search" name="name" maxlength="50" class="search-form-input" placeholder="キーワード(タイトル、著者など)を入力">
<button type="submit" class="search-form-submit" aria-label="検索"></button>
</form>
</div>
<div class="header_link1 pc">
<ul class="link1">
<li><a href="https://photo-pub.co.jp/news">NEWS</a></li>
<li><a href="https://photo-pub.co.jp/company">会社概要</a></li>
<li><a href="{{ url('contact') }}">お問い合わせ</a></li>
<li><a href="{{ url('opinion') }}">意見箱</a></li>
</ul>
</div>
<div class="header_link2">
{{ include('Block/login.twig', {parent_template: 'header1.twig'}) }}
</div>
<div class="hamburger-menu sp">
<button id="hamburger" class="hamburger">
<span></span>
<span></span>
<span></span>
</button>
<nav id="menus" class="menus">
<ul class="hamburger-tabs">
<li class="menu-item">
<a href="{{ url('homepage') }}">TOP</a>
</li>
<li class="menu-item">
<a href="{{ url('homepage') }}">フォトパブ堂書店</a>
<ul class="submenu">
{% set AllCategories = repository('Eccube\\Entity\\Category').getList() %}
{% set Categories = AllCategories|filter(c => c.id is not null and c.id == 1) %}
{% for Category in Categories %}
{% for Child in Category.Children %}
<li>
<span><a href="{{ url('product_list') }}?category_id={{ Child.id }}">{{ Child }}</a></span>
</li>
{% endfor %}
{% endfor %}
</ul>
</li>
<li class="menu-item">
<a href="{{ url('homepage') }}">フォトパブ写真館</a>
<ul class="submenu">
<li><span></span><a href="{{ url('homepage') }}photos"> フォトパブ写真館TOP</a></li>
{% set AllCategories = repository('Eccube\\Entity\\Category').getList() %}
{% set Categories = AllCategories|filter(c => c.id is not null and c.id == 6) %}
{% for Category in Categories %}
{% for Child in Category.Children %}
<li>
<span><a href="{{ url('photo-product_list') }}?category_id={{ Child.id }}">{{ Child }}</a></span>
</li>
{% endfor %}
{% endfor %}
</ul>
</li>
<li class="menu-item">
<a href="https://jihi.photo-pub.co.jp/">自費出版サービス</a>
<ul class="submenu">
<li><span></span><a href="https://jihi.photo-pub.co.jp/">自費出版について</a></li>
<li><span></span><a href="https://jihi.photo-pub.co.jp/calc.php">自動見積もり</a></li>
<li><span></span><a href="https://jihi.photo-pub.co.jp/qanda.php">出版までの流れ</a></li>
<li><span></span><a href="https://jihi.photo-pub.co.jp/inquiry/">自費出版に関するご相談</a></li>
</ul>
</li>
<li class="menu-item">
<a href="https://photo-pub.co.jp/event">イベント情報</a>
<ul class="submenu">
<li><span></span><a href="https://photo-pub.co.jp/event">イベント一覧</a></li>
</ul>
</li>
<li class="menu-item">
<a href="https://photo-pub.co.jp/recruit">各種募集</a>
<ul class="submenu">
<li><span></span><a href="https://photo-pub.co.jp/recruit">募集一覧</a></li>
</ul>
</li>
</ul>
<ul class="hamburger-links">
<li><a href="https://photo-pub.co.jp/news">NEWS</a></li>
<li><a href="https://photo-pub.co.jp/company">会社概要</a></li>
<li><a href="{{ url('contact') }}">お問い合わせ</a></li>
<li><a href="{{ url('opinion') }}">意見箱</a></li>
<li><a href="{{url('help_privacy')}}">プライバシー<br class="br_linkbox">ポリシー</a></li>
<li><a href="{{url('help_tradelaw')}}">特定商取引法<br class="br_linkbox">に基づく表記</a></li>
</ul>
<ul class="hamburger-sns">
<li><a><img src="{{ asset('assets/img/common/sns_ic_insta.png', 'user_data') }}" alt="insta"></a></li>
<li><a href="https://www.youtube.com/@%E3%83%95%E3%82%A9%E3%83%88%E3%83%91%E3%83%96"><img src="{{ asset('assets/img/common/sns_ic_youtube.svg', 'user_data') }}" alt="youtube"></a></li>
<li><a href="https://twitter.com/share?url=https://photo-pub.co.jp/&via=photopub402&hashtags=%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BE%E3%83%95%E3%82%A9%E3%83%88%E3%83%91%E3%83%96%E3%83%AA%E3%83%83%E3%82%B7%E3%83%B3%E3%82%B0&text=%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BE%E3%83%95%E3%82%A9%E3%83%88%E3%83%91%E3%83%96%E3%83%AA%E3%83%83%E3%82%B7%E3%83%B3%E3%82%B0"><img src="{{ asset('assets/img/common/sns_ic_x.svg', 'user_data') }}" alt="x"></a></li>
<li><a href="http://www.facebook.com/share.php?u=https://photo-pub.co.jp/"><img src="{{ asset('assets/img/common/sns_ic_fb.svg', 'user_data') }}" alt="fb"></a></li>
</ul>
</nav>
</div>
</div>
<div class="header_inner2 pc">
<ul class="select_btns">
<li class="btn"><a href="{{ url('homepage') }}">TOP</a></li>
<li class="btn"><a href="{{ url('homepage') }}books">フォトパブ堂書店</a></li>
<li class="btn"><a href="{{ url('homepage') }}photos">フォトパブ写真館</a></li>
<li class="btn"><a href="http://jihi.photo-pub.co.jp/">自費出版サービス</a></li>
<li class="btn"><a href="https://photo-pub.co.jp/event">イベント情報</a></li>
<li class="btn"><a href="https://photo-pub.co.jp/recruit">各種募集</a></li>
</ul>
</div>
</div>
</div>
<div class="tabs">
<ul class="tabs_inner">
{% set AllCategories = repository('Eccube\\Entity\\Category').getList() %}
{% set Categories = AllCategories|filter(c => c.id is not null and c.id == 1) %}
{% macro tree(Category, depth) %}
{% from _self import tree %}
{% if depth == 1 %}
<li>
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">
{{ Category.name }}
</a>
{% if Category.children|length > 0 %}
<ul>
{% for ChildCategory in Category.children %}
{{ tree(ChildCategory, depth + 1) }}
{% endfor %}
</ul>
{% endif %}
</li>
{% elseif depth == 2 %}
<li>
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">
{{ Category.name }}
</a>
</li>
{% endif %}
{% endmacro %}
{% from _self import tree %}
<div class="ec-categoryNaviRole">
<div class="ec-itemNav">
<ul class="ec-itemNav__nav">
{% for FirstCategory in Categories %}
{% for SecondCategory in FirstCategory.children %}
{{ tree(SecondCategory, 1) }}
{% endfor %}
{% endfor %}
</ul>
</div>
</div>
</ul>
</div>
<div class="sp-search-form">
<form action="{{ path('product_list') }}" class="search-form sp">
<input type="search" name="name" maxlength="50" class="search-form-input" placeholder="キーワード(タイトル、著者など)を入力">
<button type="submit" class="search-form-submit" aria-label="検索"></button>
</form>
</div>
</section>
</div>
<style>
.fixed-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 9999;
background-color: #fff; /* 背景が透けないように */
box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 任意:影で浮かせる */
}
body {
padding-top: 150px; /* ヘッダーの高さに合わせて調整(例:80px) */
}
@media screen and (max-width: 820px) {
body {
padding-top: 180px; /* ヘッダーの高さに合わせて調整(例:80px) */
}
}
</style>