Commit 5a46aeabe9b7e5af72a48e8659e8797312eec977

Authored by Виталий
1 parent 80fb2840

doc home

frontend/controllers/SiteController.php
... ... @@ -117,6 +117,13 @@
117 117 ->orderBy('sort')
118 118 ->limit(3)
119 119 ->all();
  120 + $doctors = Doctor::find()
  121 + ->where(['status' => true])
  122 + ->orderBy([
  123 + 'sort' => SORT_ASC,
  124 + 'id' => SORT_ASC
  125 + ])
  126 + ->all();
120 127 $settings = Settings::getInstance();
121 128 return $this->render(
122 129 'index',
... ... @@ -126,6 +133,7 @@
126 133 'comments' => $comments,
127 134 'settings' => $settings,
128 135 'package' => $package,
  136 + 'docs' => $doctors
129 137 ]
130 138 );
131 139 }
... ...
frontend/views/site/index.php
... ... @@ -125,6 +125,127 @@ JS;
125 125 </div>
126 126 <?php }?>
127 127 </section>
  128 +
  129 +<section class="section-box-home-doc">
  130 + <style>
  131 + .doctor_long_img {
  132 + width: 340px;
  133 + height: 440px;
  134 + }
  135 +
  136 + .doctor_short_img {
  137 + width: 165px;
  138 + height: 165px;
  139 + }
  140 + </style>
  141 + <div class="style slider-doctors-wrapper">
  142 + <div class="style slider-doctors owl-carousel">
  143 +
  144 + <?php if (isset($docs)) {
  145 + $first = '';
  146 + $second = '';
  147 + $third = '';
  148 + $counter = 0;
  149 + foreach ($docs as $doc) {
  150 + $activeStyle = ($counter == 0) ? 'active' : '';
  151 + $docFio = explode(" ", $doc->language->name);
  152 + $docName = ($docFio[0]) ?? '';
  153 + $docSurname = ($docFio[1]) ?? '';
  154 + $docPosition = $doc->language->position;
  155 + $docDescription = $doc->language->description;
  156 + $img1 = '';
  157 + $img2 = '';
  158 + if (isset($doc->image)) {
  159 + $img1 = ImageHelper::set(($doc->image) ? $doc->image->getPath() : null)
  160 + ->cropResize(340, 440)
  161 + ->quality(84)
  162 + ->renderImage();
  163 + $img2 = ImageHelper::set(($doc->image) ? $doc->image->getPath() : null)
  164 + ->cropResize(165, 165)
  165 + ->quality(84)
  166 + ->renderImage();
  167 +
  168 + }
  169 + #die(var_dump(htmlspecialchars($img1)));
  170 + # $docImg1 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png";
  171 + $docImg2 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png";
  172 + $docImg3 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png";
  173 +
  174 +
  175 + $first .= ' <div class="slider-doc-items">
  176 + <div class="slider-doc-img-wr">
  177 + <!-- 340x440px-->
  178 + ' . $img1 . '
  179 + </div>
  180 + </div>';
  181 +
  182 +
  183 + $second .= ' <div class="' . $activeStyle . ' slider-doc-main-items" style="display: none;">
  184 + <div class="slider-doc-main-item-img">
  185 + <div>
  186 + ' . $img1 . '
  187 + </div>
  188 + </div>
  189 + <div class="slider-doc-main-item-txt">
  190 + <div class="doc-name">' . $docName . '</div>
  191 + <div class="doc-surname">' . $docSurname . '</div>
  192 + <div class="specialty">' . $docPosition . '</div>
  193 + <div class="doc-txt">
  194 + <p>
  195 + ' . $docDescription . '
  196 + </p>
  197 + </div>
  198 + <div class="doc-btn">
  199 + <span class="btn_ modal-link" data-form="callback">Записаться на прием</span>
  200 + </div>
  201 + </div>
  202 + <div class="btns-doc">
  203 + <div class="left"></div>
  204 + <div class="right"></div>
  205 + </div>
  206 + </div>';
  207 +
  208 +
  209 + $third .= ' <div class="col-xs-12 col-sm-6 doctors-col">
  210 + <div class="row">
  211 + <div class="col-xs-12 col-sm-4 doctor-img-wr">
  212 + <div class="doctor-img">
  213 + <!--165x165px-->
  214 + ' . $img2 . '
  215 + </div>
  216 + </div>
  217 + <div class="col-xs-12 col-sm-8">
  218 + <div class="style doc-name">' . $docName . '</div>
  219 + <div class="style doc-surname">' . $docSurname . '</div>
  220 + <div class="style specialty">' . $docPosition . '</div>
  221 + <div class="style doc-txt">
  222 + <p>
  223 + ' . $docDescription . '
  224 + </p>
  225 + </div>
  226 + <div class="style doc-btn">
  227 + <span class="btn_ modal-link" data-form="callback">Записаться на прием</span>
  228 + </div>
  229 + </div>
  230 + </div>
  231 + </div>';
  232 + ++$counter;
  233 + }
  234 + } ?>
  235 +
  236 +
  237 + <?= $first; ?>
  238 + </div>
  239 +
  240 + <div class="slider-doc-main">
  241 + <?= $second; ?>
  242 +
  243 +
  244 +
  245 + </div>
  246 + </div>
  247 +</section>
  248 +
128 249 <?php if (!empty($seo->text)){?>
129 250  
130 251 <section class="section-box-3">
... ...
frontend/web/favicon.ico
No preview for this file type
frontend/web/images/favicon.ico deleted
No preview for this file type
frontend/web/images/map/marker-1.png

4.96 KB | W: | H:

7.93 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/js/map.js
... ... @@ -80,7 +80,7 @@ function initialize() {
80 80 }
81 81 ;
82 82 var map = new google.maps.Map(document.getElementById("map_canvas"), settings);
83   - var image1 = new google.maps.MarkerImage('/images/markers/marker-we-1.png', new google.maps.Size(68, 80), new google.maps.Point(0, 0), new google.maps.Point(16, 35));
  83 + var image1 = new google.maps.MarkerImage('/images/markers/marker-we-1-new.png', new google.maps.Size(68, 80), new google.maps.Point(0, 0), new google.maps.Point(16, 35));
84 84 var markers = [];
85 85 $('.adress-map span')
86 86 .each(function() {
... ...