Mercurial Hosting > nabble
comparison src/nabble/view/web/more/Forum.java @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children | 72765b66e2c3 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
1 | |
2 package nabble.view.web.more; | |
3 | |
4 import fschmidt.util.servlet.JtpContext; | |
5 import nabble.view.lib.UrlMappable; | |
6 import nabble.view.lib.Jtp; | |
7 import nabble.view.lib.Shared; | |
8 import nabble.view.lib.help.Help; | |
9 | |
10 import javax.servlet.ServletException; | |
11 import javax.servlet.http.HttpServlet; | |
12 import javax.servlet.http.HttpServletRequest; | |
13 import javax.servlet.http.HttpServletResponse; | |
14 import javax.servlet.http.HttpSession; | |
15 import java.io.IOException; | |
16 import java.io.PrintWriter; | |
17 import java.util.Collections; | |
18 import java.util.Map; | |
19 import java.util.regex.Pattern; | |
20 | |
21 | |
22 public final class Forum extends HttpServlet implements UrlMappable { | |
23 | |
24 private static final Pattern urlPtn = Pattern.compile("/why-nabble\\.html$"); | |
25 | |
26 public static String path() { | |
27 return "/why-nabble.html"; | |
28 } | |
29 | |
30 public Map<String,String[]> getParameterMapFromUrl(HttpServletRequest request,String mappedUrl) { | |
31 return Collections.emptyMap(); | |
32 } | |
33 | |
34 public Pattern getUrlPattern() { | |
35 return urlPtn; | |
36 } | |
37 | |
38 protected void service(HttpServletRequest request,HttpServletResponse response) | |
39 throws ServletException, IOException | |
40 { | |
41 PrintWriter out = response.getWriter(); | |
42 String context = request.getContextPath(); | |
43 JtpContext jtpContext = (JtpContext)getServletContext().getAttribute(JtpContext.attrName); | |
44 | |
45 out.print( "\r\n<html>\r\n<head>\r\n" ); | |
46 | |
47 Shared.title(request,response,"Start a forum with us"); | |
48 | |
49 out.print( "\r\n</head>\r\n<body>\r\n" ); | |
50 | |
51 Shared.minHeader(request,response); | |
52 | |
53 out.print( "\r\n\r\n<h1>Why Start Your Forum at Nabble?</h1>\r\n\r\n<style>\r\n table.category {\r\n margin-bottom: .5em;\r\n width: 48em;\r\n }\r\n td.number { width: 3em; }\r\n span.number {\r\n font-size: 200%;\r\n padding: 0 .3em .03em;\r\n border-width:1px;\r\n border-style:solid; \r\n }\r\n span.title {\r\n display:block;\r\n font-size: 150%;\r\n width: 100%;\r\n margin-bottom: .5em;\r\n border-bottom-width:1px;\r\n border-bottom-style:solid;\r\n }\r\n a.forum-link {\r\n font-size: 130%;\r\n }\r\n a.more {\r\n font-size:80%;\r\n }\r\n</style>\r\n\r\n<table class=\"category\">\r\n <tr valign=\"top\">\r\n <td class=\"number\">\r\n <span class=\"number shaded-bg-color medium-border-color\">1</span>\r\n </td>\r\n <td>\r\n <span class=\"title medium-border-color\">Free</span>\r\n No fees whatsoever.<br>\r\n No forced banner ads.<br>\r\n No limit on how big or how busy your forum is.<br>\r\n Free upload of pictures and files.<br>\r\n Free XML feed.<br>\r\n Free full export if you want to leave.<br>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table class=\"category\">\r\n <tr valign=\"top\">\r\n <td class=\"number\">\r\n <span class=\"number shaded-bg-color medium-border-color\">2</span>\r\n </td>\r\n <td>\r\n <span class=\"title medium-border-color\">Simple</span>\r\n Nothing to install, instant setup.<br>\r\n Clean minimalist UI.<br>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table class=\"category\">\r\n <tr valign=\"top\">\r\n <td class=\"number\">\r\n <span class=\"number shaded-bg-color medium-border-color\">3</span>\r\n </td>\r\n <td>\r\n <span class=\"title medium-border-color\">Embeddable</span>\r\n Embed your forum in any website, just like Youtube videos.<br>\r\n Change the appearance of your forum to match the look-and-feel of your pages.<br>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table class=\"category\">\r\n <tr valign=\"top\">\r\n <td class=\"number\">\r\n <span class=\"number shaded-bg-color medium-border-color\">4</span>\r\n </td>\r\n <td>\r\n <span class=\"title medium-border-color\">Fast</span>\r\n Powerful search (<a class=\"more\" href=\"" ); | |
54 out.print( (Help.search.url(request)) ); | |
55 out.print( "\">more</a>).<br>\r\n Fast loading of pages.<br>\r\n Fast support.<br>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table class=\"category\">\r\n <tr valign=\"top\">\r\n <td class=\"number\">\r\n <span class=\"number shaded-bg-color medium-border-color\">5</span>\r\n </td>\r\n <td>\r\n <span class=\"title medium-border-color\">Advanced</span>\r\n SEO (<a class=\"more\" href=\"" ); | |
56 out.print( (Help.seo.url(request)) ); | |
57 out.print( "\">more</a>).<br>\r\n Mirror your group (<a class=\"more\" href=\"" ); | |
58 out.print( (Help.mirror.url(request)) ); | |
59 out.print( "\">more</a>).\r\n </td>\r\n </tr>\r\n</table>\r\n<br/>\r\n<a class=\"forum-link\" href=\"" ); | |
60 out.print( (ForumStart.path("forum")) ); | |
61 out.print( "\">Start a free forum now</a> »\r\n\r\n" ); | |
62 | |
63 Shared.footer(request,response); | |
64 | |
65 out.print( "\r\n" ); | |
66 Shared.analytics(request,response); | |
67 out.print( "\r\n</body>\r\n</html>\r\n" ); | |
68 | |
69 } | |
70 } | |
71 |