# ----------------------------------- # LAYER INFO # ----------------------------------- layerinfo type = "layout"; layerinfo name = "Flexible Squares"; layerinfo lang = "en"; layerinfo author_name = "Yati Mansor"; layerinfo redist_uniq = "flexiblesquares/layout"; # ----------------------------------- # PROPGROUPS # ----------------------------------- ### PRESENTATION propgroup presentation = "Presentation"; propgroup presentation { property use page_recent_items; property use page_friends_items; property use view_entry_disabled; property bool show_entry_userpic { des = "Show user picture icons with each of your entries?"; } property string userpic_position { des = "Set the user picture position for each entry"; values = "left|Left|right|Right"; } property bool use_friends_colours { des = "Use friends colours when viewing friends list?"; } set show_entry_userpic = true; set userpic_position = "left"; set use_friends_colours = true; property use use_shared_pic; property string page_alignment { des = "Set page alignment"; values= "right|Right|center|Center|left|Left"; } set page_alignment = "center"; property int journal_width { des = "Journal width"; note = "Journal width can be set in either percentage of the browser window or in pixels (see next option)"; min = 1; } property string journal_width_unit { des = "Unit of journal width"; note = "Journal width can be set either in percentage of the browser window or in pixels"; values = "%|%|px|px"; } set journal_width = 80; set journal_width_unit = "%"; } ### SIDEBAR propgroup sidebar = "Sidebar"; propgroup sidebar { property bool show_sidebar { des = "Show the sidebar?"; } set show_sidebar = true; property string sidebar_position { des="Set sidebar position"; values="left|Left|right|Right"; } set sidebar_position="right"; property bool show_default_userpic { des = "Show the default user picture on the sidebar?"; } set show_default_userpic = true; property bool show_blurb { des = "Show the blurb/free text in the sidebar?"; } property string text_sidebar_blurb { des = "Title of the blurb sidebar box"; } property string sidebar_blurb { des = "Text to be added to the sidebar"; note = "Appears in the sidebar 'Blurb'"; rows = 10; cols = 25; } set show_blurb = true; set text_sidebar_blurb = "Blurb"; property bool show_linklist { des = "Show the link list in the sidebar?"; } property string text_sidebar_links { des = "Title of the links sidebar box"; } set show_linklist = true; set text_sidebar_links = "Links"; property bool show_calendar { des = "Show the calendar in the sidebar?"; } set show_calendar = true; property int sidebar_width { des = "Set sidebar width, in pixels"; min = 0; } set sidebar_width = 160; property string sidebar_order_1 { des = "First box in the sidebar"; values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar"; } property string sidebar_order_2 { des = "Second box in the sidebar"; values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar"; } property string sidebar_order_3 { des = "Third box in the sidebar"; values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar"; } property string sidebar_order_4 { des = "Fourth box in the sidebar"; values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar"; } set sidebar_order_1 = "userpic"; set sidebar_order_2 = "blurb"; set sidebar_order_3 = "linklist"; set sidebar_order_4 = "calendar"; } ### BACKGROUND propgroup background = "Background"; propgroup background { property string page_background_image { des = "Background image"; note = "URL to an image to be used for the page background (leave blank for none)."; } property string page_background_repeat { des = "Background image repeat"; values = "repeat|Repeat|no-repeat|Don't repeat|repeat-x|Repeat across only|repeat-y|Repeat down only"; } property string page_background_position { des = "Background image position"; note = "Does not apply if background image is repeating in both directions."; values = "center|Center|center left|Center-left|center right|Center-right|top|Top|top left|Top-left|top right|Top-right|bottom|Bottom|bottom left|Bottom-left|bottom right|Bottom-right|left|Left|right|Right"; } property string page_background_scrolling { des = "Background image scrolling"; note = "Not supported in all browsers, but allows for the background image to be in a fixed position when scrolling."; values = "scroll|Scroll|fixed|Fixed"; } set page_background_image = ""; set page_background_repeat = "repeat"; set page_background_position = "center"; set page_background_scrolling = "scroll"; } ### FONTS propgroup fonts = "Fonts"; propgroup fonts { property string font_unit { des = "Font unit"; values = "pt|Points|px|Pixels|em|Em"; } set font_unit = "px"; property string main_font { des = "Preferred/base font"; maxlength = 25; size = 10; example = "Tahoma"; note = "Leave blank for your browser's default font"; } property string main_font_fallback { des = "Alternative font style"; values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default"; note = "This general style will serve as a fallback if your preferred font is unavailable."; } property int main_font_size { des = "Base font size"; } set main_font = "Verdana"; set main_font_fallback = "sans-serif"; set main_font_size= 11; property string content_font { des = "Font for the entry/date/entry subject"; maxlength = 25; size = 10; example = "Verdana"; note = "Leave blank for your browser's default font"; } property string content_font_fallback { des = "Alternative font style"; values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default"; note = "This general style will serve as a fallback if your preferred font is unavailable."; } property int content_font_size { des = "Entry/date/subject font size"; } property int date_font_size { des = "Date font size"; } property int subject_font_size { des = "Subject font size"; } set content_font = "Verdana"; set content_font_fallback = "sans-serif"; set content_font_size= 11; set date_font_size= 11; set subject_font_size= 11; property string sidebar_font { des = "Font for the sidebar"; maxlength = 25; size = 10; example = "Verdana"; note = "Leave blank for your browser's default font"; } property string sidebar_font_fallback { des = "Alternative font style"; values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default"; note = "This general style will serve as a fallback if your preferred font is unavailable."; } property int sidebar_font_size { des = "Sidebar font size"; } set sidebar_font = "Verdana"; set sidebar_font_fallback = "sans-serif"; set sidebar_font_size= 11; property string header_footer_font { des = "Font for the header and footer"; maxlength = 25; size = 10; example = "Verdana"; note = "Leave blank for your browser's default font"; } property string header_footer_font_fallback { des = "Alternative font style"; values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default"; note = "This general style will serve as a fallback if your preferred font is unavailable."; } property int header_footer_font_size { des = "Header and footer font size"; } set header_footer_font = "Verdana"; set header_footer_font_fallback = "sans-serif"; set header_footer_font_size= 11; property string title_font { des = "Font for the title and subtitle"; maxlength = 25; size = 10; example = "Verdana"; note = "Leave blank for your browser's default font"; } property string title_font_fallback { des = "Alternative font style"; values = "sans-serif|Sans-serif|serif|Serif|cursive|Cursive|monospace|Monospaced|none|Use browser's default"; note = "This general style will serve as a fallback if your preferred font is unavailable."; } property int title_font_size { des = "Title font size"; } property int subtitle_font_size { des = "Subtitle font size"; } set title_font = "Verdana"; set title_font_fallback = "sans-serif"; set title_font_size= 11; set subtitle_font_size= 11; } ### COLOURS propgroup colors = "Colours"; propgroup colors { property Color page_bgcolor { des = "Background color for the page"; } property Color page_fgcolor { des = "Text color for the page"; } property Color content_bgcolor { des = "Background color for box containing the main contents of the page"; } property Color outer_table_bgcolor { des = "Background color of the outer table"; } property Color entry_bgcolor { des = "Background color of the entries"; } property Color entry_fgcolor { des = "Text color of the entries"; } property Color border_color { des = "Border color of the content and header/footer boxes"; } property Color entrytitle_bgcolor { des = "Background color of the subject, date and comment links"; } property Color sidebar_header_bgcolor { des = "Background color for the headers in the sidebar"; } property Color sidebar_fgcolor { des = "Text color for the sidebar"; } property Color header_footer_bgcolor { des = "Background color of the header and footer"; } property Color header_footer_fgcolor { des = "Text color for the header and footer"; } property Color subject_fgcolor { des = "Text color for the subject of the entries"; } property Color date_fgcolor { des = "Text color for the date of the entries"; } set page_bgcolor = "#99AECE"; set page_fgcolor = "#000000"; set content_bgcolor = "#C2CDE0"; set entry_bgcolor = "#D4DCE8"; set entry_fgcolor = "#000000"; set border_color = "#999999"; set entrytitle_bgcolor = "#919BAD"; set outer_table_bgcolor = "#A9B3C4"; set sidebar_fgcolor = "#000000"; set sidebar_header_bgcolor = "#919BAD"; set header_footer_bgcolor = "#D4DCE8"; set header_footer_fgcolor = "#000000"; set subject_fgcolor = "#000000"; set date_fgcolor = "#000000"; property Color link_color { des = "Link color for both visited and unvisited links"; } property Color link_hover_color { des = "Link color on hover"; } property Color comments_link_color { des = "Link color for visited and unvisited comment links"; } property Color comments_link_hover { des = "Link color for comment links on hover"; } property Color sidebar_link_color { des = "Link color for visited and unvisited sidebar links"; } property Color sidebar_link_hover { des = "Link color for sidebar links on hover"; } property Color header_footer_link_color { des = "Link color for visited and unvisited links for the header and footer"; } property Color header_footer_link_hover { des = "Link color for comment links on hover for the header and footer"; } set link_color = "#5674B9"; set link_hover_color = "#7AA1F8"; set comments_link_color = "#FFFFFF"; set comments_link_hover = "#B0B9C8"; set sidebar_link_color = "#5674B9"; set sidebar_link_hover = "#7AA1F8"; set header_footer_link_color = "#5674B9"; set header_footer_link_hover = "#7AA1F8"; } ### TEXT propgroup text = "Text"; propgroup text { property use text_meta_music; property use text_meta_mood; 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; property use text_view_recent; property use text_view_friends; property use text_view_userinfo; property use text_view_archive; set text_view_archive = "Archive"; set text_view_friends = "Friends"; set text_view_recent = "Recent Entries"; set text_view_userinfo = "User Info"; set text_website_default_name = "Website"; property use text_nosubject; property string text_edit { des = "Text for an entry's edit link"; } property string text_memories { des = "Text to add an entry to the memories"; } property string text_previous_entry { des = "Text to link to the previous entry"; } property string text_next_entry { des = "Text to link to the next entry"; } set text_nosubject = "(no subject)"; set text_permalink = "Link"; set text_edit = "Edit"; set text_memories = "Mem"; set text_next_entry = "Next"; set text_previous_entry = "Previous"; property use text_skiplinks_back; property use text_skiplinks_forward; set text_skiplinks_back = "go earlier"; set text_skiplinks_forward = "go later"; } ### STYLESHEET OPTIONS propgroup stylesheet = "Stylesheet"; propgroup stylesheet { property bool external_stylesheet { des = "Use linked stylesheet"; } property string external_stylesheet_url { des="External stylesheet URL"; } set external_stylesheet = true; } # ----------------------------------- # STYLESHEET # ----------------------------------- function css_font_family(string base, string fallback) : string { var string return; if ($base != "" or $fallback != "none") { $return = $return + "font-family: "; if ($base != "") { $return = $return + "\"$base\""; if ($fallback != "none") { $return = $return + ", "; } } if ($fallback != "none") { $return = $return + $fallback; } } return $return; } function print_stylesheet () { var string body_font_family = css_font_family($*main_font, $*main_font_fallback); var string content_font_family = css_font_family($*content_font, $*content_font_fallback); var string sidebar_font_family = css_font_family($*sidebar_font, $*sidebar_font_fallback); var string header_footer_font_family = css_font_family($*header_footer_font, $*header_footer_font_fallback); var string title_font_family = css_font_family($*title_font, $*title_font_fallback); var string body_background = ""; if ($*page_background_image != "") { $body_background = """ background-image: url("$*page_background_image"); background-repeat: $*page_background_repeat; background-position: $*page_background_position; background-attachment: $*page_background_scrolling; """; } var string page_align = ""; var string body_align = ""; if ($*page_alignment == "left") { $page_align = "margin-left: 20px; margin-right: auto"; } if ($*page_alignment == "right") { $page_align = "margin-left: auto; margin-right: 20px"; $body_align = "text-align: right"; } if ($*page_alignment == "center") { $page_align = "margin-left: auto; margin-right: auto"; $body_align = "text-align: center"; } var string maincontent_prop = ""; var string sidebar_prop = ""; var int float_margin = $*sidebar_width + 20; if ($*show_sidebar and $*sidebar_position == "right") { $maincontent_prop = "margin-right: ${float_margin}px;"; $sidebar_prop = "float: right;"; } if ($*show_sidebar and $*sidebar_position == "left") { $maincontent_prop = "margin-left: ${float_margin}px;"; $sidebar_prop = "float: left;"; } if (not $*show_sidebar) { $maincontent_prop = ""; } var string sidebar_pos = ""; if ($*sidebar_position == "left") { $sidebar_pos = "clear: right"; } if ($*sidebar_position == "right") { $sidebar_pos = "clear: left"; } print """ body { background-color: $*page_bgcolor; $body_background $body_align; color: $*page_fgcolor; $body_font_family; font-size: $*main_font_size$*font_unit; margin: 20px 0 20px 0; } a, a:link, a:visited { color: $*link_color; text-decoration: none; } a:hover { color: $*link_hover_color; text-decoration: underline; } p, td, blockquote { font-size: $*content_font_size$*font_unit; } code, kbd, pre, tt { font-family: monospace; } #content { width: $*journal_width$*journal_width_unit; $page_align; background-color: $*outer_table_bgcolor; border-width: 1px; border-style: solid; border-color: $*border_color; padding: 15px; } #maincontent { margin-top: 15px; $content_font_family; font-size: $*content_font_size$*font_unit; background-color: $*content_bgcolor; color: $*page_fgcolor; border-style: solid; border-color: $*border_color; border-width: 1px; $maincontent_prop text-align: left; } #sidebar { padding-top: 15px; margin-top: 15px; background-color: $*content_bgcolor; border-color: $*border_color; border-width: 1px; border-style: solid; font-size: $*sidebar_font_size$*font_unit; $sidebar_font_family; color: $*sidebar_fgcolor; width: ${*sidebar_width}px; $sidebar_prop text-align: left; } #header { width: 100%; padding: 10px 0px 20px 0px; margin: 0px; text-align: center; $header_footer_font_family; font-size: $*header_footer_font_size$*font_unit; font-weight: bold; letter-spacing: 2px; border-style: solid; border-color: $*border_color; border-width: 1px; background-color: $*header_footer_bgcolor; color: $*header_footer_fgcolor; } #footer { width: 100%; text-align: center; $header_footer_font_family; font-size: $*header_footer_font_size$*font_unit; font-weight: bold; letter-spacing: 1px; background-color: $*header_footer_bgcolor; color: $*header_footer_fgcolor; border-color: $*border_color; border-width: 1px; border-style: solid; z-index: 100; clear: both; } /* header -- links to views; title of journal; subtitle of journal */ div#header a, div#header a:link, div#header a:visited, div#footer a, div#footer a:link, div#footer a:visited { color: $*header_footer_link_color; } div#header a:hover, div#footer a:hover { color: $*header_footer_link_hover; text-decoration: none; } ul.navheader { padding: 0px; margin: 0px; } ul.navheader li { display: inline; padding: 0 3px 0 3px; } .title { $title_font_family; font-size: $*title_font_size$*font_unit; font-weight: normal; line-height: 200%; top: 10px; } .subtitle{ $title_font_family; font-size: $*subtitle_font_size$*font_unit; font-weight: normal; top: 10px; } /* sidebar */ div#sidebar a, div#sidebar a:link, div#sidebar a:visited{ color: $*sidebar_link_color; } div#sidebar a:hover { color: $*sidebar_link_hover; text-decoration: none; } .defaultuserpic { text-align: center; } .sbarheader { padding: 0px 5px 0px 5px; } .sbarbody { padding: 0px 5px 0px 5px; } .sbarbody2 { padding: 0 15px 0 15px; } table.calendar { margin-right: auto; margin-left: auto; } .sbarcalendar { border-color: $*page_fgcolor; border-width: 1px; border-style: solid; text-align: center; $sidebar_font_family; font-size: $*sidebar_font_size$*font_unit; } .sbarcalendarposts { border-color: $*page_fgcolor; border-width: 1px; border-style: solid; background-color: $*entry_bgcolor; text-align: center; $sidebar_font_family; font-size: $*sidebar_font_size$*font_unit; } ul.sbarlist { padding-left: 0px; margin-left: 0px; list-style: none; } li.sbaritem { padding-left: 15px; list-style: none; } li.sbartitle { padding-left: 15px; list-style: none; border-style: solid; border-width: 1px; border-color: $*border_color; background-color: $*sidebar_header_bgcolor; margin-bottom: 10px; margin-top: 10px; } /* maincontent */ .subcontent { } .entry { margin: 0px 10px 10px 30px; padding: 10px; background-color: $*entry_bgcolor; color: $*entry_fgcolor; $content_font_family; font-size: $*content_font_size$*font_unit; text-align: left; border-width: 1px; border-color: $*entrytitle_bgcolor; border-style: solid; } .entry ul li { padding-left: 5px; margin-left: 15px; } .entry ol li { padding-left: 5px; margin-left: 15px; } .userpic { position: relative; float: $*userpic_position; background-color: $*entry_bgcolor; padding: 5px; margin: 10px; z-index: 15; border-width: 1px; border-color: $*entrytitle_bgcolor; border-style: solid; } .userpicfriends { position: relative; float: $*userpic_position; padding: 5px; margin: 10px; text-align: center; border-style: solid; border-width: 1px; border-color: $*entrytitle_bgcolor; $content_font_family; font-size: $*content_font_size$*font_unit; z-index: 15; } .date { line-height: 200%; top: 5px; color: $*date_fgcolor; $content_font_family; font-size: $*date_font_size$*font_unit; } .subject { font-weight: bold; padding: 10px; color: $*subject_fgcolor; $content_font_family; font-size: $*subject_font_size$*font_unit; } .subject a, .subject a:link, .subject a:visited { color: $*comments_link_color; } .subject a:hover { color: $*comments_link_hover; } .datesubject { background-color: $*entrytitle_bgcolor; padding: 5px; } .currents, .currentmood, .currentmusic { $content_font_family; font-size: $*content_font_size$*font_unit; } .comments { $content_font_family; font-size: $*content_font_size$*font_unit; text-align: right; background-color: $*entrytitle_bgcolor; padding: 0px 5px 0px 5px; position: relative; top: 15px; } div.comments a, div.comments a:link, div.comments a:visited{ color: $*comments_link_color; } div.comments a:hover { color: $*comments_link_hover; text-decoration: none; } /* maincontent -- entry, reply pages */ .datesubjectcomment { background-color: $*entrytitle_bgcolor; padding: 5px; margin-top: 20px; } .userpiccomment { position: relative; border-width: 5px; border-style: solid; border-color: $*entry_bgcolor; background-color: $*entry_bgcolor; top: -30px; left: 0px; padding: 5px; margin: 10px 10px -20px 10px; z-index: 15; float: $*userpic_position; border-width: 1px; border-color: $*entrytitle_bgcolor; border-style: solid; } .box { border-style: solid; border-width: 1px 0px 0px 0px; border-color: $*border_color; padding: 10px; $sidebar_pos; } input, textarea { background-color: $*entry_bgcolor; color: $*entry_fgcolor; } textarea.textbox { width: 100% !important; } .reply { position: relative; margin: 20px 30px 10px 30px; padding: 25px 10px 10px 10px; text-align: left; $content_font_family; font-size: $*content_font_size$*font_unit; line-height: 125%; background-color: $*entry_bgcolor; color: $*entry_fgcolor; } .replytosubject { font-weight: bold; } .commentreply { position: relative; margin: 10px; font-size: $*content_font_size$*font_unit; $content_font_family; color: $*entry_fgcolor; } .commentbox { border-color: $*border_color; border-width: 1px; border-style: solid; padding: 10px; margin: 10px; background-color: $*entry_bgcolor; } .datesubjectcomment a:link, .datesubjectcomment a:visited { color: $*comments_link_color; } .datesubjectcomment a:hover { color: $*comments_link_hover; } .commentboxpartial { border-color: $*border_color; border-width: 1px; border-style: solid; padding: 10px; margin: 10px; background-color: $*entry_bgcolor; } .commentinfo { background-color: $*entry_bgcolor; margin-top: 10px; width: 100%; } /* maincontent -- year/achive pages */ ul.year { text-align: center; padding-bottom: 40px; } ul.year li { display: inline; } table.yeartable { margin-left: auto; margin-right: auto; } table.yeartable td.yeardate, table.yeartable td.yearday { border-width: 1px; border-style: solid; border-color: $*border_color; } table.yeartable td.yearday { background-color: $*entry_bgcolor; text-align: center; } td.yearmonth { border-style: none; } /* footer */ ul.navfooter{ padding: 0px; margin: 0px; } ul.navfooter li { display: inline; margin: 0 5px 0 5px; } .clearfoot { clear: both; } /* misc */ .clear { height: 15px; } .skiplinks { text-align: center; } .headerimage { /* for formatting header image */ } .separator{ /* for formatting separators between entries */ height: 35px; } """; } function print_custom_stylesheet() { # override } # ----------------------------------- # SIDEBAR # ----------------------------------- function print_sidebar_box(string title, string body) { print safe """
"""; } function print_userpic () { var Page p= get_page(); var Image up_img = $p.journal.default_pic; if (defined $up_img) { """"""; } } function print_sidebar_calendar() { var string calendar; var Page p = get_page(); var YearMonth m = $p->get_latest_month(); var string month = $m->month_format(); if($m.has_entries) { $calendar = """ "; } $month = """ """; if ($calendar != "") { print $month; print $calendar; } } function print_sidebar_blurb () { var string blurb_title = ""; if ($*text_sidebar_blurb == "") { $blurb_title = ""; } else { $blurb_title = """ """; } var string blurb = ""; $blurb = """ """; if ($*show_blurb and ($*sidebar_blurb != "")) { print $blurb_title; print $blurb; } } function print_sidebar_linklist() { var Page p = get_page(); if (size $p.linklist <= 0) { return; } elseif (not $*linklist_support) { return; } var string list = ""; foreach var UserLink l ($p.linklist) { if ($l.title) { if ($l.is_heading) { $list = $list + """$*text_noentries_day
"""; } """$*text_reply_nocomments
"; return; } $.entry->print_linkbar(); """"""; print $m->month_format(); """ | $*text_view_month | |||||
"""+$*lang_dayname_short[$d]+" | \n"; } "