index.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /** @var yii\web\View $this */
  3. /** @var \yii\data\ActiveDataProvider $newsDataProvider */
  4. $this->title = 'Главная';
  5. ?>
  6. <div class="site-index">
  7. <div class="row">
  8. <div class="col-md-8 " id="main-view-container">
  9. <?=$this->render("index/main_view",[])?>
  10. </div>
  11. <script>
  12. (function (){
  13. let main_view_cont = document.getElementById('main-view-container');
  14. let height = main_view_cont.offsetHeight;
  15. console.log(height)
  16. let style = document.createElement("style");
  17. style.innerHTML = "#lenta-container{ max-height:"+height+"px;}";
  18. main_view_cont.parentNode.append(style);
  19. })()
  20. </script>
  21. <div class="col-md-4">
  22. <div id="lenta-container">
  23. <?=$this->render("/layouts/lenta/lenta")?>
  24. </div>
  25. </div>
  26. </div>
  27. <?=$this->render("index/partners_news",['topic_id'=>36])?>
  28. <?=$this->render('index/wide_widget')?>
  29. <?=$this->render('index/text_news_widget')?>
  30. <?=$this->render('index/topic_widget',['topic_id'=>38])?>
  31. <?=$this->render("index/partners_news",['topic_id'=>39])?>
  32. <?=$this->render('index/topic_widget',['topic_id'=>40])?>
  33. </div>