src/Trinity/WebshopBundle/Resources/views/front/share.html.twig line 1

Open in your IDE?
  1. {% if Settings.overridekey is defined and Settings.overridekey is not empty %}
  2.     {% set overridekey = Settings.overridekey %}
  3. {% endif %}
  4. {% if overridekey is defined and overridekey is not empty and file_exists('../templates/override/' ~ overridekey ~ '/webshop/share.html.twig') %}
  5.     {% include 'override/' ~ overridekey ~ '/webshop/share.html.twig' %}
  6. {% elseif file_exists('../templates/override/webshop/share.html.twig') %}
  7.     {% include 'override/webshop/share.html.twig' %}
  8. {% else %}
  9. {% trans_default_domain 'webshop' %}
  10. {% set share_url = url(app.request.attributes.get('_route')) %}
  11. {% if OriginalProduct is defined %}
  12.     {% if Settings.baseuri is empty %}
  13.         {% set site_baseuri = '' %}
  14.     {% else %}
  15.         {% set site_baseuri = Settings.baseuri | replace({'/': ''}) ~ '/' %}
  16.     {% endif %}
  17.     {% set share_url = (WebshopSettings is defined and WebshopSettings.uri ? url('homepage') ~ WebshopSettings.uri : url('homepage') ~ site_baseuri ) ~ (Category.category is defined ? Category.category.uri : Category.uri) ~ '/' ~ (OriginalProduct is defined ? OriginalProduct.slug : Product.slug) %}
  18. {% endif %}
  19. <div class="share">
  20.     <li><h6 class="dropdown-header">{{'Delen via'|trans({}, 'webshop', app.request.locale)}}</h6></li>
  21.     <!-- Sharingbutton WhatsApp -->
  22.     <li>
  23.         <a class="dropdown-item resp-sharing-button__link" href="whatsapp://send?text={{Product.label}}%20{{share_url}}" target="_blank" aria-label="">
  24.             <div class="resp-sharing-button resp-sharing-button--whatsapp resp-sharing-button--small">
  25.                 <div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
  26.                     <i class="fab fa-fw fa-whatsapp"></i> WhatsApp
  27.                 </div>
  28.             </div>
  29.         </a>
  30.     </li>
  31.     <!-- Sharingbutton Telegram -->
  32.     <li>
  33.         <a class="dropdown-item resp-sharing-button__link" href="https://telegram.me/share/url?text={{Product.label}}&amp;url={{share_url}}" target="_blank" aria-label="">
  34.             <div class="resp-sharing-button resp-sharing-button--telegram resp-sharing-button--small">
  35.                 <div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
  36.                     <i class="fab fa-fw fa-telegram-plane"></i> Telegram
  37.                 </div>
  38.             </div>
  39.         </a>
  40.     </li>
  41.     <!-- Sharingbutton Facebook -->
  42.      <li>
  43.         <a class="dropdown-item resp-sharing-button__link" href="https://facebook.com/sharer/sharer.php?u={{share_url}}" target="_blank" aria-label="">
  44.             <div class="resp-sharing-button resp-sharing-button--facebook resp-sharing-button--small">
  45.                 <div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
  46.                     <i class="fab fa-fw fa-facebook"></i> Facebook
  47.                 </div>
  48.             </div>
  49.         </a>
  50.     </li>
  51.     <!-- Sharingbutton Twitter -->
  52.      <li>
  53.     <a class="dropdown-item resp-sharing-button__link" href="https://twitter.com/intent/tweet/?text={{Product.label}}&amp;url={{share_url}}" target="_blank" aria-label="">
  54.         <div class="resp-sharing-button resp-sharing-button--twitter resp-sharing-button--small">
  55.             <div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
  56.                 <i class="fab fa-fw fa-twitter"></i> Twitter
  57.             </div>
  58.         </div>
  59.         </a>
  60.     </li>
  61.     <!-- Sharingbutton E-Mail -->
  62.     <li>
  63.         <a class="dropdown-item resp-sharing-button__link" href="mailto:?subject={{Product.label}}&amp;body={{share_url}}" target="_self" aria-label="">
  64.             <div class="resp-sharing-button resp-sharing-button--email resp-sharing-button--small">
  65.                 <div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
  66.                     <i class="fa fa-fw fa-at"></i> E-mail
  67.                 </div>
  68.             </div>
  69.         </a>
  70.     </li>
  71. </div>
  72. {% endif %}