# -*-s2-*- layerinfo type = "layout"; layerinfo name = "Tabular Indent"; layerinfo redist_uniq = "tabularindent/layout"; layerinfo previews = "tabularindent/tabularindent.jpg"; layerinfo des = "Two information and navigation boxes at the top and bottom of the page surround entries indented slightly from the left."; propgroup colors { property Color body_bgcolor { des = "Body background color"; s1color = "page_back"; } property Color main_bgcolor { des = "Background of main text areas"; s1color = "page_back"; } property Color main_fgcolor { des = "Main text color"; s1color = "page_text"; } property Color border_color { des = "Color of borders"; # No s1color equivalent } property Color headerbar_bgcolor { des = "Background color of header bar(s)"; s1color = "stronger_back"; } property Color headerbar_fgcolor { des = "Header bar text color"; s1color = "stronger_text"; } property Color captionbar_mainbox_bgcolor { des = "Main background color of caption bar"; s1color = "page_back"; } property Color captionbar_mainbox_fgcolor { des = "Text color of caption bar"; s1color = "page_text"; } property Color captionbar_userpicbox_color { des = "User picture background color of caption bar"; s1color = "strong_back"; } property Color accent_bgcolor { des = "Background color of accented areas"; s1color = "weak_back"; } property Color accent_fgcolor { des = "Accented area text color"; s1color = "weak_text"; } property Color link_color { des = "Link color"; s1color = "page_link"; } property Color vlink_color { des = "Visited link color"; s1color = "page_vlink"; } property Color alink_color { des = "Active link color"; s1color = "page_alink"; } property Color comment_bar_one_bgcolor { des = "Alternating background color for comment bars (one)"; } property Color comment_bar_two_fgcolor { des = "Text color on alternating comment bars (one)"; } property Color comment_bar_two_bgcolor { des = "Alternating background color for comment bars (two)"; } property Color comment_bar_one_fgcolor { des = "Text color on alternating comment bars (two)"; } property Color comment_bar_screened_bgcolor { des = "Background bar color for screened comments"; } property Color comment_bar_screened_fgcolor { des = "Text color on background bar for screened comments"; } } set body_bgcolor = "#ffffff"; set main_bgcolor = "#ffffff"; set main_fgcolor = "#000000"; set border_color = "#000000"; set headerbar_bgcolor = "#6666cc"; set headerbar_fgcolor = "#ffffff"; set captionbar_mainbox_bgcolor = "#ffffff"; set captionbar_mainbox_fgcolor = "#000000"; set captionbar_userpicbox_color = "#c0c0ff"; set accent_bgcolor = "#eeeeff"; set accent_fgcolor = "#000000"; set link_color = "#000050"; set vlink_color = "#500050"; set alink_color = "#ff00c0"; set comment_bar_one_bgcolor = "#c0c0ff"; set comment_bar_one_fgcolor = "#000000"; set comment_bar_two_bgcolor = "#eeeeff"; set comment_bar_two_fgcolor = "#000000"; set comment_bar_screened_bgcolor = "#dddddd"; set comment_bar_screened_fgcolor = "#000000"; propgroup presentation { property bool show_entry_userpic { des = "Show the userpic on the journal entries?"; } property use page_recent_items; property use page_friends_items; property use use_shared_pic; property use view_entry_disabled; property string page_background_image { des = "URL to an image to be used for the page background"; } property use external_stylesheet; } set show_entry_userpic = true; set page_recent_items = 20; set page_friends_items = 20; set view_entry_disabled = false; set page_background_image = ""; propgroup text { property use text_post_comment; property use text_read_comments; property use text_post_comment_friends; property use text_read_comments_friends; } set tags_aware = true; function Page::lay_captionbar_navigation () { } function captionbar (Page p) { var string title = $p->title(); var string userpic; var Image up_img = $p.journal.default_pic; if (defined $up_img) { $userpic = """[icon]"""; } var string website_name = $p.journal.website_name ? $p.journal.website_name : $*text_website_default_name; var string website; if ($p.journal.website_url != "") { $website = """View:Website ($website_name)."""; } var string links; foreach var string v ($p.views_order) { $links = "$linksView:" + ($p.view == $v ? lang_viewname($v) : ""+lang_viewname($v)+"") + ".\n"; } var string captionbar_userpicbox_style = "background-color: $*captionbar_userpicbox_color"; """
$userpic $title
$links $website
"""; $p->lay_captionbar_navigation(); "
"; } function print_stylesheet () { var string backgroundurl = clean_url($*page_background_image) != "" ? "background-image: url($*page_background_image);" : ""; """/* Tabular Indent Stylesheet */ body { $backgroundurl background-color: $*body_bgcolor; } .captionbar { width: 100%; border: 1px solid $*border_color; } .captionbar, .captionbar td { background-color: $*captionbar_mainbox_bgcolor; color: $*captionbar_mainbox_fgcolor; } .captionbar-userpicbox { border-right: 1px solid $*border_color; background-color: $*captionbar_userpicbox_color; color: $*captionbar_mainbox_fgcolor; } body,td,p { font-family: verdana, arial, helvetica, sans-serif; font-size: 8pt; } a { color: $*link_color; font-family: verdana, arial, helvetica, sans-serif; font-size: 8pt; text-decoration: none; } a:visited { color: $*vlink_color; font-family: verdana, arial, helvetica, sans-serif; font-size: 8pt; text-decoration: none; } a:active { color: $*alink_color; font-family: verdana, arial, helvetica, sans-serif; font-size: 8pt; text-decoration: none; } a:hover { color: $*alink_color; font-family: verdana, arial, helvetica, sans-serif; font-size: 8pt; text-decoration: underline; } h3.page-header { font-size: 8pt; font-family: verdana, arial, helvetica, sans-serif; font-weight: normal; background-color: $*headerbar_bgcolor; color: $*headerbar_fgcolor; padding: 6px; border: 1px solid $*border_color; } """; } function Page::print () { var string title = $this->title(); println "\n\n"; if ($*external_stylesheet) { println """"""; } else { println """"; } $this->print_head(); """$title """; "

"; captionbar($this); "

"; "

"; $this->print_body(); "

"; "

"; captionbar($this); "

"; """ """; } function print_box (string{} colors, string metapic, string{} meta, string content, string footer, string domid) { var string bgcolor = $colors{"bgcolor"}; var string fgcolor = $colors{"fgcolor"}; if ($domid != "") { $domid = "id='$domid'"; } var string style = "background-color: $bgcolor; color: $fgcolor"; "
"; ""; ""; if ($footer) { ""; } "
"; if ($metapic) { ""; } "
$metapic"; foreach var string k ($meta) { var string key = $k; var string val = $meta{$k}; ""; } "
$key$val
"; print $content; "
$footer

"; } function print_header (string header) { print ""; } function print_genericbox_open () { "
"; "
"; } function print_genericbox_close () { "

"; } function print_entry (Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text) { var string{} colors; var string{} meta; var string content = ""; var string footer = ""; $colors{"bgcolor"} = "$*accent_bgcolor"; $colors{"fgcolor"} = "$*accent_fgcolor"; if ($p.view == "recent") { if ($e.new_day) { print_header($e.time->date_format("%%month%% %%dayord%%, %%yyyy%%")); } } else { print_header($e.time->date_format("%%month%% %%dayord%%, %%yyyy%%")); } # Userpic var string metapic = ""; if ($p.view == "friends" or $*show_entry_userpic == true or $e.journal.username != $e.poster.username) { var string userpic = defined $e.userpic ? "" : ""; var string url = $e.journal->base_url() + "/"; $metapic = "
"; $metapic = "$metapic $userpic"; if ($e.journal.username != $e.poster.username) { var string purl = $e.poster->base_url() + "/"; $metapic = "$metapic
[$e.poster.username]"; } if ($p.view == "friends") { $metapic = "$metapic
$e.journal.username"; } $metapic = "$metapic
"; } # Security Icon if ($e.security) { $meta{"Security:"} = "$e.security_icon $e.security"; } # Subject if ($e.subject) { $meta{"Subject:"} = $e.subject; } # Time posted var string time = $e.time->time_format(); $meta{"Time:"} = $time; # Current if (size $e.metadata) { foreach var string k ($e.metadata) { var string key = $k; var string val = $e.metadata{$k}; if ($k == "mood") { $key = $*text_meta_mood; } elseif ($k == "music") { $key = $*text_meta_music; } if ($k == "mood" and defined $e.mood_icon) { var Image i = $e.mood_icon; $val = "[mood icon] $val"; } $meta{"$key:"} = $val; } } # Tags if ($e.tags) { var int tcount = 0; var string tag; foreach var Tag t ($e.tags) { $tag = $tag + """"""; $tcount++; if ($tcount != size $e.tags) { $tag = $tag + ", "; } } $meta{"Tags:"} = $tag; } if (not $hide_text) { $content = $e.text; } if ($e.comments.enabled) { $footer = "comments:"; if (($e.comments.count > 0 or $e.comments.screened) and ($p.view != "entry")) { $footer = "$footer " + get_plural_phrase($e.comments.count, $p.view == "friends" ? "text_read_comments_friends" : "text_read_comments") + " or"; } $footer = "$footer " + ($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment) + ""; } # Misc Links var Link link; if ($p.view == "entry") { $link = $e->get_link("nav_prev"); $footer = "$footer $link"; } $link = $e->get_link("edit_entry"); $footer = "$footer $link"; $link = $e->get_link("edit_tags"); $footer = "$footer $link"; $link = $e->get_link("tell_friend"); $footer = "$footer $link"; $link = $e->get_link("mem_add"); $footer = "$footer $link"; if ($p.view == "entry") { $link = $e->get_link("nav_next"); $footer = "$footer $link"; } # Print print_box($colors, $metapic, $meta, $content, $footer, ""); } function Page::print_entry (Entry e) { print_entry($this, $e, null Color, null Color, false); } function FriendsPage::print_entry (Entry e) { var Friend f = $.friends{$e.journal.username}; print_entry($this, $e, $f.bgcolor, $f.fgcolor, false); } function RecentPage::lay_captionbar_navigation() { var string nav = ""; if ($.nav.backward_url != "") { $nav = """back $.nav.backward_count entries"""; } if ($.nav.forward_url != "" and $.nav.backward_url != "") { $nav = "$nav or "; } if ($.nav.forward_url != "") { $nav = """$navforward $.nav.forward_count entries"""; } print "You're looking at the latest "; print size $.entries; print ($.nav.skip > 0) ? " entries, after skipping $.nav.skip newer ones." :" entries."; if ($nav != "") { print "
Missed some entries? Then simply jump $nav"; } } function RecentPage::print_body { foreach var Entry e ($.entries) { $this->print_entry($e); } } function FriendsPage::print_body { foreach var Entry e ($.entries) { $this->print_entry($e); } } function CommentInfo::print() { if (not $.enabled) { return; } ""; "comments: "; if ($.count > 0 or $.screened) { $this->print_readlink(); " or "; } $this->print_postlink(); ""; } function YearPage::print_body { print_header(string($.year)); print_genericbox_open(); foreach var YearMonth m ($.months) { $this->print_month($m); } print_genericbox_close(); } function YearPage::lay_captionbar_navigation() { $this->print_year_links(); } function YearPage::print_year_links () { foreach var YearYear y ($.years) { if ($y.displayed) { "$y.year "; } else { "$y.year "; } } } function YearPage::print_month(YearMonth m) { if (not $m.has_entries) { return; } "
"; # Month header ""; # Weekdays ""; foreach var int d (weekdays()) { "\n"; } ""; foreach var YearWeek w ($m.weeks) { $w->print(); } "
"; ""; print $m->month_format(); "
"+$*lang_dayname_short[$d]+"
View Subjects"; "
"; } function YearWeek::print () { ""; if ($.pre_empty) { " "; } foreach var YearDay d ($.days) { "$d.day"; "
"; if ($d.num_entries) { """$d.num_entries"""; } else { " "; } "
"; } if ($.post_empty) { " "; } ""; } function DayPage::lay_captionbar_navigation() { print "Missed some entries? Then simply jump to the previous day or the next day."; } function DayPage::print_body () { if (not $.has_entries) { ""; "
"; print $.date->date_format("%%month%% %%dayord%%, %%yyyy%%"); "

"; print "No journal entries for this day."; } else { foreach var Entry e ($.entries) { $this->print_entry($e); } } } function MonthPage::print_body { print_header($.date->date_format("%%month%% %%yyyy%%")); print_genericbox_open(); "
"; $.redir->print_hiddens(); if ($.prev_url != "") { "[<<<]\n"; } if (size $.months > 1) { "\n"; } if ($.next_url != "") { "\n[>>>]\n"; } "
\n
"; foreach var MonthDay d ($.days) { if ($d.has_entries) { "
"; print lang_ordinal($d.day); "
\n
"; $d->print_subjectlist(); "
\n"; } } "
\n"; print_genericbox_close(); } function EntryPage::print_body () { set_handler("unscreen_comment_#", [ [ "style_bgcolor", "cmtbar#", "$*comment_bar_one_bgcolor", ], [ "style_color", "cmtbar#", "$*comment_bar_one_fgcolor", ], ]); set_handler("screen_comment_#", [ [ "style_bgcolor", "cmtbar#", "$*comment_bar_screened_bgcolor", ], [ "style_color", "cmtbar#", "$*comment_bar_screened_fgcolor", ], ]); print_entry($this, $.entry, null Color, null Color, $.viewing_thread); if ($.entry.comments.enabled and $.comment_pages.total_subitems > 0) { $this->print_multiform_start(); print_header("Comments:"); if ($.comment_pages.total_subitems > 0) { $.comment_pages->print(); $this->print_comments($.comments); } if ($this.multiform_on) { print_header("Mass Action:"); print_genericbox_open(); $this->print_multiform_actionline(); print_genericbox_close(); $this->print_multiform_end(); } } } function EntryPage::print_comment_partial (Comment c) { var string poster = defined $c.poster ? $c.poster->as_string() : "(Anonymous)"; var string subj = $c.subject != "" ? $c.subject : $*text_nosubject; print_genericbox_open(); print "$subj - $poster"; print_genericbox_close(); } function EntryPage::print_comment (Comment c) { var string{} colors; var string{} meta; var string content = ""; var string footer = ""; if ($c.screened) { $colors{"bgcolor"} = "$*comment_bar_screened_bgcolor"; $colors{"fgcolor"} = "$*comment_bar_screened_fgcolor"; } elseif ($c.depth % 2) { $colors{"bgcolor"} = "$*comment_bar_one_bgcolor"; $colors{"fgcolor"} = "$*comment_bar_one_fgcolor"; } else { $colors{"bgcolor"} = "$*comment_bar_two_bgcolor"; $colors{"fgcolor"} = "$*comment_bar_two_fgcolor"; } # Userpic var string poster = defined $c.poster ? $c.poster->as_string() : "(Anonymous)"; var string metapic = ""; if (defined $c.userpic and $*comment_userpic_style != "off") { var string userpic = defined $c.userpic ? "" : ""; $metapic = "$userpic
$poster"; } else { $metapic = $poster; } # Subject var string sub_icon; if (defined $c.subject_icon) { $sub_icon = $c.subject_icon->as_string(); } if ($c.subject or $sub_icon) { $meta{"Subject:"} = "$c.subject $sub_icon"; } # Time posted $meta{"Time:"} = $c.time->time_format(); # Link $meta{"Link:"} = "(Link)"; # IP Address: if ($c.metadata{"poster_ip"}) { $meta{"IP Address:"} = $c.metadata{"poster_ip"}; } if ($c.frozen) { $footer = "(Replies frozen) "; } else { $footer = "(Reply to this) "; } if ($c.parent_url != "") { $footer = "$footer (Parent) "; } if ($c.thread_url != "") { $footer = "$footer (Thread) "; } var Link link = new Link; foreach var string k ($c.link_keyseq) { $link = $c->get_link($k); $footer = "$footer $link"; } println ""; print_box($colors, $metapic, $meta, $c.text, $footer, "cmtbar$c.talkid"); } function ReplyPage::print_body () { if (not $.entry.comments.enabled) { print_header($*text_reply_nocomments_header); print "

$*text_reply_nocomments

"; return; } var string{} meta; var string metapic; # Userpic if (defined $.replyto.userpic and $*comment_userpic_style != "off") { $metapic = ""; } # Subject if ($.replyto.subject) { $meta{"Subject:"} = $.replyto.subject; } # Time posted $meta{"Time:"} = $.replyto.time->time_format(); print_box({ "bgcolor" => "$*accent_bgcolor", "fgcolor" => "$*accent_fgcolor" }, $metapic, $meta, $.replyto.text, "", ""); print_header("Reply:"); print_genericbox_open(); $.form->print(); print_genericbox_close(); } function print_theme_preview() { "
"; ""; "
October 29th, 2003"; "

"; "
"; ""; ""; """"""; "
"; ""; "
"; ""; ""; ""; "
Subject:"; "Words Words Words
Time:1:37 pm
Preview text, preview text, etc, etc..... words, words and more words.
comments: 20 comments or Leave a comment

"; "
"; }