layerinfo "type" = "layout"; layerinfo "name" = "Dear Diary..."; layerinfo "author_name" = "Martin Atkins"; layerinfo "redist_uniq" = "deardiary/layout"; layerinfo "previews" = "deardiary/preview.jpg"; ## Customization Props propgroup colors { property Color clr_page_bg { des = "Main Page Background Color"; } property Color clr_page_fg { des = "Main Page Foreground Color"; } property Color clr_title_bg { des = "Title Background Color"; } property Color clr_title_fg { des = "Title Text Color"; } property Color clr_title_pattern { des = "Color of Title Background Pattern"; note = "This color will only be used if a pattern is selected."; } property Color clr_title_separator { des = "Color of Line Under Title"; } property Color clr_sidebar_bg { des = "Sidebar Background Color"; } property Color clr_sidebar_fg { des = "Sidebar Text Color"; } property Color clr_link_normal { des = "Normal Link Color"; } property Color clr_link_visited { des = "Visited Link Color"; } set clr_page_bg = "#F8EEFA"; set clr_page_fg = "#000000"; set clr_title_bg = "#8B04B2"; set clr_title_fg = "#ffffff"; set clr_title_pattern = "#D891F5"; set clr_title_separator = "#000000"; set clr_sidebar_bg = "#D891F5"; set clr_sidebar_fg = "#ffffff"; set clr_link_normal = "#D891F5"; set clr_link_visited = "#B375CD"; } propgroup appearance { property string title_pattern { des = "Pattern to use in the title bar"; note = "You can choose the color of the pattern on the colors page."; values = "letters.png|Letters|explosion.png|Explosion|nature.png|Nature|camouflage.png|Camouflage|ramblings.png|Ramblings|clouds.png|Clouds|futuristic.png|Futuristic|bubbles.png|Circles|bubblewrap.png|Bubble Wrap|wires.png|Wires|urban.png|Urban||None"; } set title_pattern = "camouflage.png"; property bool title_separator { des = "Show line under title bar"; } set title_separator = true; property string{}{} font_sizes { des = "A bunch of font size settings"; noui = 1; } set font_sizes = { "tiny" => { "body" => "10px", "pagetitle" => "25px", "pagesubtitle" => "14px", "dayhead" => "14px", "entryhead" => "12px", }, "small" => { "body" => "12px", "pagetitle" => "25px", "pagesubtitle" => "14px", "dayhead" => "16px", "entryhead" => "14px", }, "medium" => { "body" => "14px", "pagetitle" => "25px", "pagesubtitle" => "14px", "dayhead" => "18px", "entryhead" => "16px", }, "large" => { "body" => "16px", "pagetitle" => "25px", "pagesubtitle" => "14px", "dayhead" => "20px", "entryhead" => "18px", }, "huge" => { "body" => "18px", "pagetitle" => "25px", "pagesubtitle" => "14px", "dayhead" => "22px", "entryhead" => "20px", }, }; property string font_body { des = "Font Family For Normal Text"; note = "Specify a list of acceptable fonts in order of preference, most preferred first."; } set font_body = "\"Garamond\", \"Palatino\", \"Palatino Linotype\", serif"; property string font_sidebar { des = "Font Family For Sidebar"; note = "Specify a list of acceptable fonts in order of preference, most preferred first."; } set font_sidebar = "\"Tahoma\", \"Georgia\", \"Helvetica\", \"Arial\", sans-serif"; property string font_title { des = "Font Family For Title"; note = "Specify a list of acceptable fonts in order of preference, most preferred first."; } set font_title = "\"Tahoma\", \"Georgia\", \"Helvetica\", \"Arial\", sans-serif"; property string font_headings { des = "Font Family For Headings"; note = "Specify a list of acceptable fonts in order of preference, most preferred first."; } set font_headings = "\"Garamond\", \"Palatino\", \"Palatino Linotype\", serif"; property string font_size_keyword { des = "Text Size"; values = "tiny|Tiny|small|Small|medium|Medium|large|Large|huge|Huge"; } set font_size_keyword = "medium"; } propgroup options { property bool opt_use_friendcolors { des = "Use friend colors on friends page"; noui = 1; # The support for this isn't brilliant } set opt_use_friendcolors = false; property bool opt_hide_userpics { des = "Hide user picture icons on entries"; note = "The pictures will still be shown on the Friends view"; } set opt_hide_userpics = true; property use lang_fmt_date_short; property use lang_fmt_date_long; property use lang_fmt_time_short; property use page_recent_items; property use page_friends_items; property use use_shared_pic; property use view_entry_disabled; # This layout has quite a hefty stylesheet, so let's # make it external to avoid loading it over and over. set external_stylesheet = true; } propgroup options = "Options"; ## I18n Props propgroup text { property use text_view_recent; property use text_view_archive; property use text_view_friends; property use text_view_userinfo; property string i18n_paraphernalia_journalinfo { des = "Journal Info Heading"; } property string i18n_paraphernalia_viewsel { des = "View Selection Heading"; noui = 1; } property string i18n_paraphernalia_links { des = "Link List Heading"; noui = 1; } property string i18n_paraphernalia_recent_navigation { des = "RecentPage Navigation Heading"; noui = 1; } property string i18n_paraphernalia_year_navigation { des = "YearPage Navigation Heading"; noui = 1; } property string i18n_paraphernalia_entry_navigation { des = "EntryPage Navigation Heading"; noui = 1; } property string i18n_paraphernalia_day_navigation { des = "DayPage Navigation Heading"; noui = 1; } set i18n_paraphernalia_journalinfo = "Journal Info"; set i18n_paraphernalia_viewsel = "View"; set i18n_paraphernalia_links = "Links"; set i18n_paraphernalia_recent_navigation = "Navigation"; set i18n_paraphernalia_year_navigation = "Year"; set i18n_paraphernalia_entry_navigation = "Entry"; set i18n_paraphernalia_day_navigation = "Navigation"; property string i18n_journalinfo_name { des = "Journal Name Caption"; noui = 1; } property string i18n_journalinfo_website { des = "Journal Name Caption"; noui = 1; } set i18n_journalinfo_name = "Name"; set i18n_journalinfo_website = "Website"; property use text_post_comment; property use text_read_comments; property use text_post_comment_friends; property use text_read_comments_friends; property use text_website_default_name; } propgroup text = "Text"; function prop_init() { # A vague attempt at sanity-checking the font properties. Not # foolproof, of course, but this is about as good as it gets in S2. if ($*font_body->contains(";")) { $*font_body = "serif"; } if ($*font_sidebar->contains(";")) { $*font_sidebar = "sans-serif"; } if ($*font_title->contains(";")) { $*font_title = "sans-serif"; } if ($*font_headings->contains(";")) { $*font_headings = "serif"; } } function pretty_styles() "Pretty stuff that's completely dispensible" { var int top = ($*title_separator ? 79 : 75); var string{} size = $*font_sizes{$*font_size_keyword}; """ body { background: $*clr_sidebar_bg; color: $*clr_sidebar_fg; margin: 0; padding: 0; border: 0; font-family: $*font_body; width: 100%; height: 100%; } body, td, table, th, tr { font-size: $size{"body"}; } #main a:link { color: $*clr_link_normal; } #main a:visited { color: $*clr_link_visited; } .pbox a { color: $*clr_sidebar_fg; } #title { color: $*clr_title_fg; background-color: $*clr_title_bg; """; if ($*title_pattern != "") { """ background-image: url("""+palimg_tint("deardiary/titleimages/$*title_pattern", $*clr_title_bg, $*clr_title_pattern)+"""); background-repeat: no-repeat; background-position: top right; """; } if ($*title_separator) { """ border-bottom: 4px solid $*clr_title_separator; """; } """ width: 100%; font-family: $*font_title; height: 75px; overflow: hidden; } #title h1 { font-size: $size{"pagetitle"}; font-weight: bold; margin: 0; padding-top: 20px; padding-left: 8px; white-space: no-wrap; } #title #journal_subtitle { font-size: $size{"pagesubtitle"}; font-weight: bold; margin: 0; padding-left: 8px; white-space: no-wrap; } #paraphernalia { position: absolute; left: 0; top: ${top}px; width: 200px; font-family: $*font_sidebar; } #paraphernalia h2 { font-size: $size{"body"}; font-weight: bold; text-align: left; margin-top: 16px; margin-bottom: 8px; } #paraphernalia .pbox { margin-left: 8px; margin-right: 8px; } #journalinfouserpic { text-align: center; } .pboxcontent { margin-left: 8px; margin-right: 8px; } .pbox dt { font-weight: normal; margin-top: 4px; } .pbox dd { padding: 0; margin-left: 24px; } .pbox ul { margin: 0; padding: 0; list-style: none; } .pbox ul ul { margin-left: 24px; } .pbox li { margin: 0; padding: 0; } .pbox li.current { font-weight: bold; } .pbox p { margin: 8px 0; } #main { position: absolute; /*left: 20%;*/ left: 200px; top: ${top}px; right: 0; margin: 0; background-color: $*clr_page_bg; color: $*clr_page_fg; min-height: 150%; padding: 0 10px 0 0; } * html #main { width: expression((document.body.clientWidth - document.getElementById('paraphernalia').clientWidth - 10)+"px"); height: expression((document.body.clientHeight)+"px"); } .day h2 { font-size: $size{"dayhead"}; font-weight: bold; padding: 0 0 5px 10px; background-image: url("""+palimg_tint("deardiary/headinggrad.png", $*clr_page_bg, $*clr_sidebar_bg)+"""); background-position: bottom left; background-repeat: no-repeat; margin: 16px 0 8px 0; font-family: $*font_headings; } .entry { margin: 32px 16px 32px 26px; } .entryheader { font-size: $size{"entryhead"}; } .entryheader .entrytimestampdate { display: none; } .comments .entry { margin-left: 0; margin-bottom: 8px; } .calendarmonth { width: 60%; margin-right: auto; margin-left: auto; border-collapse: collapse; margin-bottom: 2em; } .calendarmonth td, .calendarmonth th { padding: 0.5em; margin: 0; } .calendarmonthlink { text-align: center; } .calendarmonthheader h2 { font-size: $size{"entryhead"}; margin: 0; } .page_month #main form, .page_month #main dl { margin: 8px; } #server_sig { display: none; } """; } function necessary_styles() "Styles which are likely to be needed whatever stylesheet is in use" { """ .entry { margin-bottom: 2em; clear: both; } .entry .entryheader { font-weight: bold; text-align: left; } .entry .entryheader h3 { font-size: 1em; margin: 0; padding: 0; } .entryheader .entryicon { float: right; margin-right: 1em; } .entryheader .entryuserpic { float: right; margin-top: 2em; clear: both; display: block; padding: 0.5em; """; if ($*opt_hide_userpics) { """ display: none; } .page_friends .entryheader .entryuserpic { display: block; """; } """ } .entryheader .entryposter { display: inline; float:left; margin-right: 1em; } .entryheader .entryposter:after { content: ": "; } .entryposter img, .collapsed_entry img { height: 14px; width: 10px; } .entryheader .entrytimestamp { display: inline; } .entrylinkbarpre, .entrylinkbarpost { display: none; } .page_entry .entrylinkbarpre, .page_reply .entrylinkbarpre { display: block; float: right; } .entry .entrycontent { margin: 8px; } .entrymeta { list-style: none; padding: 0; margin: 0 0 0.5em 0; display: block; } .entrymeta .entrymetacaption { font-weight: bold; } .entrymeta li { white-space: no-wrap; } .entry .entryfooter { clear: both; margin: 0; } .entryfooter .entrycmdlinks { list-style: none; vertical-align: middle; margin: 0; padding: 0em; white-space: no-wrap; text-align: left; } .entryfooter .entrycmdlinks:before { content: "("; } .entryfooter .entrycmdlinks:after { content: ")"; } .entrycmdlinks li { display: inline; } * html .entrycmdlinks li { margin-left: 1em; } .entrycmdlinks li:before { content: " - "; } .entrycmdlinks li:first-child:before { content: ""; } .comments { list-style: none; padding: 0; margin-left: 50px; } .comments .comments { margin-left: 25px; } .comments > li { margin: 0; padding: 0; } .calendardaynum { text-align: right; } .calendardaycount { text-align: center; } .calendarday { width: 14%; } .itemrange { list-style: none; padding: 0; margin: 0.5em; text-align: center; } .itemrange li { display: inline; margin: 0 0.25em; } .itemrange li a:before, .itemrange li.current:before { content: "["; } .itemrange li a:after, .itemrange li.current:after { content: "]"; } """; } function custom_styles() "User layers can override this to add extra CSS to the stylesheet" {} ## Everything after this point should be common to all Cascadadelic layouts function UserLite::lay_as_string() : string { var Image uiimg = userinfoicon($this); var string dir = $.journal_type == "C" ? "community" : "users"; return "[info]$.username"; } function print_stylesheet() { necessary_styles(); pretty_styles(); custom_styles(); } function paraphernalia_box_open(string id, string title) "Open a paraphenalia box" { "
"; if ($title != "") { """

$title

"""; } """
\n"""; } function paraphernalia_box_close(string id, string title) "Close a paraphenalia box" { """
\n"""; } function Page::lay_print_heading() { print "

$.global_title

"; if ($.view == "recent" and $.global_subtitle != "") { print """
$.global_subtitle
"""; } else { print """
"""+$this->view_title()+"""
"""; } } function Page::lay_print_journalinfo() { paraphernalia_box_open("journalinfo",$*i18n_paraphernalia_journalinfo); if (defined $.journal.default_pic) { println """
$.journal.default_pic
"""; } println "
"; println "
$*i18n_journalinfo_name
$.journal.name
"; if ($.journal.website_url != "") { var string website = $.journal.website_name != "" ? $.journal.website_name : $*text_website_default_name; println """
$*i18n_journalinfo_website
$website
"""; } println "
"; paraphernalia_box_close("journalinfo",$*i18n_paraphernalia_journalinfo); } function Page::lay_print_viewsel() { paraphernalia_box_open("viewsel",$*i18n_paraphernalia_viewsel); "\n"; paraphernalia_box_close("viewsel",$*i18n_paraphernalia_viewsel); } function Page::lay_print_userlinks() { if (size $.linklist <= 0) { return; } paraphernalia_box_open("userlinks",$*i18n_paraphernalia_links); $this->print_linklist(); paraphernalia_box_close("userlinks",$*i18n_paraphernalia_links); } function Page::lay_print_viewspec() {} function Page::lay_print_viewspec_after() {} function Page::lay_print_custom_paraphernalia() "User layers can override this to add extra paraphernalia" {} function Page::lay_print_paraphernalia() "User layers can override this to change what appears in the paraphernalia section" { $this->lay_print_journalinfo(); $this->lay_print_viewsel(); $this->lay_print_viewspec(); $this->lay_print_custom_paraphernalia(); $this->lay_print_userlinks(); } function lang_posting_in(UserLite poster, UserLite journal) : string "Return the string 'poster posting in journal'; I18n layers should override this." { return $poster->lay_as_string()+" posting in "+$journal->lay_as_string(); } function EntryLite::lay_print_icon() {} function EntryLite::lay_print_metadata() {} function EntryLite::lay_print_cmdlinks() {} function EntryLite::lay_print_poster() { if (defined $.poster) { print """
$.poster
"""; } else { print """
$*text_poster_anonymous
"""; } } function Entry::lay_print_poster() { var Page p = get_page(); if ($p.view == "recent" and $.poster->equals($.journal)) { return; } if ($p.view == "friends") { print """
"""; if (not $.poster->equals($.journal)) { print lang_posting_in($.poster, $.journal); } else { print $.poster->lay_as_string(); } print """
"""; } else { print """
"""+$.poster->lay_as_string()+"""
"""; } } function Entry::lay_print_icon() { if ($.security != "") { """
"""; print $.security_icon->as_string("[$.security]"); "
"; } } function Comment::lay_print_icon() { if (defined $.subject_icon) { """
"""; print $.subject_icon->as_string(""); "
"; } } function Entry::lay_print_metadata() { if ($.metadata{"music"} == "" and $.metadata{"mood"} == "") {return;} println """"""; } function Comment::lay_print_metadata() { if ($.metadata{"poster_ip"} != "") { println """"""; } } function Entry::lay_print_cmdlinks() { println """"""; } function Comment::lay_print_cmdlinks() { println """"""; } function Page::lay_print_entrylite(EntryLite e) { """

$e.subject

"""; $e->lay_print_poster(); """"""; $e->lay_print_icon(); """
"""; $e->print_linkbar(); """
"""; if (defined $e.userpic) { """
$e.userpic
"""; } """
$e.text
"""; $e->lay_print_metadata(); """
"""; $e->print_linkbar(); """
"""; $e->lay_print_cmdlinks(); """
"""; } function Page::print_entry(Entry e) { $this->lay_print_entrylite($e); } function EntryPage::print_comment(Comment c) { if ($c.full) { $this->lay_print_entrylite($c); } else { var string subject = ($c.subject ? $c.subject : "(no subject)"); """
$subject - $c.poster
"""; } } function Page::lay_print_viewspec_head() {} function FriendsPage::lay_print_viewspec_head() { if (not $*opt_use_friendcolors) { return; } println """"""; } function Page::print() { """ """+$this->title()+""" """; if ($*external_stylesheet) { println """"""; } else { println """"""; } $this->print_head(); $this->lay_print_viewspec_head(); """
"""; $this->lay_print_heading(); """
"""; $this->lay_print_paraphernalia(); """
"""; $this->print_body(); """
"""; $this->lay_print_viewspec_after(); """
"""; server_sig(); """
"""; } ## Some general page stuff function Page::print_linklist() { if (size $.linklist <= 0) { return; } var bool section_open = false; println ""; } println """
  • $l.title\n
  • "; } println ""; } ## RecentPage Stuff function lang_skipped_back(RecentNav nav) : string "Return short text saying how many entries have been skipped back. i18n layers should override this." { return "Skipped Back $nav.skip"; } function lang_adjacent_skip(RecentNav nav, bool next) : string "Return either 'Previous N' or 'Next N' depending on the value of the 'next' parameter" { if ($next) { return "Next $nav.forward_count"; } else { return "Previous $nav.backward_count"; } } function RecentPage::lay_print_viewspec() { if ($.nav.backward_url != "" or $.nav.forward_url != "") { paraphernalia_box_open("recentnav",$*i18n_paraphernalia_recent_navigation); if ($.nav.skip > 0) { println "

    "+lang_skipped_back($.nav)+"

    "; } println """"; paraphernalia_box_close("recentnav",$*i18n_paraphernalia_recent_navigation); } } function RecentPage::print_body() { foreach var Entry e ($.entries) { if ($e.new_day) { """
    date_format("%%yyyy%%%%mm%%%%dd%%")+"\">\n"; println "

    "+$e.time->date_format("long")+"

    "; } # Print the entry $this->print_entry($e); if ($e.end_day) { "
    "; } } } ## YearPage Stuff function YearPage::lay_print_viewspec() { paraphernalia_box_open("yearnav",$*i18n_paraphernalia_year_navigation); $this->print_year_links(); paraphernalia_box_close("yearnav",$*i18n_paraphernalia_year_navigation); } function YearPage::print_body { println """
    """; foreach var YearMonth m ($.months) { $this->print_month($m); } println "
    "; } function YearPage::print_year_links() { """\n"""; } function YearPage::print_month(YearMonth m) { if (not $m.has_entries) { return; } """\n \n"""; foreach var int d (weekdays()) { "\n"; } "\n"; foreach var YearWeek w ($m.weeks) { $w->print(); } """\n"""; "
    """; print "

    "+$m->month_format()+"

    \n"; """
    "+$*lang_dayname_short[$d]+"
    "; } function YearWeek::print() { """\n"""; if ($.pre_empty > 0) { """ \n"""; } foreach var YearDay d ($.days) { """\n"""; """
    $d.day
    \n"""; if ($d.num_entries > 0) { """
    $d.num_entries
    \n"""; } """\n"""; } if ($.post_empty > 0) { """ \n"""; } ""; } # EntryPage and ReplyPage stuff function EntryPage::lay_print_pager() { if ($.comment_pages.all_subitems_displayed) { return; } print ""; } function EntryPage::print_body() { $this->lay_print_entrylite($.entry); $this->lay_print_pager(); $this->print_comments($.comments); $this->lay_print_pager(); } function ReplyPage::print_body() { $this->lay_print_entrylite($.replyto); """
    """; $.form->print(); """
    """; } function EntryPage::print_comments (Comment[] cs) { if (size $cs == 0) { return; } """"""; } # DayPage stuff function DayPage::lay_print_viewspec() { paraphernalia_box_open("daynav",$*i18n_paraphernalia_day_navigation); println """"; paraphernalia_box_close("daynav",$*i18n_paraphernalia_day_navigation); } function DayPage::print_body() { "
    date_format("%%yyyy%%%%mm%%%%dd%%")+"\">\n

    "; print $.date->date_format("long"); "

    \n"; if ($.has_entries) { foreach var Entry e ($.entries) { $this->print_entry($e); } "
    "; } else { """
     
    \n"""; """

    $*text_noentries_day

    \n"""; """
     
    \n"""; } } function print_theme_preview() { var int top = ($*title_separator ? 79 : 75); """

    Frank's LiveJournal

    Because goats are cool

    Sidebar Stuff

    Blah blah blah

    Tuenesday 34th Augurary 2615

    Flobidob Blib Blob Blib

    Praesent id diam ut eros convallis eleifend. Quisque rhoncus, purus a lobortis pellentesque, est erat condimentum elit, fringilla aliquet diam neque ut leo. Vivamus faucibus magna id magna sollicitudin venenatis. Cras dolor. Vivamus nec risus. Morbi vitae erat vel ipsum posuere tristique. Mauris tincidunt, sem sit amet vulputate dignissim, diam est adipiscing urna, ut sollicitudin mi dui ultrices quam. Cras in nibh ut nisl ultrices ultrices. Cras turpis massa, rhoncus sed, dapibus id, iaculis et, mauris. Suspendisse in wisi. Duis at nibh. In laoreet purus id lacus. Ut nulla est, venenatis eget, auctor sed, pretium a, diam.

     
    """; }