3 * html.c: HTML header/footer templating for web interface.
4 * copyright (c) 2006 Ben Stewart.
5 * copyright (c) 2010 Malte S. Stretz.
7 * You may use, modify and redistribute this file under the terms of the
8 * GNU General Public License version 2. (see COPYING.GPL)
14 #include "http.h" /* for http_base_url */
17 void html_open(struct str
*buf
, const char *title
,
18 const int want_graph_js
)
24 "<title>%s (darkstat3 %s)</title>\n"
25 "<meta name=\"generator\" content=\"" PACKAGE_STRING
"\">\n"
26 "<meta name=\"robots\" content=\"noindex, noarchive\">\n"
27 "<link rel=\"stylesheet\" href=\"%sstyle.css\" type=\"text/css\">\n"
28 , title
, opt_interface
, http_base_url
);
32 "<script src=\"%sgraph.js\" type=\"text/javascript\"></script>\n"
38 "<div class=\"menu\">\n"
39 "<ul class=\"menu\">" /* no whitespace (newlines) in list */
40 "<li class=\"label\">" PACKAGE_STRING
"</li>"
41 "<li><a href=\"%s\">graphs</a></li>"
42 "<li><a href=\"%shosts/\">hosts</a></li>"
43 "<li><a href=\"" PACKAGE_URL
"\">homepage</a></li>"
46 "<div class=\"content\">\n"
47 "<h2 class=\"pageheader\">%s</h2>\n"
48 , http_base_url
, http_base_url
, title
);
51 void html_close(struct str
*buf
)
59 /* vim:set ts=4 sw=4 tw=78 expandtab: */