[theme] - [generator] - [move navigation strip to bottom]

Apr 07, 2006 12:45

in response to panda_cookie's s2styles post.
BIG ANNOYING WARNING: DO NOT ATTEMPT THIS UNLESS YOU HAVE AMPLE PAID TIME LEFT OR A PERMANENT ACCOUNT. THE NAVIGATION STRIP MAY CHANGE IN THE FUTURE AND THIS CODE MAY BECOME OBSOLETE VERY FAST. PLZ 2 HEED THIS WARNING KTHX.

function Page::print_custom_head() {
var int nav_strip_border_width = 2; # navigation strip border width (2 for generator)
var string nav_strip_font_family = "Verdana"; # navigation strip font family ("$*font_base, $*font_fallback" for generator)
var Color nav_strip_link_fgcolor = "#0000ff"; # navigation strip link color ($*page_link for generator)
var Color nav_strip_main_bgcolor = "#ffffff"; # navigation strip main background color ($*entry_back for generator)
var Color nav_strip_main_fgcolor = "#000000"; # navigation strip main foreground color ($*entry_text for generator)
"""

""";
}

function Page::print() {
var string title = $this->title();

var string website_name = $.journal.website_name ? $.journal.website_name : $*text_website_default_name;
var string website;
if ($.journal.website_url != "") {
$website = """[
$*text_website
|
$website_name
]""";
}

var string links = "";
var bool firstlink = true;
foreach var string v ($.views_order) {
var string url = $.view_url{$v};
var string text = lang_viewname($v);
if ($firstlink == false) {
$links = "$links|";
} else {
$firstlink = false;
}
if($.view == $v) {
$links = $links + """$text""";
} else {
$links = $links + """ $text""";
}
}

"""\n\n\n""";

$this->print_head();

if ($*external_stylesheet) {
println safe """""";
} else {
println """";
}

"""$title

""";

# remove navigation strip from top
# $this->print_control_strip();

if (viewer_sees_ads()) {
"""

""";
}

"""

$title
[$links]

""";
$this->lay_top_userpic();

var string sitename_lc = $*SITENAMESHORT->lower();

"""

$.journal.name

$website

[
"""+lang_viewname("userinfo")+"""
|
$sitename_lc userinfo
]

[
"""+lang_viewname("archive")+"""
|
journal archive
]

""";

if (size $.linklist > 0 and $*linklist_support) {
$this->print_linklist();
}

"""

""";

$this->print_body();

"""
""";

if (viewer_sees_ads()) {
"""

""";
$this->print_ad("Journal-Skyscraper");
"""

""";
}
"""

""";

# put navigation strip at bottom
$this->print_control_strip();

"""

""";
}

function print, entry navigation strip, class page, function print_custom_head, layout generator

Previous post Next post
Up