Mercurial Hosting > nabble
view src/global/HtmlGlobalUtils.java @ 24:e0c501fb5229
remove trk
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 14 Jun 2020 17:56:59 -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(); out.print( "\r\n<meta charset=\"utf-8\">\r\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\r\n<title>Nabble • " ); out.print( (title) ); out.print( "</title>\r\n<link href='https://fonts.googleapis.com/css?family=Lato|Oswald' rel='stylesheet' type='text/css'>\r\n<link rel=\"stylesheet\" href=\"/assets/font-awesome/css/font-awesome.min.css?" ); out.print( (cssVersion) ); out.print( "\">\r\n<link rel=\"stylesheet\" href=\"/assets/global.css?" ); out.print( (cssVersion) ); out.print( "\">\r\n" ); HtmlViewUtils.googleAnalytics(out); } public static void header(HttpServletRequest request,HttpServletResponse response) throws IOException { PrintWriter out = response.getWriter(); out.print( "\r\n<div header center>\r\n <a href=\"/\"><img src=\"/assets/images/logo_nabble_home.png\" width=\"236\" height=\"50\" alt=\"Nabble\"/></a>\r\n</div>\r\n" ); } public static void footer(HttpServletRequest request,HttpServletResponse response) throws IOException { PrintWriter out = response.getWriter(); out.print( "\r\n<div dark full marginTop center footer>\r\n <div content>\r\n <a href=\"" ); out.print( (HtmlGlobalUtils.nabbleContextUrl) ); out.print( "/help/Index.jtp\" title=\"Nabble help articles\">Help</a>\r\n <a href=\"/PoweredBy.jtp\" rel=\"nofollow\">Powered by</a>\r\n <a href=\"" ); out.print( (Terms.path(false)) ); out.print( "\" rel=\"nofollow\">Terms of Use</a>\r\n <a href=\"/PrivacyPolicy.jtp\" rel=\"nofollow\">Privacy Policy</a>\r\n <a href=\"/ContactUs.jtp\">Contact Us</a>\r\n <div>© 2005-" ); out.print( (Calendar.getInstance().get(Calendar.YEAR)) ); out.print( " Nabble, LLC.</div>\r\n </div>\r\n</div>\r\n" ); } private HtmlGlobalUtils() {} // never }