File tree Expand file tree Collapse file tree 6 files changed +60
-19
lines changed
Plugin/Showcase/Element/Showcase Expand file tree Collapse file tree 6 files changed +60
-19
lines changed Original file line number Diff line number Diff line change 1- <?php if ($ highlight ): ?>
1+ <?php if ($ highlights ): ?>
22 <?= $ this ->element ('Showcase.Showcase/highlight_carousel ' , [
3- 'givenHighlight ' => $ highlight ,
3+ 'givenHighlight ' => $ highlights ,
44 'imageVersion ' => 'slider '
55 ]) ?>
66<?php endif ; ?>
Original file line number Diff line number Diff line change 1- <div class="col-sm-12 showcase-cases ptb-30">
2- <div class="col-sm-4 <?= $ index % 2 === 1 ? 'col-sm-push-8 ' : '' ?> ">
3- <a href="#">
4- <?= $ this ->Showcase ->image ($ project ->screen_monitor_images [0 ], [
5- 'class ' => 'img-responsive '
6- ], 'small ' ); ?>
7- </a>
1+ <?php if ($ project ->website ): ?>
2+ <div class="col-sm-12 showcase-cases ptb-30">
3+ <div class="col-sm-4 <?= $ index % 2 === 1 ? 'col-sm-push-8 ' : '' ?> ">
4+ <a href="<?= $ this ->App ->externalLink ($ project ->website ); ?> " target="_blank">
5+ <?= $ this ->Showcase ->image ($ project ->screen_monitor_images [0 ], [
6+ 'class ' => 'img-responsive '
7+ ], 'small ' ); ?>
8+ </a>
9+ </div>
10+ <div class="col-sm-8 <?= $ index % 2 === 1 ? 'col-sm-pull-4 ' : '' ?> ">
11+ <h4><?= $ project ->title ?> </h4>
12+ <?= $ project ->description ?>
13+ </div>
814 </div>
9- <div class="col-sm-8 <?= $ index % 2 === 1 ? 'col-sm-pull-4 ' : '' ?> ">
10- <h4><?= $ project ->title ?> </h4>
11- <?= $ project ->description ?>
12- </div>
13- </div>
15+ <?php endif ; ?>
Original file line number Diff line number Diff line change 1+ <?php if (is_array ($ givenHighlight )): ?>
2+ <?php $ images = collection ($ givenHighlight )
3+ ->filter (function ($ p ) {
4+ return isset ($ p ->screen_monitor_images [0 ]);
5+ })
6+ ->map (function ($ p ) {
7+ return $ p ->screen_monitor_images [0 ];
8+ })
9+ ->toArray (); ?>
10+ <?php else : ?>
11+ <?php $ images = $ givenHighlight ->screen_monitor_images ?>
12+ <?php endif ; ?>
13+
114<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
215 <ol class="carousel-indicators">
3- <?php foreach ($ givenHighlight -> screen_monitor_images as $ index => $ image ): ?>
16+ <?php foreach ($ images as $ index => $ image ): ?>
417 <li data-target="#carousel-example-generic"
518 data-slide-to="<?= $ index ?> "
619 class="<?= ($ index === 0 ) ? 'active ' : '' ?> "></li>
720 <?php endforeach ?>
821 </ol>
922 <div class="carousel-inner" role="listbox">
10- <?php foreach ($ givenHighlight -> screen_monitor_images as $ index => $ image ): ?>
23+ <?php foreach ($ images as $ index => $ image ): ?>
1124 <div class="item <?= ($ index === 0 ) ? 'active ' : '' ?> ">
1225 <?= $ this ->Showcase ->image (
1326 $ image ,
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ class HomePageHighlightCell extends Cell
2727 public function display ()
2828 {
2929 $ highlights = $ this ->loadModel ('Showcase.Projects ' )->getHighlights ();
30- $ highlight = reset ($ highlights );
31- $ this ->set ('highlight ' , $ highlight );
30+ $ this ->set ('highlights ' , $ highlights );
3231 }
3332}
Original file line number Diff line number Diff line change @@ -11,6 +11,22 @@ class AppHelper extends Helper
1111{
1212 public $ helpers = ['Html ' ];
1313
14+ /**
15+ * Adds http to the begining if not there yet
16+ *
17+ * @param string $link
18+ * @return string
19+ */
20+ public function externalLink ($ link )
21+ {
22+ if (!preg_match ('/^(http|https)/ ' , $ link )) {
23+ return 'http:// ' . $ link ;
24+ }
25+
26+ return $ link ;
27+ }
28+
29+
1430 /**
1531 * Outputs the footer menu items
1632 *
Original file line number Diff line number Diff line change @@ -244,4 +244,15 @@ i.icon-social {
244244
245245.row .col-p30 [class *= "col-" ].business-solution {
246246 padding : 0 20px ;
247- }
247+ }
248+ input # mc-embedded-subscribe {
249+ background : white;
250+ color : # D33C44 ;
251+ padding : 15px 30px ;
252+ border-radius : 8px ;
253+ width : auto;
254+ }
255+
256+ input [type = "radio" ]: checked : before {
257+ background : # 505050 ;
258+ }
You can’t perform that action at this time.
0 commit comments