56 lines
2.2 KiB
HTML
56 lines
2.2 KiB
HTML
{php}
|
|
$arrGuideLines = [];
|
|
foreach ([
|
|
$seoCopy['play_intro'] ?? '',
|
|
$seoCopy['play_meta_note'] ?? '',
|
|
$seoCopy['play_body_lead'] ?? '',
|
|
$seoCopy['play_body_next'] ?? '',
|
|
] as $strGuideLine) {
|
|
$strGuideLine = trim((string)$strGuideLine);
|
|
if ($strGuideLine !== '' && !in_array($strGuideLine, $arrGuideLines, true)) {
|
|
$arrGuideLines[] = $strGuideLine;
|
|
}
|
|
}
|
|
$arrGuideCards = array_values(array_filter((array)($seoCopy['guide_cards'] ?? []), static function ($arrCard): bool {
|
|
return is_array($arrCard)
|
|
&& (
|
|
trim((string)($arrCard['title'] ?? '')) !== ''
|
|
|| trim((string)($arrCard['text'] ?? '')) !== ''
|
|
);
|
|
}));
|
|
{/php}
|
|
|
|
{if !empty($arrGuideLines) || !empty($arrGuideCards)}
|
|
<section class="{$TpStyle.dom_prefix}-guide {$TpStyle.dom_prefix}-guide-play"
|
|
style="margin:20px 0 6px;padding:18px 20px;border:1px solid rgba(0,0,0,.08);border-radius:20px;background:linear-gradient(180deg,rgba(255,255,255,.98),var(--bg-soft-color));">
|
|
{notempty name="arrGuideLines"}
|
|
<div style="display:grid;gap:10px;margin-bottom:{notempty name='arrGuideCards'}16px{else/}0{/notempty};">
|
|
{foreach $arrGuideLines as $strGuideLine}
|
|
<p style="margin:0;line-height:1.9;color:var(--text-color);font-size:14px;">
|
|
{$strGuideLine}
|
|
</p>
|
|
{/foreach}
|
|
</div>
|
|
{/notempty}
|
|
|
|
{notempty name="arrGuideCards"}
|
|
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;">
|
|
{foreach $arrGuideCards as $arrGuideCard}
|
|
<article style="padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.92);border:1px solid rgba(0,0,0,.05);">
|
|
{notempty name="$arrGuideCard.title"}
|
|
<h3 style="margin:0 0 8px;font-size:14px;line-height:1.4;color:var(--text-color);">
|
|
{$arrGuideCard.title}
|
|
</h3>
|
|
{/notempty}
|
|
{notempty name="$arrGuideCard.text"}
|
|
<p style="margin:0;line-height:1.8;color:var(--text-muted-color);font-size:13px;">
|
|
{$arrGuideCard.text}
|
|
</p>
|
|
{/notempty}
|
|
</article>
|
|
{/foreach}
|
|
</div>
|
|
{/notempty}
|
|
</section>
|
|
{/if}
|