src/Social/FrontendBundle/Resources/views/layout_base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <!--[if lt IE 7]>
  3. <html class="ie lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
  4. <!--[if IE 7]>
  5. <html class="ie lt-ie9 lt-ie8"> <![endif]-->
  6. <!--[if IE 8]>
  7. <html class="ie lt-ie9"> <![endif]-->
  8. <!--[if gt IE 8]>
  9. <html class="ie"> <![endif]-->
  10. <!--[if !IE]><!-->
  11. <html>
  12. <!-- <![endif]-->
  13. <head>
  14.     <title>{{ project_name }}
  15.         - {% include 'SocialFrontendBundle:title:' ~ theme_manager.getActiveTheme()['name'] ~ '.html.twig' %}</title>
  16.     <!-- Meta -->
  17.     <meta charset="utf-8">
  18.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  19.     <meta name="viewport"
  20.           content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
  21.     <meta name="robots" content="noindex, nofollow">
  22.     <meta name="robots" content="noarchive">
  23.     <meta name="googlebot" content="noarchive">
  24.     <meta name="googlebot" content="nosnippet">
  25.     <meta name="googlebot" content="noodp">
  26.     <meta name="slurp" content="noarchive">
  27.     <meta name="slurp" content="noodp">
  28.     <meta name="slurp" content="noydir">
  29.     <meta name="msnbot" content="noindex, nofollow">
  30.     <meta name="msnbot" content="noarchive">
  31.     <meta name="msnbot" content="noodp">
  32.     <link rel="icon" type="image/x-icon" href="{{ asset(theme_manager.getActiveFavicon()) }}"/>
  33.     <link rel="apple-touch-icon" href="{{ asset('/bundles/socialfrontend/images/touch-icon-iphone.png') }}">
  34.     <link rel="apple-touch-icon" sizes="76x76" href="{{ asset('/bundles/socialfrontend/images/touch-icon-ipad.png') }}">
  35.     <link rel="apple-touch-icon" sizes="120x120"
  36.           href="{{ asset('/bundles/socialfrontend/images/touch-icon-iphone-retina.png') }}">
  37.     <link rel="apple-touch-icon" sizes="152x152"
  38.           href="{{ asset('/bundles/socialfrontend/images/touch-icon-ipad-retina.png') }}">
  39.     <link rel="apple-touch-icon" sizes="152x152"
  40.           href="{{ asset('/bundles/socialfrontend/images/touch-icon-ipad-retina.png') }}">
  41.     <link rel="apple-touch-icon-precomposed"
  42.           href="{{ asset('/bundles/socialfrontend/images/apple-touch-icon-precomposed.png') }}">
  43.     {% block stylesheets %}
  44.         {% stylesheets filter="?yui_css, cssrewrite"
  45.             "bundles/socialfrontend/css/theme/vendor/bootstrap.css"
  46.             "bundles/socialfrontend/css/theme/vendor/font-awesome-5/css/all.css"
  47.             "bundles/socialfrontend/css/theme/vendor/jquery-ui.css"
  48.             "bundles/socialfrontend/css/theme/vendor/fancy-select.css"
  49.             "bundles/socialfrontend/css/theme/vendor/bootstrap-slider.css"
  50.             "bundles/socialfrontend/js/vendor/PhotoSwipe/photoswipe.css"
  51.             "bundles/socialfrontend/js/vendor/PhotoSwipe/default-skin/default-skin.css" %}
  52.             <link href="{{ asset_url }}" rel="stylesheet" media="screen"/>
  53.         {% endstylesheets %}
  54.     {% endblock %}
  55.     {% for file in theme_manager.getActiveThemeCssFiles %}
  56.         <link href="{{ asset(file) }}" rel="stylesheet" media="screen"/>
  57.     {% endfor %}
  58.     {% block early_javascripts %}
  59.         {% include 'SocialFrontendBundle:Translation:index.html.twig' %}
  60.         <script type="text/javascript">
  61.             var chanelAuthenticateUrl = '{{ path("social_channel_authentication") }}';
  62.             var siteName = '{{ project_name }}';
  63.             var projectName = '{{ project_name }}';
  64.             var userLanguage = null;
  65.             var browserLanguage = null;
  66.             {% if app.user is null %}
  67.                 let browserLang = navigator.language || navigator.userLanguage;
  68.                 userLanguage = '{{ app.request.locale }}';
  69.                 browserLanguage = browserLang.split('-').shift();
  70.                 var availableLanguages = JSON.parse('{{ getLocales() | json_encode |raw }}');
  71.                 var changeLanguageUrl = "{{ path('social_frontend_change_locale', {'locale': ':locale' }) }}";
  72.             {% endif %}
  73.         </script>
  74.         {% javascripts filter="?yui_js"
  75.             "bundles/socialfrontend/js/theme/vendor/jquery.js" %}
  76.         <script type="text/javascript" src="{{ asset_url }}"></script>
  77.         <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
  78.         {% endjavascripts %}
  79.     {% endblock %}
  80.     <script type="text/javascript">
  81.         {% if app.user and (not app.user.isFake) %}
  82.             {% set smartLookKey = app.request.server.get('SMARTLOOK_KEY') %}
  83.             {% set clarityCode = app.request.server.get('CLARITY_CODE') %}
  84.             {% if smartLookKey and smartLookKey != "" %}
  85.                 window.smartlook||(function(d) {
  86.                     var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
  87.                     var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
  88.                     c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);
  89.                 })(document);
  90.                 smartlook('init', '{{ smartLookKey }}', { region: 'eu' });
  91.                 smartlook(
  92.                     'record', { forms: true, numbers: true, emails: true, ips: true  },
  93.                     'identify', '{{ app.user.id }}', {
  94.                         "name": '{{ app.user.username }}',
  95.                         "email": '{{ app.user.email }}',
  96.                     })
  97.             {% endif %}
  98.             {% if clarityCode and clarityCode != "" %}
  99.                 (function(c,l,a,r,i,t,y){
  100.                     c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
  101.                     t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
  102.                     y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
  103.                 })(window, document, "clarity", "script", '{{ clarityCode }}');
  104.             {% endif %}
  105.         {% endif %}
  106.         {% if theme_manager.getActiveThemeBackgroundImages()|length > 0 %}
  107.             var backgroundImages = JSON.parse('{{ theme_manager.getActiveThemeBackgroundImages()|json_encode|raw }}');
  108.         {% endif %}
  109.     </script>
  110.     {% if theme_manager.getActiveThemeBackgroundImage() %}
  111.     <style>
  112.         #banner-date {
  113.             background-image: url('{{ asset(theme_manager.getActiveThemeBackgroundImage()) }}') !important;
  114.         }
  115.     </style>
  116.     {% endif %}
  117. </head>
  118. {% block body %}{% endblock %}
  119. {% include 'SocialFrontendBundle::image_gallery_utils.html.twig' %}
  120. {% include 'SocialFrontendBundle::ga_code.html.twig' %}
  121. {% include 'SocialFrontendBundle::hotjar_code.html.twig' %}
  122. {% block javascripts %}
  123.     {% javascripts filter="?yui_js"
  124.         "bundles/socialfrontend/js/vendor/PhotoSwipe/photoswipe.min.js"
  125.         "bundles/socialfrontend/js/vendor/PhotoSwipe/photoswipe-ui-default.min.js" %}
  126.         <script src="//d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js" type="text/javascript"></script>
  127.         <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment-with-locales.min.js"></script>
  128.         <script src="https://cdn.jsdelivr.net/npm/@rapideditor/country-coder/dist/country-coder.iife.min.js"></script>
  129.         <script type="text/javascript">
  130.             {% set chatAudioActionCredit = constant('Social\\CreditsBundle\\Entity\\CreditActionsEntity::CREDIT_ACTION_CHAT_AUDIO_SEND') %}
  131.             {% set chatVideoActionCredit = constant('Social\\CreditsBundle\\Entity\\CreditActionsEntity::CREDIT_ACTION_CHAT_VIDEO_SEND') %}
  132.             var creditActionChatAudio = '{{ chatAudioActionCredit }}';
  133.             var creditActionChatVideo = '{{ chatVideoActionCredit }}';
  134.             var isCreditMode = {{ creditsPackagesActivated }};
  135.             var friendSuggestionsAndBoostedUserUrl = "{{ path('social_frontend_friendSuggestionsAndBoostedProfiles') }}"
  136.             var triggerBubbleNotificationUrl = "{{ path('social_bubble_notification_trigger') }}"
  137.             var onClickBubbleNotificationUrl = "{{ path('social_bubble_notification_click') }}"
  138.             var onCloseBubbleNotificationUrl = "{{ path('social_bubble_notification_close') }}"
  139.             var removeBubbleNotificationUrl = "{{ path('social_bubble_notification_remove_on_chat') }}"
  140.             var bootLiveActionUrl = "{{ path('social_admin_boot_live_action') }}"
  141.             var swipeProfileLikeUrl = "{{ path('social_frontend_like_dislike_swipe_profile') }}"
  142.             var checkUserPermissionForSendChatMediaUrl = "{{ path('social_frontend_check_permission_for_send_chat_media') }}"
  143.             var messageMarkAsRealReadUrl = "{{ path('social_frontend_message_mark_as_real_read') }}"
  144.             var allMessagesMarkAsRealReadUrl = "{{ path('social_frontend_all_messages_mark_as_real_read') }}"
  145.             var pauseMessageAudioAction = "{{ path('social_frontend_pause_message_audio') }}"
  146.             var allowedAudioRecordTime = "{{ getMediaUploadFileInChatSetting(chatAudioActionCredit)['allowedRecordTime'] }}"
  147.             var allowedVideoRecordTime = "{{ getMediaUploadFileInChatSetting(chatVideoActionCredit)['allowedRecordTime'] }}"
  148.             var notDisplayAudioButtonPackages = "{{ getPackagesForNotSendMediaButton(chatAudioActionCredit)|join(", ") }}"
  149.             var notDisplayVideoButtonPackages = "{{ getPackagesForNotSendMediaButton(chatVideoActionCredit)|join(", ") }}"
  150.             var playAudioMessageUrl = "{{ path('social_frontend_get_audio_message_url') }}"
  151.             var playVideoMessageUrl = "{{ path('social_frontend_get_video_message_url') }}"
  152.             var recordedAudioUrl = "";
  153.             var recordedVideoUrl = "";
  154.             var currentUser = {};
  155.             {% if app.user %}
  156.             Bugsnag.start({
  157.                 apiKey: '{{ bugsnagApiKey }}',
  158.                 appVersion: '{{ appVersion }}',
  159.                 appType: 'fjs-{{ project_name }}',
  160.                 user: currentUser,
  161.                 onError: function (event) {
  162.                     event.setUser('{{ app.user.id }}', '{{ app.user.email }}', '{{ app.user.username }}')
  163.                 }
  164.             });
  165.             {% else %}
  166.             Bugsnag.start({
  167.                 apiKey: '{{ bugsnagApiKey }}',
  168.                 appVersion: '{{ appVersion }}',
  169.                 appType: 'fjs-{{ project_name }}',
  170.             });
  171.             {% endif %}
  172.         </script>
  173.         <script type="text/javascript" src="{{ asset_url }}"></script>
  174.     {% endjavascripts %}
  175. {% endblock %}
  176. </html>