com.peterphi.std.guice.web.rest.pagewriter.TwitterBootstrapPageWriter Maven / Gradle / Ivy
package com.peterphi.std.guice.web.rest.pagewriter;
import com.peterphi.std.guice.web.rest.util.BootstrapStaticResources;
import org.apache.commons.lang.StringEscapeUtils;
public class TwitterBootstrapPageWriter
{
public void writeHTML(StringBuilder sb)
{
writePrologue(sb);
{
writeBodyContent(sb);
}
writeEpilogue(sb);
}
protected void writePrologue(StringBuilder sb)
{
sb.append("\n");
sb.append("\n");
sb.append("\n");
sb.append("").append(escape(getTitle())).append(" \n");
sb.append("\n");
sb.append("\n");
writeBootstrapCSS(sb);
writeCustomHeadContent(sb);
sb.append("\n\n");
sb.append("\n");
}
protected void writeEpilogue(StringBuilder sb)
{
sb.append("\n");
sb.append("\n");
}
protected void writeBodyContent(StringBuilder sb)
{
}
protected String escape(String text)
{
return StringEscapeUtils.escapeHtml(text);
}
protected String getTitle()
{
return "";
}
protected void writeCustomHeadContent(StringBuilder sb)
{
}
protected void writeBootstrapCSS(StringBuilder sb)
{
sb.append("\n\n");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy