four col thing
This commit is contained in:
@@ -80,6 +80,7 @@ return [
|
|||||||
"productBox" => \Helpers\McCansHelpers::searchResultBox('product'),
|
"productBox" => \Helpers\McCansHelpers::searchResultBox('product'),
|
||||||
"pageBox" => \Helpers\McCansHelpers::searchResultBox('page'),
|
"pageBox" => \Helpers\McCansHelpers::searchResultBox('page'),
|
||||||
"usd" => \Helpers\McCansHelpers::usd(),
|
"usd" => \Helpers\McCansHelpers::usd(),
|
||||||
|
"fourColContent" => \Helpers\McCansHelpers::fourColContent(),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,38 @@ class McCansHelpers
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function fourColContent()
|
||||||
|
{
|
||||||
|
return function ($template, $context, $args, $source) {
|
||||||
|
$content = get_field("flex_four_column_content", "options");
|
||||||
|
$icons = [
|
||||||
|
"truck",
|
||||||
|
"chat-dots-fill",
|
||||||
|
"arrow-counterclockwise",
|
||||||
|
"credit-card",
|
||||||
|
];
|
||||||
|
|
||||||
|
$output = "";
|
||||||
|
foreach ($content as $i => $c) {
|
||||||
|
$svg = site()->getAssetContents($icons[$i]);
|
||||||
|
$output .= site()->renderTemplate(<<<HTML
|
||||||
|
<div class="col">
|
||||||
|
<div class="icon-wrapper">{{{ icon }}}</div>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<strong>{{{ headline }}}</strong>
|
||||||
|
{{{ content }}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
HTML, [
|
||||||
|
"icon" => $svg,
|
||||||
|
"headline" => $c["headline"],
|
||||||
|
"content" => $c["sub_headline"],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
return $output;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public static function locationTile()
|
public static function locationTile()
|
||||||
{
|
{
|
||||||
return function ($template, $context, $args, $source) {
|
return function ($template, $context, $args, $source) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<section class="four-column-blocks">
|
<section class="four-column-blocks">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{#acfOption flex_four_column_content}}
|
{{#fourColContent}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user