diff --git a/src/main/java/cc/ryanc/halo/config/MvcConfig.java b/src/main/java/cc/ryanc/halo/config/MvcConfig.java index 0be5174aa..001574563 100644 --- a/src/main/java/cc/ryanc/halo/config/MvcConfig.java +++ b/src/main/java/cc/ryanc/halo/config/MvcConfig.java @@ -91,6 +91,11 @@ public class MvcConfig implements WebMvcConfigurer { .addResourceLocations("file:///" + System.getProperties().getProperty("user.home") + "/halo/backup/"); } + /** + * 跨域 + * + * @param registry registry + */ @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") @@ -100,6 +105,11 @@ public class MvcConfig implements WebMvcConfigurer { .allowedMethods("*"); } + /** + * 国际化设置 + * + * @return LocaleResolver + */ @Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); @@ -107,6 +117,11 @@ public class MvcConfig implements WebMvcConfigurer { return slr; } + /** + * 国际化参数拦截器 + * + * @return LocaleChangeInterceptor + */ @Bean public LocaleChangeInterceptor localeChangeInterceptor() { LocaleChangeInterceptor lci = new LocaleChangeInterceptor(); diff --git a/src/main/resources/static/js/app.js b/src/main/resources/static/js/halo.js similarity index 100% rename from src/main/resources/static/js/app.js rename to src/main/resources/static/js/halo.js diff --git a/src/main/resources/templates/admin/admin_login.ftl b/src/main/resources/templates/admin/admin_login.ftl index f0f8071b2..7ad0a81db 100755 --- a/src/main/resources/templates/admin/admin_login.ftl +++ b/src/main/resources/templates/admin/admin_login.ftl @@ -47,7 +47,7 @@ - + diff --git a/src/main/resources/templates/admin/module/_macro.ftl b/src/main/resources/templates/admin/module/_macro.ftl index b63f8235c..290c71c37 100644 --- a/src/main/resources/templates/admin/module/_macro.ftl +++ b/src/main/resources/templates/admin/module/_macro.ftl @@ -53,7 +53,7 @@ <#if options.blog_locale?default('zh_CN')=='zh_CN'> - + <@compress single_line=true> - + - + - + - + - + + + + + +<#nested /> + + + diff --git a/src/main/resources/templates/themes/anatole/module/options.ftl b/src/main/resources/templates/themes/anatole/module/options.ftl index 8351dfd78..98adec1ac 100644 --- a/src/main/resources/templates/themes/anatole/module/options.ftl +++ b/src/main/resources/templates/themes/anatole/module/options.ftl @@ -1,23 +1,5 @@ - - - - - - - - - - - - +<#import "/common/macro/theme_option_marco.ftl" as option> +<@option.head />
@@ -218,38 +200,4 @@
- - - - - - - - +<@option.import_js /> diff --git a/src/main/resources/templates/themes/material/module/options.ftl b/src/main/resources/templates/themes/material/module/options.ftl index 73898845f..f0f356937 100644 --- a/src/main/resources/templates/themes/material/module/options.ftl +++ b/src/main/resources/templates/themes/material/module/options.ftl @@ -1,24 +1,5 @@ - - - - - - - - - - - - - +<#import "/common/macro/theme_option_marco.ftl" as option> +<@option.head />
@@ -507,13 +488,8 @@
- - - - - +<@option.import_js> - - \ No newline at end of file +