[theme] - [smoothsailing] - [add header image based on view]

Oct 18, 2005 06:24

in response to jaxie926's s2smoothsailing post.

function Page::lay_print_header() {
var string title = $.global_title;
var string subtitle = $.global_subtitle;

var string{} k1Hheader_url = {"" => ""}; # optional header url
var string{} k1Hheader_alt = {"" => ""}; # optional header alt
var int{} k1Hheader_width = {"" => 0}; # optional header width
var int{} k1Hheader_height = {"" => 0}; # optional header height

# recent view
$k1Hheader_url{"recent"} = "http://stat.livejournal.com/img/goat-normal.gif";
$k1Hheader_alt{"recent"} = "Frank";
$k1Hheader_width{"recent"} = 100;
$k1Hheader_height{"recent"} = 100;

# friends view
$k1Hheader_url{"friends"} = "http://stat.livejournal.com/img/goat-hover.gif";
$k1Hheader_alt{"friends"} = "Frank";
$k1Hheader_width{"friends"} = 100;
$k1Hheader_height{"friends"} = 100;

# other views:
# archive (YearPage)
# month (MonthPage)
# day (DayPage)
# entry (EntryPage)
# reply (ReplyPage)
# tags (TagsPage)

if($k1Hheader_url{$.view} != "") {
# if we've got dimensions set up above, let's put 'em together
var string k1Hheader_dims = "";
if($k1Hheader_width{$.view}) {
$k1Hheader_dims = $k1Hheader_dims + " width=\"$k1Hheader_width{$.view}\"";
}
if($k1Hheader_height{$.view}) {
$k1Hheader_dims = $k1Hheader_dims + " height=\"$k1Hheader_height{$.view}\"";
}
# print header image

"""



""";
}

"""

""";
if ($*layout_header_usericon=="show") {"""
$this.journal.default_pic"""; }
"""
$title""";
if ($.global_subtitle!="") { """
$subtitle"""; }
$this->lay_print_header_links();
"""

""";
}

class page, layout smoothsailing, function lay_print_header

Previous post Next post
Up