Viewing File: /usr/local/cpanel/base/frontend/jupiter/solutions/resources_panel/resources_panel.component.tt
[%
USE JSON;
SET data_file_path = theme_magic_path('solutions/resources_panel/resources_panel_data.json');
SET data = JSON.loadfile(data_file_path, null, 1);
MACRO clean_locale_text BLOCK;
# Strip maketext syntax from strings; it's used in our json to ensure strings are harvested for translation.
locale.makevar( text.remove('^maketext\(\'|\'\)$') );
END;
%]
<section id="resources-section" class="cp-page-section">
<h2>[% locale.maketext("Resources") %]</h2>
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-3 g-4">
[% FOREACH item IN data %]
[%
headerText = clean_locale_text(text=item.headerText);
bodyText = clean_locale_text(text=item.bodyText);
footerLinkText = clean_locale_text(text=item.footerLinkText);
%]
<div class="col">
<section class="cp-card cp-card--condensed">
<div class="cp-card__header">
<cp-icon class="cp-card__header-icon cp-resources-panel__header-icon" name="[% item.iconClass %]"></cp-icon>
<span class="cp-card__header-text">[% headerText %]</span>
</div>
<div class="cp-card__body">
<p class="cp-card__description">[% bodyText %]</p>
</div>
<div class="cp-card__footer cp-card__footer--no-divider">
<a class="cp-btn cp-btn--link cp-resources-panel__link" href="[% item.footerLinkHref %]" target="resource-link-[% loop.count %]">
<cp-icon class="cp-resources-panel__footer-icon" name="external-link-line"></cp-icon>
<span class="cp-resources-panel__footer-text">[% footerLinkText %]</span>
</a>
</div>
</section>
</div>
[% END %]
</div>
</section>
Back to Directory
File Manager