[% #---------------------------------------------------------------------- # Arguments (probably *not* a complete list!) that this template accepts: # # allow_login_autocomplete # app_name # display_locales # https # login_messages # logout # msg_code # reset_pass - should be true if either resetpass or resetpass_sub is enabled (doesn't have to be both) USE CPBranding; USE JSON; SET TEMPLATE_PATH = "login/" _ locale_attributes.locale _ "/"; 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/'; SET dark_path = get_theme_url(TEMPLATE_PATH _ "assets/wp2-logo-white-white.svg"); SET light_path = get_theme_url(TEMPLATE_PATH _ "assets/wp2-logo-sm.svg"); SET favicon_path = TEMPLATE_PATH _ "assets/favicon.ico"; SET customizations = CPBranding.get_customizations(dark_path, light_path, favicon_path, "cpanel", "wp-squared"); #---------------------------------------------------- # ∨∨∨ THIS IS GENERATED CODE, DO NOT MODIFY IT ∨∨∨ #---------------------------------------------------- # scripts.push(TEMPLATE_PATH _ 'polyfills.js'); scripts.push(TEMPLATE_PATH _ 'main.js'); # ~~~INSERT ABOVE~~~ 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; SET login_msgs = login_messages; login_msgs.max_users_exceeded = { msg => locale.maketext('Maximum Users Exceeded.'), info => locale.maketext('For more information, contact your hosting provider: “[output,url,_1,_2,target,_blank]”', contact_info.url, contact_info.name) }; %] [% locale.maketext('WP Squared Login') %] [% IF customizations.favicon %] [% ELSE %] [% END %] [% SET custom_mat_theme = 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 = 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 = get_theme_url(new_test_str); %] [% IF get_theme_url(new_test_str) %] [% END %] [% END %]