aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-02-26 12:06:10 +0300
committerGravatar Vitaly Takmazov2018-02-26 12:06:10 +0300
commitd91c5508f2172347e18ad93f6048582deda4ae02 (patch)
tree91b5fb44634f072eb21630bcaf0955766a133380 /juick-www/src/main
parentc6bc69cee51066ae2f153208bd995d43637223c9 (diff)
www: move templates to resources
Diffstat (limited to 'juick-www/src/main')
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java10
-rw-r--r--juick-www/src/main/resources/templates/layouts/content.html (renamed from juick-www/src/main/webapp/WEB-INF/layouts/content.html)0
-rw-r--r--juick-www/src/main/resources/templates/layouts/default.html (renamed from juick-www/src/main/webapp/WEB-INF/layouts/default.html)0
-rw-r--r--juick-www/src/main/resources/templates/layouts/minimal.html (renamed from juick-www/src/main/webapp/WEB-INF/layouts/minimal.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/404.html (renamed from juick-www/src/main/webapp/WEB-INF/views/404.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/blog.html (renamed from juick-www/src/main/webapp/WEB-INF/views/blog.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/blog_tags.html (renamed from juick-www/src/main/webapp/WEB-INF/views/blog_tags.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/help.html (renamed from juick-www/src/main/webapp/WEB-INF/views/help.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/index.html (renamed from juick-www/src/main/webapp/WEB-INF/views/index.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/login.html (renamed from juick-www/src/main/webapp/WEB-INF/views/login.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/macros/tags.html (renamed from juick-www/src/main/webapp/WEB-INF/views/macros/tags.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/macros/tree.html (renamed from juick-www/src/main/webapp/WEB-INF/views/macros/tree.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/footer.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/footer.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/homecolumn.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/homecolumn.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/message.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/message.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/navigation.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/navigation.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/settings_tabs.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/settings_tabs.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/tagcolumn.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/tagcolumn.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/tags.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/tags.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/thread_list.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/thread_list.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/thread_tree.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/thread_tree.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/usercolumn.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/usercolumn.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/partial/usertags.html (renamed from juick-www/src/main/webapp/WEB-INF/views/partial/usertags.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/pm_inbox.html (renamed from juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/pm_sent.html (renamed from juick-www/src/main/webapp/WEB-INF/views/pm_sent.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/post.html (renamed from juick-www/src/main/webapp/WEB-INF/views/post.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/post_success.html (renamed from juick-www/src/main/webapp/WEB-INF/views/post_success.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/settings_about.html (renamed from juick-www/src/main/webapp/WEB-INF/views/settings_about.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/settings_auth-email.html (renamed from juick-www/src/main/webapp/WEB-INF/views/settings_auth-email.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/settings_main.html (renamed from juick-www/src/main/webapp/WEB-INF/views/settings_main.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/settings_password.html (renamed from juick-www/src/main/webapp/WEB-INF/views/settings_password.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/settings_privacy.html (renamed from juick-www/src/main/webapp/WEB-INF/views/settings_privacy.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/settings_result.html (renamed from juick-www/src/main/webapp/WEB-INF/views/settings_result.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/signup.html (renamed from juick-www/src/main/webapp/WEB-INF/views/signup.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/test.html (renamed from juick-www/src/main/webapp/WEB-INF/views/test.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/thread.html (renamed from juick-www/src/main/webapp/WEB-INF/views/thread.html)0
-rw-r--r--juick-www/src/main/resources/templates/views/users.html (renamed from juick-www/src/main/webapp/WEB-INF/views/users.html)0
37 files changed, 4 insertions, 6 deletions
diff --git a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
index 60a3b9cc..1654f2ac 100644
--- a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
+++ b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
@@ -20,6 +20,7 @@ package com.juick.www.configuration;
import com.juick.server.configuration.BaseWebConfiguration;
import com.mitchellbosecke.pebble.PebbleEngine;
import com.mitchellbosecke.pebble.extension.FormatterExtension;
+import com.mitchellbosecke.pebble.loader.ClasspathLoader;
import com.mitchellbosecke.pebble.loader.Loader;
import com.mitchellbosecke.pebble.loader.ServletLoader;
import com.mitchellbosecke.pebble.spring4.PebbleViewResolver;
@@ -71,12 +72,9 @@ public class WwwServletConfiguration extends BaseWebConfiguration {
configurer.enable();
}
- @Inject
- private ServletContext servletContext;
-
@Bean
- public Loader templateLoader(){
- return new ServletLoader(servletContext);
+ public Loader templateLoader() {
+ return new ClasspathLoader();
}
@Bean
@@ -97,7 +95,7 @@ public class WwwServletConfiguration extends BaseWebConfiguration {
@Bean
public ViewResolver viewResolver() {
PebbleViewResolver viewResolver = new PebbleViewResolver();
- viewResolver.setPrefix("/WEB-INF/");
+ viewResolver.setPrefix("templates");
viewResolver.setSuffix(".html");
viewResolver.setPebbleEngine(pebbleEngine());
viewResolver.setCharacterEncoding(CharEncoding.UTF_8);
diff --git a/juick-www/src/main/webapp/WEB-INF/layouts/content.html b/juick-www/src/main/resources/templates/layouts/content.html
index 4c283116..4c283116 100644
--- a/juick-www/src/main/webapp/WEB-INF/layouts/content.html
+++ b/juick-www/src/main/resources/templates/layouts/content.html
diff --git a/juick-www/src/main/webapp/WEB-INF/layouts/default.html b/juick-www/src/main/resources/templates/layouts/default.html
index 343885c4..343885c4 100644
--- a/juick-www/src/main/webapp/WEB-INF/layouts/default.html
+++ b/juick-www/src/main/resources/templates/layouts/default.html
diff --git a/juick-www/src/main/webapp/WEB-INF/layouts/minimal.html b/juick-www/src/main/resources/templates/layouts/minimal.html
index 15924521..15924521 100644
--- a/juick-www/src/main/webapp/WEB-INF/layouts/minimal.html
+++ b/juick-www/src/main/resources/templates/layouts/minimal.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/404.html b/juick-www/src/main/resources/templates/views/404.html
index 02a790e6..02a790e6 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/404.html
+++ b/juick-www/src/main/resources/templates/views/404.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/blog.html b/juick-www/src/main/resources/templates/views/blog.html
index 9cf4714e..9cf4714e 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/blog.html
+++ b/juick-www/src/main/resources/templates/views/blog.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/blog_tags.html b/juick-www/src/main/resources/templates/views/blog_tags.html
index 48e517eb..48e517eb 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/blog_tags.html
+++ b/juick-www/src/main/resources/templates/views/blog_tags.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/help.html b/juick-www/src/main/resources/templates/views/help.html
index 3a022497..3a022497 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/help.html
+++ b/juick-www/src/main/resources/templates/views/help.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/index.html b/juick-www/src/main/resources/templates/views/index.html
index 97d726de..97d726de 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/index.html
+++ b/juick-www/src/main/resources/templates/views/index.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/login.html b/juick-www/src/main/resources/templates/views/login.html
index a538cb26..a538cb26 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/login.html
+++ b/juick-www/src/main/resources/templates/views/login.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/macros/tags.html b/juick-www/src/main/resources/templates/views/macros/tags.html
index 09278ffe..09278ffe 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/macros/tags.html
+++ b/juick-www/src/main/resources/templates/views/macros/tags.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/macros/tree.html b/juick-www/src/main/resources/templates/views/macros/tree.html
index 71ffd74b..71ffd74b 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/macros/tree.html
+++ b/juick-www/src/main/resources/templates/views/macros/tree.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/footer.html b/juick-www/src/main/resources/templates/views/partial/footer.html
index 87744183..87744183 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/footer.html
+++ b/juick-www/src/main/resources/templates/views/partial/footer.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/homecolumn.html b/juick-www/src/main/resources/templates/views/partial/homecolumn.html
index 6142e9e9..6142e9e9 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/homecolumn.html
+++ b/juick-www/src/main/resources/templates/views/partial/homecolumn.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/message.html b/juick-www/src/main/resources/templates/views/partial/message.html
index 9e3ede6c..9e3ede6c 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/message.html
+++ b/juick-www/src/main/resources/templates/views/partial/message.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/navigation.html b/juick-www/src/main/resources/templates/views/partial/navigation.html
index 7afabcc3..7afabcc3 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/navigation.html
+++ b/juick-www/src/main/resources/templates/views/partial/navigation.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/settings_tabs.html b/juick-www/src/main/resources/templates/views/partial/settings_tabs.html
index 4715253e..4715253e 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/settings_tabs.html
+++ b/juick-www/src/main/resources/templates/views/partial/settings_tabs.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/tagcolumn.html b/juick-www/src/main/resources/templates/views/partial/tagcolumn.html
index 3e61d3d3..3e61d3d3 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/tagcolumn.html
+++ b/juick-www/src/main/resources/templates/views/partial/tagcolumn.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/tags.html b/juick-www/src/main/resources/templates/views/partial/tags.html
index 3235213e..3235213e 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/tags.html
+++ b/juick-www/src/main/resources/templates/views/partial/tags.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/thread_list.html b/juick-www/src/main/resources/templates/views/partial/thread_list.html
index f273dec7..f273dec7 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/thread_list.html
+++ b/juick-www/src/main/resources/templates/views/partial/thread_list.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/thread_tree.html b/juick-www/src/main/resources/templates/views/partial/thread_tree.html
index f207b8e0..f207b8e0 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/thread_tree.html
+++ b/juick-www/src/main/resources/templates/views/partial/thread_tree.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/usercolumn.html b/juick-www/src/main/resources/templates/views/partial/usercolumn.html
index 382c3622..382c3622 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/usercolumn.html
+++ b/juick-www/src/main/resources/templates/views/partial/usercolumn.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/usertags.html b/juick-www/src/main/resources/templates/views/partial/usertags.html
index 71d1303e..71d1303e 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/usertags.html
+++ b/juick-www/src/main/resources/templates/views/partial/usertags.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html b/juick-www/src/main/resources/templates/views/pm_inbox.html
index d6a9b65f..d6a9b65f 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html
+++ b/juick-www/src/main/resources/templates/views/pm_inbox.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/pm_sent.html b/juick-www/src/main/resources/templates/views/pm_sent.html
index bc42c4ab..bc42c4ab 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/pm_sent.html
+++ b/juick-www/src/main/resources/templates/views/pm_sent.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/post.html b/juick-www/src/main/resources/templates/views/post.html
index 1f642ce1..1f642ce1 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/post.html
+++ b/juick-www/src/main/resources/templates/views/post.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/post_success.html b/juick-www/src/main/resources/templates/views/post_success.html
index 2106f3cb..2106f3cb 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/post_success.html
+++ b/juick-www/src/main/resources/templates/views/post_success.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_about.html b/juick-www/src/main/resources/templates/views/settings_about.html
index bbf9e772..bbf9e772 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/settings_about.html
+++ b/juick-www/src/main/resources/templates/views/settings_about.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_auth-email.html b/juick-www/src/main/resources/templates/views/settings_auth-email.html
index e906d704..e906d704 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/settings_auth-email.html
+++ b/juick-www/src/main/resources/templates/views/settings_auth-email.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_main.html b/juick-www/src/main/resources/templates/views/settings_main.html
index ef46542d..ef46542d 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/settings_main.html
+++ b/juick-www/src/main/resources/templates/views/settings_main.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_password.html b/juick-www/src/main/resources/templates/views/settings_password.html
index aba0b139..aba0b139 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/settings_password.html
+++ b/juick-www/src/main/resources/templates/views/settings_password.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_privacy.html b/juick-www/src/main/resources/templates/views/settings_privacy.html
index 83b87b93..83b87b93 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/settings_privacy.html
+++ b/juick-www/src/main/resources/templates/views/settings_privacy.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_result.html b/juick-www/src/main/resources/templates/views/settings_result.html
index d87a5ea6..d87a5ea6 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/settings_result.html
+++ b/juick-www/src/main/resources/templates/views/settings_result.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/signup.html b/juick-www/src/main/resources/templates/views/signup.html
index 44fd366f..44fd366f 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/signup.html
+++ b/juick-www/src/main/resources/templates/views/signup.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/test.html b/juick-www/src/main/resources/templates/views/test.html
index 7700be6f..7700be6f 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/test.html
+++ b/juick-www/src/main/resources/templates/views/test.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/thread.html b/juick-www/src/main/resources/templates/views/thread.html
index 2115f442..2115f442 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/thread.html
+++ b/juick-www/src/main/resources/templates/views/thread.html
diff --git a/juick-www/src/main/webapp/WEB-INF/views/users.html b/juick-www/src/main/resources/templates/views/users.html
index 702ba6b9..702ba6b9 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/users.html
+++ b/juick-www/src/main/resources/templates/views/users.html