You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

71 line
2.2 KiB

  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * @var $block \Magento\Theme\Block\Html\Notices
  8. * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  9. */
  10. ?>
  11. <?php if ($block->displayNoscriptNotice()): ?>
  12. <noscript>
  13. <div class="message global noscript">
  14. <div class="content">
  15. <p>
  16. <strong><?= $block->escapeHtml(__('JavaScript seems to be disabled in your browser.')) ?></strong>
  17. <span>
  18. <?= $block->escapeHtml(
  19. __('For the best experience on our site, be sure to turn on Javascript in your browser.')
  20. ) ?>
  21. </span>
  22. </p>
  23. </div>
  24. </div>
  25. </noscript>
  26. <?php endif; ?>
  27. <?php if ($block->displayNoLocalStorageNotice()): ?>
  28. <div class="notice global site local_storage">
  29. <div class="content">
  30. <p>
  31. <strong><?= $block->escapeHtml(__('Local Storage seems to be disabled in your browser.')) ?></strong>
  32. <br />
  33. <?= $block->escapeHtml(
  34. __('For the best experience on our site, be sure to turn on Local Storage in your browser.')
  35. ) ?>
  36. </p>
  37. </div>
  38. </div>
  39. <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'div.notice.global.site.local_storage') ?>
  40. <?php $scriptString = <<<script
  41. require(['jquery'], function(jQuery){
  42. // <![CDATA[
  43. (function($) {
  44. var test = 'test';
  45. try {
  46. localStorage.setItem(test, test);
  47. localStorage.removeItem(test);
  48. } catch(e) {
  49. $(".notice.global.site.local_storage").show();
  50. }
  51. })(jQuery);
  52. // ]]>
  53. });
  54. script;
  55. ?>
  56. <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
  57. <?php endif; ?>
  58. <?php if ($block->displayDemoNotice()): ?>
  59. <div class="message global demo">
  60. <div class="content">
  61. <p><?= $block->escapeHtml(__('This is a demo store. No orders will be fulfilled.')) ?></p>
  62. </div>
  63. </div>
  64. <?php endif; ?>