0
|
1 <%
|
|
2 package global;
|
|
3
|
|
4 import global.web.Terms;
|
|
5 import nabble.view.lib.HtmlViewUtils;
|
|
6 import nabble.model.Init;
|
|
7
|
|
8 import javax.servlet.http.HttpServletRequest;
|
|
9 import javax.servlet.http.HttpServletResponse;
|
|
10 import java.io.IOException;
|
|
11 import java.io.PrintWriter;
|
|
12 import java.util.Calendar;
|
|
13
|
|
14
|
|
15 public class HtmlGlobalUtils {
|
|
16
|
|
17 public static final String nabbleHost = (String)Init.get("nabbleHost");
|
|
18 public static final String nabbleContextUrl = "http://" + nabbleHost;
|
|
19
|
23
|
20 private static final int cssVersion = 14;
|
0
|
21
|
|
22 public static final String nabbleSupportUrl = "http://support.nabble.com/";
|
|
23
|
|
24 public static void head(HttpServletRequest request, HttpServletResponse response, String title)
|
|
25 throws IOException
|
|
26 {
|
|
27 PrintWriter out = response.getWriter();
|
|
28 %>
|
|
29 <meta charset="utf-8">
|
|
30 <meta name="viewport" content="width=device-width,initial-scale=1">
|
|
31 <title>Nabble • <%=title%></title>
|
|
32 <link href='https://fonts.googleapis.com/css?family=Lato|Oswald' rel='stylesheet' type='text/css'>
|
|
33 <link rel="stylesheet" href="/assets/font-awesome/css/font-awesome.min.css?<%=cssVersion%>">
|
|
34 <link rel="stylesheet" href="/assets/global.css?<%=cssVersion%>">
|
|
35 <%
|
|
36 HtmlViewUtils.googleAnalytics(out);
|
|
37 }
|
|
38
|
|
39 public static void header(HttpServletRequest request,HttpServletResponse response)
|
|
40 throws IOException
|
|
41 {
|
|
42 PrintWriter out = response.getWriter();
|
|
43 %>
|
|
44 <div header center>
|
|
45 <a href="/"><img src="/assets/images/logo_nabble_home.png" width="236" height="50" alt="Nabble"/></a>
|
|
46 </div>
|
|
47 <%
|
|
48 }
|
|
49
|
|
50 public static void footer(HttpServletRequest request,HttpServletResponse response)
|
|
51 throws IOException
|
|
52 {
|
|
53 PrintWriter out = response.getWriter();
|
|
54 %>
|
|
55 <div dark full marginTop center footer>
|
|
56 <div content>
|
|
57 <a href="<%=HtmlGlobalUtils.nabbleContextUrl%>/help/Index.jtp" title="Nabble help articles">Help</a>
|
|
58 <a href="/PoweredBy.jtp" rel="nofollow">Powered by</a>
|
|
59 <a href="<%=Terms.path(false)%>" rel="nofollow">Terms of Use</a>
|
|
60 <a href="/PrivacyPolicy.jtp" rel="nofollow">Privacy Policy</a>
|
|
61 <a href="/ContactUs.jtp">Contact Us</a>
|
|
62 <div>© 2005-<%=Calendar.getInstance().get(Calendar.YEAR)%> Nabble, LLC.</div>
|
|
63 </div>
|
|
64 </div>
|
|
65 <%
|
|
66 }
|
|
67
|
|
68 private HtmlGlobalUtils() {} // never
|
|
69 }
|
|
70
|
|
71 %>
|