[% 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 wp_mat_themes_prefix = "mat-themes-"; SET user_locale = locale.get_language_tag(); SET direction = locale.get_html_dir_attr(); # If style customizations are available, save them to varcache to inject at the end of the template. varcache.set('customizations', CPBranding.get_customizations("assets/wp2-logo-white-sm.svg", "assets/wp2-logo-sm.svg", "assets/favicon.ico", "cpanel", "wp-squared")); # The following content is inserted by underscore-template-loader's require macro. # #---------------------------------------------------- # ∨∨∨ THIS IS GENERATED CODE, DO NOT MODIFY IT ∨∨∨ #---------------------------------------------------- # # Build webpack css bundle list style_sheets.push(TEMPLATE_PATH _ 'styles.css'); style_sheets.push(TEMPLATE_PATH _ 'mat-themes-teal.css'); style_sheets.push(TEMPLATE_PATH _ 'mat-themes-violet.css'); style_sheets.push(TEMPLATE_PATH _ 'mat-themes-blue.css'); style_sheets.push(TEMPLATE_PATH _ 'mat-themes-green.css'); style_sheets.push(TEMPLATE_PATH _ 'mat-themes-orange.css'); # Build webpack javascript bundle list scripts.push(TEMPLATE_PATH _ 'runtime.js'); scripts.push(TEMPLATE_PATH _ 'vendor-c0d76f48.js'); scripts.push(TEMPLATE_PATH _ 'vendor-53210e61.js'); scripts.push(TEMPLATE_PATH _ 'polyfills.js'); scripts.push(TEMPLATE_PATH _ 'main.js'); # #---------------------------------------------------- # ^^^ THIS IS GENERATED CODE, DO NOT MODIFY IT ^^^ #---------------------------------------------------- # DEV NOTE: style_sheets are filled in the above lodash template contains the theme files that start with '$wp_mat_themes_prefix'. # Filter them out and only load the theme that is currently applied to the account. style_sheets = style_sheets.grep("^(?!$wp_mat_themes_prefix)"); %] [% 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 custom_mat_theme_stylesheet = MagicRevision(get_theme_url(TEMPLATE_PATH _ wp_mat_themes_prefix _ custom_mat_theme _ ".css")); %] [% 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 %]