# add stuff to stylesheet to make sidebar boxes emulate entry subject and entry content
function Page::print_custom_head() {
var string font_stuff = "";
if ($*font_base != "" or $*font_fallback != "" or $*font_type != "") {
$font_stuff = $font_stuff + "font-family: ";
if ($*font_base != "") {
$font_stuff = $font_stuff + "\"$*font_base\"";
if ($*font_fallback != "" or $*font_type != "") {
$font_stuff = $font_stuff + ", ";
}
}
if ($*font_fallback != "") {
$font_stuff = $font_stuff + "\"$*font_fallback\"";
if ($*font_type != "") {
$font_stuff = $font_stuff + ", ";
}
}
if ($*font_type != "") {
$font_stuff = $font_stuff + "$*font_type";
}
$font_stuff = $font_stuff + ";\n";
}
"""
""";
}
function Page::print() {
var string title = $this->title();
var string links;
var bool firstlink = true;
foreach var string v ($.views_order) {
if ($firstlink == false) {
$links = "$links · ";
} else {
$firstlink = false;
}
$links = $links + ("
"+lang_viewname($v)+"");
}
if($links != "") {
$links = """
$links
""";
}
"""
""";
if ($*external_stylesheet) {
print """
""";
} else {
print """
""";
}
$this->print_head();
"""
$title
""";
$this->print_control_strip();
display_title($this);
"""
$links
""";
# var for holding left sidebar data
var string sidebar_left = "";
# var for holding right sidebar data
var string sidebar_right = "";
# var for opening a sidebar box and header section
var string sidebar_box_header_one = """
""";
# var for closing header section
var string sidebar_box_header_two = """
""";
# temp var for sidebar box headers
var string header = "";
# var for opening content section
var string sidebar_box_content_one = """
""";
# var for closing content section and sidebar box
var string sidebar_box_content_two = """
""";
# temp var for sidebar box content
var string content = "";
# set header for sidebar box
$header = "userpic";
# set content for sidebar box
$content = $.journal.default_pic->as_string();
# add box to left sidebar
$sidebar_left = $sidebar_left + "$sidebar_box_header_one$header$sidebar_box_header_two$sidebar_box_content_one$content$sidebar_box_content_two";
# add box to left sidebar
$sidebar_left = $sidebar_left + "$sidebar_box_header_one$header$sidebar_box_header_two$sidebar_box_content_one$content$sidebar_box_content_two";
# add box to right sidebar
$sidebar_right = $sidebar_right + "$sidebar_box_header_one$header$sidebar_box_header_two$sidebar_box_content_one$content$sidebar_box_content_two";
# set header for sidebar box
$header = "profile";
# set content for sidebar box
$content = "user: $.journal
name: $.journal.name";
# add box to left sidebar
$sidebar_left = $sidebar_left + "$sidebar_box_header_one$header$sidebar_box_header_two$sidebar_box_content_one$content$sidebar_box_content_two";
# add box to right sidebar
$sidebar_right = $sidebar_right + "$sidebar_box_header_one$header$sidebar_box_header_two$sidebar_box_content_one$content$sidebar_box_content_two";
# add box to right sidebar
$sidebar_right = $sidebar_right + "$sidebar_box_header_one$header$sidebar_box_header_two$sidebar_box_content_one$content$sidebar_box_content_two";
# var for keeping track if we're dealing with sidebars
var bool show_sidebars = $sidebar_left != "" or $sidebar_right != "";
# open big table
if($show_sidebars) {
"""
""";
}
# if data for left sidebar, make a cell for it and print it
if($sidebar_left != "") {
"""
$sidebar_left""";
}
# make a cell for page body
if($show_sidebars) {
"""
""";
}
$this->print_body();
# close cell for page body
if($show_sidebars) {
"""
""";
}
# if data for right sidebar, make a cell for it and print it
if($sidebar_right != "") {
"""
$sidebar_right""";
}
# close big table
if($show_sidebars) {
"""
""";
}
"""
""";
}