# -*-s2-*- layerinfo type = "layout"; layerinfo name = "Notepad"; layerinfo redist_uniq = "notepad/layout"; layerinfo previews = "notepad/notepad.jpg"; propgroup colors { property Color body_bgcolor { des = "Body background color"; } property Color text_color { des = "Text color"; } property Color subject_color { des = "Text color of subjects"; } property Color link_color { des = "Link color"; } property Color vlink_color { des = "Visited link color"; } property Color alink_color { des = "Active link color"; } 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 = "#8cd5fe"; set text_color = "#000000"; set subject_color = "#ff0000"; 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 bool show_entrynav_icons { des = "Toggle to show the next, memory, edit, etc icons on the entry view page"; } property use external_stylesheet; } set show_entry_userpic = false; set view_entry_disabled = false; set page_background_image = ""; set show_entrynav_icons = true; propgroup text { property use text_post_comment; property use text_read_comments; property use text_post_comment_friends; property use text_read_comments_friends; } property string imguri { noui = 1; des = "URI to notepad images (no trailing slash)"; } set imguri = ""; function prop_init() { if ($*imguri == "") { $*imguri = "$*SITEROOT/img/style/notepad"; } } function Page::lay_bottom_navigation() { } function print_stylesheet () { var string backgroundurl = clean_url($*page_background_image) != "" ? "background-image: url($*page_background_image);" : ""; """body { $backgroundurl background-color: $*body_bgcolor; } td,body,p,div { color: $*text_color; text-decoration: none; font-family: verdana,arial,helvetica; font-size: 12px; } a:link { color: $*link_color; text-decoration: underline; font-family: verdana,arial,helvetica; font-size: 12px; } a:visited { color: $*vlink_color; text-decoration: underline; font-family: verdana,arial,helvetica; font-size:12px; } a:active { color: $*alink_color; text-decoration: underline; font-family: verdana,arial,helvetica; font-size: 12px; } a:hover { color: $*alink_color; text-decoration: underline; font-family: verdana,arial,helvetica; font-size:12px; }"""; } function Page::print() { var string title = $this->title(); """\n\n\n"""; if ($*external_stylesheet) { println """"""; } else { println """"; } $this->print_head(); """$title
   Journal    Friends    Archive    User Info    memories
 

$title

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

"; $this->lay_bottom_navigation(); "

"; """
 
"""; } function print_entry (Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text) { ""; if ($p.view == "friends" or $*show_entry_userpic == true or $e.journal.username != $e.poster.username) { var string userpic = defined $e.userpic ? "
" : ""; ""; } """
"; if ($p.view == "friends" or $*show_entry_userpic == true) { print $userpic; } if ($p.view == "friends") { "$e.journal.username"; } if ($e.journal.username != $e.poster.username) { print ($p.view == "friends" ? "
[ $e.poster.username ]" : "$e.poster.username"); } "
"""; print $e.time->date_format("med"); " "; print $e.time->time_format(); if ($e.subject) { " $e.subject"; } " $e.security_icon"; if (not $hide_text) { print "

$e.text

"; 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 = " $val"; } "$key: $val
"; } "

"; } } $e.comments->print(); if ($p.view == "entry" and $*show_entrynav_icons) { $e->print_linkbar(); } """
"""; """

"""; } function Page::print_entry (Entry e) { print_entry($this, $e, null Color, null Color, false); } function RecentPage::print_body () { foreach var Entry e ($.entries) { $this->print_entry($e); } } 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_bottom_navigation () { var string nav = ""; if ($.nav.backward_url != "") { $nav = """Back a Page"""; } if ($.nav.forward_url != "" and $.nav.backward_url != "") { $nav = "$nav - "; } if ($.nav.forward_url != "") { $nav = """$navForward a Page"""; } if ($nav != "") { print $nav; } } function CommentInfo::print() { if (not $.enabled) { return; } if ($.count > 0 or $.screened) { $this->print_readlink(); " - "; } $this->print_postlink(); } function YearPage::lay_bottom_navigation () { $this->print_year_links(); } function YearPage::print_year_links () { if (size $.years <= 0) { return; } foreach var YearYear y ($.years) { if ($y.displayed) { "$y.year "; } else { "$y.year "; } } } function YearPage::print_body () { "

$.year

"; foreach var YearMonth m ($.months) { $this->print_month($m); } } function YearPage::print_month(YearMonth m) { if (not $m.has_entries) { return; } "

"; # Month Header ""; # Weekdays ""; foreach var int d (weekdays()) { "\n"; } ""; # Weeks foreach var YearWeek w ($m.weeks) { $w->print(); } "
"; print $m->month_format(); "
" + $*lang_dayname_short[$d] + "
"; "$*text_view_month"; "

"; } 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_bottom_navigation() { if (not $.has_entries) { "
"; } print "Back a Day - Forward a Day"; } function DayPage::print_body() { if (not $.has_entries) { "

No journal entries for this day.

"; } else { foreach var Entry e ($.entries) { $this->print_entry($e); } } } 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 "

Comments:

"; if ($.comment_pages.total_subitems > 0) { $.comment_pages->print(); $this->print_comments($.comments); } if ($this.multiform_on) { "

Mass Action:

"; $this->print_multiform_actionline(); $this->print_multiform_end(); } } } function EntryPage::print_comment (Comment c) { var Color barlight = $*color_comment_bar->clone(); $barlight->lightness(($barlight->lightness() + 255) / 2); var Color barc = $c.depth % 2 ? $*color_comment_bar : $barlight; if ($c.screened) { $barc = $*comment_bar_screened_bgcolor; } var string poster = defined $c.poster ? $c.poster->as_string() : "(Anonymous)"; "
"; ""; if (defined $c.userpic and $*comment_userpic_style != "off") { var int w = $c.userpic.width; var int h = $c.userpic.height; # WARNING: this will later be done by the system (it'll be a # constructional property), so don't copy this hack into your # layout layers or you'll be messed up later. if ($*comment_userpic_style == "small") { $w = $w / 2; $h = $h / 2; } print ""; } "
"; ""; print ""; print ""; print "\n"; print "
"; print ""; print "\n"; print ""; if ($c.metadata{"poster_ip"}) { print ""; } "
$*text_comment_from$poster
$*text_comment_date"; print $c.time->date_format("long") + " - " + $c.time->time_format() + "
$*text_comment_ipaddr(" + $c.metadata{"poster_ip"} + ")
"; if ($this.multiform_on) { " "; $c->print_multiform_check(); } $c->print_linkbar(); "
"; if (defined $c.subject_icon or $c.subject != "") { "

$c.subject_icon $c.subject

\n"; } print "
($*text_permalink)
"; print "
$c.text
\n"; print "
"; if ($c.frozen) { print "($*text_comment_frozen) "; } else { print "($*text_comment_reply) "; } if ($c.parent_url != "") { "($*text_comment_parent) "; } if ($c.thread_url != "") { "($*text_comment_thread) "; } "
\n"; } function ReplyPage::print_body () { if (not $.entry.comments.enabled) { print "

$*text_reply_nocomments_header

$*text_reply_nocomments

"; return; } ""; ""; """"""; """
"; print defined $.replyto.userpic ? "
" : ""; print defined $.replyto.poster ? $.replyto.poster->as_string() : "(Anonymous)"; "
"""; print $.replyto.time->date_format("med"); " "; print $.replyto.time->time_format(); if ($.replyto.subject) { " $.replyto.subject"; } ""; print "

$.replyto.text

"; "Read Comments"; """

"""; "
\n"; print "

Reply

"; $.form->print(); } function print_theme_preview () { """
   Tab    Tab    Tab    Tab    Tab
 

John Doe

Dec. 16th, 2002 06:39 pm Neque porro quisquam est qui dolorem ipsum quia dolor sit amet…

Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit

2 Comments | Leave a comment

 
"""; }