[%
USE CPBranding;
USE VarCache;
SET TEMPLATE_PATH = "two-factor-auth/";
SET favicon_path = TEMPLATE_PATH _ "assets/favicon.ico";
SET CPANEL.CPVAR.dprefix = "./";
SET style_sheets = [];
SET scripts = [];
SET user_locale = locale.get_language_tag();
SET direction = locale.get_html_dir_attr();
SET base_dir = '/usr/local/cpanel/base/unprotected/wp-squared/';
# If style customizations are available, save them to varcache to inject at the end of the template.
varcache.set('customizations', CPBranding.get_customizations(TEMPLATE_PATH _ "assets/wp2-logo-white-white.svg", TEMPLATE_PATH _ "assets/wp2-logo-sm.svg", favicon_path, "cpanel", "wp-squared"));
# The following content is inserted by underscore-template-loader's require macro.
#@require('../../../lodash-templates/_file_list.lodash')
USE dir = Directory(base_dir);
SET custom_variables_file = 0;
FOREACH file IN dir.files;
IF file.name.match("-variables-custom\.css$");
custom_variables_file = file.name;
END;
END;
%]
[% locale.maketext('WP Squared Login Security') %]
[% IF varcache.customizations.favicon %]
[% ELSE %]
[% END %]
[%
SET custom_mat_theme = varcache.customizations.material_theme || "teal";
SET mat_theme_mode = "light"; # Will come from nv data. It defaults to light mode.
SET custom_mat_theme_class = custom_mat_theme _ "-" _ mat_theme_mode;
SET wp_variables_url = MagicRevision(get_theme_url(TEMPLATE_PATH _ "wp-" _ custom_mat_theme_class _ "-variables-default.css"));
SET styles_url = MagicRevision(get_theme_url(TEMPLATE_PATH _ 'styles.css'));
%]
[% IF custom_variables_file %]
[% END %]
[%
FOR source IN scripts;
SET non_translated_url = MagicRevision(get_theme_url(source));
SET n = 0;
SET test_str = source.split('\.');
SET new_test_str = test_str.$n _ '-' _ user_locale _ '.js';
SET test_url = base_dir _ new_test_str;
SET translated_url = MagicRevision(get_theme_url(new_test_str));
%]
[% IF get_theme_url(new_test_str) %]
[% END %]
[% END %]
style_sheets.push(TEMPLATE_PATH _ 'styles.css');
style_sheets.push(TEMPLATE_PATH _ 'wp-blue-light-variables-default.css');
style_sheets.push(TEMPLATE_PATH _ 'wp-green-light-variables-default.css');
style_sheets.push(TEMPLATE_PATH _ 'wp-orange-light-variables-default.css');
style_sheets.push(TEMPLATE_PATH _ 'wp-teal-light-variables-default.css');
style_sheets.push(TEMPLATE_PATH _ 'wp-violet-light-variables-default.css');
scripts.push(TEMPLATE_PATH _ 'polyfills.js');
scripts.push(TEMPLATE_PATH _ 'main.js');