view src/global/HtmlGlobalUtils.jtp @ 28:03e68185c2f5

block spam forums
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 02 Jul 2020 21:19:24 -0600
parents e424dc827823
children
line wrap: on
line source

<%
package global;

import global.web.Terms;
import nabble.view.lib.HtmlViewUtils;
import nabble.model.Init;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Calendar;


public class HtmlGlobalUtils {

	public static final String nabbleHost = (String)Init.get("nabbleHost");
	public static final String nabbleContextUrl = "http://" + nabbleHost;

	private static final int cssVersion = 14;

	public static final String nabbleSupportUrl = "http://support.nabble.com/";

	public static void head(HttpServletRequest request, HttpServletResponse response, String title)
		throws IOException
	{
		PrintWriter out = response.getWriter();
		%>
		<meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1">
		<title>Nabble &bull; <%=title%></title>
		<link href='https://fonts.googleapis.com/css?family=Lato|Oswald' rel='stylesheet' type='text/css'>
		<link rel="stylesheet" href="/assets/font-awesome/css/font-awesome.min.css?<%=cssVersion%>">
		<link rel="stylesheet" href="/assets/global.css?<%=cssVersion%>">
		<%
		HtmlViewUtils.googleAnalytics(out);
	}

	public static void header(HttpServletRequest request,HttpServletResponse response)
		throws IOException
	{
		PrintWriter out = response.getWriter();
		%>
		<div header center>
			<a href="/"><img src="/assets/images/logo_nabble_home.png" width="236" height="50" alt="Nabble"/></a>
		</div>
		<%
	}

	public static void footer(HttpServletRequest request,HttpServletResponse response)
		throws IOException
	{
		PrintWriter out = response.getWriter();
		%>
		<div dark full marginTop center footer>
			<div content>
				<a href="<%=HtmlGlobalUtils.nabbleContextUrl%>/help/Index.jtp" title="Nabble help articles">Help</a>
				<a href="/PoweredBy.jtp" rel="nofollow">Powered by</a>
				<a href="<%=Terms.path(false)%>" rel="nofollow">Terms of Use</a>
				<a href="/PrivacyPolicy.jtp" rel="nofollow">Privacy Policy</a>
				<a href="/ContactUs.jtp">Contact Us</a>
				<div>&copy; 2005-<%=Calendar.getInstance().get(Calendar.YEAR)%> Nabble, LLC.</div>
			</div>
		</div>
		<%
	}

	private HtmlGlobalUtils() {}  // never
}

%>