mobileMainPageLentBanner.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * @var $this \yii\web\View
  4. */
  5. ?>
  6. <?php
  7. $controller = Yii::$app->controller->id;
  8. $action = Yii::$app->controller->action->id;
  9. if($controller=="site" && $action=="index" && Yii::$app->deviceDetect->isMobile()):?>
  10. <style>
  11. .mobile-main-page-lent-banner{
  12. height: 250px;
  13. }
  14. .lenta .list-wrapper div.mobile-main-page-lent-banner:hover{
  15. background: transparent;
  16. }
  17. .mobile-main-page-lent-banner>div{
  18. display: flex;
  19. align-items: center;
  20. justify-content: center;
  21. }
  22. </style>
  23. <div class="mobile-main-page-lent-banner">
  24. <div id="lent_adfox_163238723987728973"></div>
  25. <script>
  26. window.yaContextCb.push(() => {
  27. // eslint-disable-next-line no-undef
  28. Ya.adfoxCode.create({
  29. ownerId: 279920,
  30. containerId: 'lent_adfox_163238723987728973',
  31. params: {
  32. pp: 'g',
  33. ps: 'dbpj',
  34. p2: 'hizb'
  35. }
  36. })
  37. })
  38. </script>
  39. </div>
  40. <?php endif;?>