app/template/yamaria/Block/common_sns.twig line 1

Open in your IDE?
  1. {#
  2.     共通:SNSリンク
  3.     -SNSバナー
  4.     -公式サイト
  5.     -SNSアイコン
  6. #}
  7. {# 親カテゴリの判定|default_frameで設定 #}
  8. {% if sns_site is not defined %}
  9.     {% set sns_site = false %}
  10. {% endif %}
  11. {% if category_base == 8 %}
  12.     {% set _siteName = 'Maria' %}
  13.     {% set _isBrand = true %}
  14. {% elseif category_base == 7 %}
  15.     {% set _siteName = 'YAMASHITA' %}
  16.     {% set _isBrand = true %}
  17. {% elseif category_base == 0 %}
  18.     {% set sns_site = true %}
  19.     {% set _siteName = 'ブランド' %}
  20.     {% set _isBrand = false %}
  21. {% else %}
  22.     {% set _siteName = 'ブランド' %}
  23.     {% set _isBrand = false %}
  24. {% endif %}
  25. <div class="ym-contents_aside">
  26.     <div class="ym-sns_banner ym-aside_block">
  27.         {# この見出しは総合トップのみ #}
  28.         {% if app.request.get('_route') == 'homepage' %}
  29.         <div class="ec-secHeading">
  30.             <span class="ec-secHeading__en">SNS</span>
  31.             <span class="ec-secHeading__line"></span>
  32.             <span class="ec-secHeading__ja">公式SNSのご紹介</span>
  33.         </div>
  34.         {% endif %}
  35.         {# 総合トップでは両方、カテゴリトップでは一つずつ #}
  36.         {% if sns_banner is defined %}
  37.         {% if sns_banner == true %}
  38.         <ul class="ym-sns_banner__list ec-grid2">
  39.             {% if category_base != '8' %}
  40.             <li class="ym-sns_banner__item ec-grid2__cell">
  41.                 <p class="ym-sns_banner__img"><a href="https://www.yamaria.com" target="_blank" rel="noopener"><img
  42.                             src="{{ asset('assets/img/common/ban_site_egicom02.jpg') }}"
  43.                             alt="エギング専用SNS エギCOM"></a></p>
  44.                 <p class="ym-sns_banner__desc">当ストアはエギCOMと同じメールアドレスとパスワードでログインしてご利用いただけます。
  45.                 </p>
  46.             </li>
  47.             {% if app.request.get('_route') != 'homepage' %}
  48.             <li class="ym-sns_banner__item ec-grid2__cell">
  49.                 <p class="ym-sns_banner__img"><a href="/store/maria" rel="noopener"><img
  50.                             src="{{ asset('assets/img/common/ban_store_maria.png') }}"
  51.                             alt="Maria ONLINE STORE"></a></p>
  52.                 </p>
  53.             </li>
  54.             {% endif %}
  55.             {% endif %}
  56.             {% if category_base != '7' %}
  57.             <li class="ym-sns_banner__item ec-grid2__cell">
  58.                 <p class="ym-sns_banner__img"><a href="https://www.instagram.com/maria_japan_official/" target="_blank" rel="noopener" rel="noopener"><img
  59.                             src="{{ asset('assets/img/common/ban_insta_maria.png') }}"
  60.                             alt="『Maria』公式Instagram"></a></p>
  61.                 <p class="ym-sns_banner__desc">ソルトウォータールアーブランド『Maria』公式Instagramページ</p>
  62.             </li>
  63.             {% if app.request.get('_route') != 'homepage' %}
  64.             <li class="ym-sns_banner__item ec-grid2__cell">
  65.                 <p class="ym-sns_banner__img"><a href="/store/yamashita" rel="noopener"><img
  66.                             src="{{ asset('assets/img/common/ban_store_yamashita.png') }}"
  67.                             alt="YAMASHITA ONLINE STORE"></a></p>
  68.                 </p>
  69.             </li>
  70.             {% endif %}
  71.             {% endif %}
  72.         </ul>
  73.         {% endif %}
  74.         {% endif %}
  75.     </div>
  76.     <div class="ym-site_block ym-aside_block">
  77.         {% if app.request.get('_route') != 'product_detail' %}
  78.         <div class="ec-secHeading">
  79.             <span class="ec-secHeading__en">OFFICIAL SITE</span>
  80.             <span class="ec-secHeading__line"></span>
  81.             <!--TODO:「**公式サイト」部分出し分けする-->
  82.             <span class="ec-secHeading__ja">{{ _siteName }}公式サイト</span>
  83.         </div>
  84.         {% endif %}
  85.         {% if app.request.get('_route') != 'product_detail' and sns_site != false %}
  86.             {% if category_base != '8' %}
  87.         <dl class="ym-site">
  88.             <dt class="ym-site_name">YAMASHITA</dt>
  89.             <dd class="ym-site_desc"><a href="https://www.yamaria.co.jp/yamashita" class="ym-arrow"
  90.                     target="_blank" rel="noopener">イカ釣りで世界トップクラスの海釣りブランド</a></dd>
  91.         </dl>
  92.             {% endif %}
  93.             {% if category_base != '7' %}
  94.         <dl class="ym-site">
  95.             <dt class="ym-site_name">Maria</dt>
  96.             <dd class="ym-site_desc"><a href="https://www.yamaria.co.jp/maria" class="ym-arrow"
  97.                     target="_blank" rel="noopener">海のルアーフィッシングのパイオニア</a></dd>
  98.         </dl>
  99.             {% endif %}
  100.         {% endif %}
  101.         {# 商品詳細ページは別タイトル #}
  102.         {% if app.request.get('_route') == 'product_detail' and _isBrand == true %}
  103.         <div class="ec-secHeading">
  104.             <span class="ec-secHeading__en">SNS</span>
  105.             <span class="ec-secHeading__line"></span>
  106.             <span class="ec-secHeading__ja">公式SNSのご紹介</span>
  107.         </div>
  108.         {% endif %}
  109.         {# サイトトップ以外ではSNSアイコン表示 #}
  110.         {% if app.request.get('_route') != 'homepage' and _isBrand == true %}
  111.             {% if category_base != '8' %}
  112.         {# YAMASHITA SNS #}
  113.         <ul class="ym-sns_icon__list">
  114.             <li class="ym-sns_icon__item"><a href="https://www.instagram.com/yamashita__maria/" target="_blank" rel="noopener"><img
  115.                         src="{{ asset('assets/icon/icon-sns-ig.png') }}"
  116.                         alt="Instagram"></a></li>
  117.             <li class="ym-sns_icon__item"><a href="https://www.facebook.com/YAMASHITA.Maria" target="_blank" rel="noopener"><img
  118.                         src="{{ asset('assets/icon/icon-sns-fb.png') }}" alt="Facebook"></a>
  119.             </li>
  120.             <li class="ym-sns_icon__item"><a href="https://twitter.com/yamashita_maria" target="_blank" rel="noopener"><img
  121.                         src="{{ asset('assets/icon/icon-sns-tw.png') }}" alt="Twitter"></a>
  122.             </li>
  123.             <li class="ym-sns_icon__item"><a href="https://www.youtube.com/user/yamariafishing" target="_blank" rel="noopener"><img src="{{ asset('assets/icon/icon-sns-yt.png') }}" alt="Youtube"></a>
  124.             </li>
  125.         </ul>
  126.             {% endif %}
  127.             {% if category_base != '7' %}
  128.         {# MARIA SNS #}
  129.         <ul class="ym-sns_icon__list">
  130.             <li class="ym-sns_icon__item"><a href="https://www.instagram.com/yamashita__maria/" target="_blank" rel="noopener"><img
  131.                         src="{{ asset('assets/icon/icon-sns-ig.png') }}"
  132.                         alt="Instagram"></a></li>
  133.             <li class="ym-sns_icon__item"><a href="https://www.facebook.com/Maria.Japan.Official" target="_blank" rel="noopener"><img
  134.                         src="{{ asset('assets/icon/icon-sns-fb.png') }}" alt="Facebook"></a>
  135.             </li>
  136.             <li class="ym-sns_icon__item"><a href="https://twitter.com/yamashita_maria" target="_blank" rel="noopener"><img
  137.                         src="{{ asset('assets/icon/icon-sns-tw.png') }}" alt="Twitter"></a>
  138.             </li>
  139.             <li class="ym-sns_icon__item"><a href="https://www.youtube.com/user/yamariafishing" alt="Youtube" target="_blank" rel="noopener"><img
  140.                         src="{{ asset('assets/icon/icon-sns-yt.png') }}"></a>
  141.             </li>
  142.         </ul>
  143.             {% endif %}
  144.         {% endif %}
  145.     </div>
  146. </div>