Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- layerinfo "type" = "layout";
- layerinfo "name" = "";
- # -----------------------------------
- # LAYER INFO
- # -----------------------------------
- layerinfo type = "layout";
- layerinfo name = "Flexible Squares";
- layerinfo lang = "en";
- layerinfo author_name = "Yati Mansor";
- layerinfo redist_uniq = "flexiblesquares/layout";
- layerinfo previews = "flexiblesquares/layout.jpg";
- # -----------------------------------
- # PROPGROUPS
- # -----------------------------------
- ### 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 colors when viewing Friends page";
- }
- 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 = "%";
- property use custom_control_strip_colors;
- property string base_theme {
- des = "Name of this theme";
- noui = 1;
- }
- set base_theme = "bluegray";
- }
- ### 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";
- }
- property use control_strip_bgcolor;
- property use control_strip_fgcolor;
- property use control_strip_bordercolor;
- property use control_strip_linkcolor;
- 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";
- }
- ### 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 string 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 string content_font_size
- {
- des = "Entry/date/subject font size";
- }
- property string date_font_size
- {
- des = "Date font size";
- }
- property string 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 string 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 string 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 string title_font_size
- {
- des = "Title font size";
- }
- property string 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";
- }
- ### IMAGES
- propgroup images
- {
- property string page_background_image
- {
- des = "Background image URL";
- 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";
- }
- ### TEXT
- propgroup text
- {
- property use text_meta_music;
- property use text_meta_mood;
- property use text_meta_location;
- property use text_meta_groups;
- 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_edit_tags
- {
- des = "Text for an entry's edit tags link";
- }
- property string text_memories
- {
- des = "Text to add an entry to the memories";
- }
- property use text_tell_friend;
- property string text_track
- {
- des = "Text to track new comments on an entry";
- }
- property string text_untrack
- {
- des = "Text to stop tracking new comments on an entry";
- }
- 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_edit_tags = "Tag";
- set text_memories = "Memories";
- set text_track = "Track";
- set text_untrack = "Untrack";
- 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";
- }
- ### 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;
- string_mode = "html";
- }
- 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_tags
- {
- des = "Show tags in the sidebar?";
- }
- property string sidebar_tags_display
- {
- des = "Display of tags in the sidebar";
- values = "cloud|Cloud|list|List";
- }
- property string text_sidebar_tags {
- des = "Title of the tags sidebar box";
- }
- set show_tags = false;
- set sidebar_tags_display = "list";
- set text_sidebar_tags = "Tags";
- property bool show_summary
- {
- des = "Show the page summary in the sidebar?";
- }
- property string text_sidebar_summary
- {
- des = "Title of the page summary sidebar box";
- }
- set show_summary = false;
- set text_sidebar_summary = "Page Summary";
- 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|tags|Tags|summary|Page Summary";
- }
- property string sidebar_order_2
- {
- des = "Second box in the sidebar";
- values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
- }
- property string sidebar_order_3
- {
- des = "Third box in the sidebar";
- values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
- }
- property string sidebar_order_4
- {
- des = "Fourth box in the sidebar";
- values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
- }
- property string sidebar_order_5
- {
- des = "Fifth box in the sidebar";
- values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
- }
- property string sidebar_order_6
- {
- des = "Sixth box in the sidebar";
- values = "userpic|Default Userpic|blurb|Blurb|linklist|Link List|calendar|Calendar|tags|Tags|summary|Page Summary";
- }
- set sidebar_order_1 = "userpic";
- set sidebar_order_2 = "blurb";
- set sidebar_order_3 = "linklist";
- set sidebar_order_4 = "calendar";
- set sidebar_order_5 = "tags";
- set sidebar_order_6 = "summary";
- }
- ### CUSTOM CSS
- propgroup customcss
- {
- property use include_default_stylesheet;
- property bool include_default_stylesheet_with_linked
- {
- des = "Use layout's stylesheet(s) when including custom external stylesheet";
- note = "This option will have no effect unless the \"Use external stylesheets\" option is turned on and a custom external stylesheet URL has been provided. It will override the previous option's setting.";
- }
- property bool external_stylesheet
- {
- des = "Use external stylesheets";
- }
- property string external_stylesheet_url
- {
- des = "Custom external stylesheet URL";
- note = "If you have a custom external stylesheet that you'd like to use, enter its URL here. Be sure to select \"Yes\" in the above option.";
- }
- property use custom_css;
- set include_default_stylesheet_with_linked = false;
- set external_stylesheet = true;
- set external_stylesheet_url = "";
- }
- function prop_init () {
- if ($*control_strip_bgcolor.as_string == "") {
- $*control_strip_bgcolor = $*entry_bgcolor;
- }
- if ($*control_strip_fgcolor.as_string == "") {
- $*control_strip_fgcolor = $*entry_fgcolor;
- }
- if ($*control_strip_bordercolor.as_string == "") {
- $*control_strip_bordercolor = $*border_color;
- }
- if ($*control_strip_linkcolor.as_string == "") {
- $*control_strip_linkcolor = $*link_color;
- }
- $*theme_bgcolor = $*entry_bgcolor;
- $*theme_fgcolor = $*entry_fgcolor;
- $*theme_bordercolor = $*entrytitle_bgcolor;
- $*theme_linkcolor = $*link_color;
- }
- # -----------------------------------
- # 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 (clean_url($*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 or viewer_sees_vbox()) and $*sidebar_position == "right")
- {
- $maincontent_prop = "margin-right: ${float_margin}px;";
- $sidebar_prop = "float: right;";
- }
- if (($*show_sidebar or viewer_sees_vbox()) and $*sidebar_position == "left")
- {
- $maincontent_prop = "margin-left: ${float_margin}px;";
- $sidebar_prop = "float: left;";
- }
- if (not $*show_sidebar and not viewer_sees_vbox())
- {
- $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 {
- 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 {
- 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;
- }
- #sidebar_summary li.sbaritem {
- margin: 0 10px;
- padding: 3px 0;
- border-bottom: 1px $*border_color solid;
- }
- 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, .tagcloud
- {
- 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, .subject a:hover {
- color: $*subject_fgcolor;
- /*color: $*comments_link_color;*/
- text-decoration: none;
- }
- /*.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: 95% !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;
- }
- * html div.subcontent {
- /* fixes an IE reply page bug */
- height: 1%;
- clear: none;
- }
- * html div.box#commentform {
- /* fixes an IE reply page bug */
- position: absolute;
- border-width: 1px;
- border-style: solid;
- border-color: $*border_color;
- background-color: $*content_bgcolor;
- }
- """;
- print_custom_control_strip_css();
- }
- function print_custom_stylesheet()
- {
- # override
- }
- # -----------------------------------
- # SIDEBAR
- # -----------------------------------
- function Page::lay_sidebar_view_summary() : string
- {
- return "";
- }
- function print_sidebar_box(string title, string body, string id)
- {
- var string box_id = ($id == "") ? "" : " id='$id'";
- print safe """
- <div class="sbarbody"$box_id><ul class="sbarlist">$title</ul><ul class="sbarlist sbarcontent">$body</ul></div>
- """;
- }
- function print_sidebar_box(string title, string body)
- {
- print_sidebar_box($title, $body, "");
- }
- function print_userpic () {
- var Page p= get_page();
- var Image up_img = $p.journal.default_pic;
- if (defined $up_img) {
- """<div class="defaultuserpic">
- <a href="$p.journal.userpic_listing_url"><img border="0" src="$up_img.url" height="$up_img.height" width="$up_img.width" alt="$p.journal.name" title="$p.journal.name" /></a>
- </div>""";
- }
- }
- 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 = """<table class="calendar" align="center">""";
- var YearWeek[] theWeeks = $m.weeks;
- foreach var YearWeek w ($theWeeks) {
- $calendar = $calendar + "<tr>";
- var YearDay[] theDays = $w.days;
- var int pre = $w.pre_empty;
- if($pre > 0) {
- $calendar = $calendar + """<td colspan="$pre" valign="top"> </td>""";
- }
- foreach var YearDay d ($theDays) {
- if ($d.num_entries) {
- $calendar = $calendar + """<td valign="top" class="sbarcalendarposts"><a href="$d.url">$d.day</a></td>""";
- } else {
- $calendar = $calendar + """<td valign="top" class="sbarcalendar">$d.day</td>""";
- }
- }
- $calendar = $calendar + "</tr>\n";
- }
- $calendar = $calendar + "</table>";
- }
- if ($calendar != "") {
- print_sidebar_box("<li class='sbartitle'>$month</li>", $calendar, "sidebar_calendar");
- }
- }
- function print_sidebar_blurb ()
- {
- var string blurb_title = "";
- if ($*text_sidebar_blurb == "")
- {
- $blurb_title = "";
- }
- else
- {
- $blurb_title = """<div class="sbarbody"><ul class="sbarlist"><li class="sbartitle">$*text_sidebar_blurb</li></ul></div>""";
- }
- var string blurb = "";
- $blurb = """<div class="sbarbody2">$*sidebar_blurb</div>""";
- if ($*show_blurb and ($*sidebar_blurb != ""))
- {
- print safe $blurb_title;
- print $blurb;
- }
- }
- function print_sidebar_linklist()
- {
- var Page p = get_page();
- if (size $p.linklist <= 0 or not $*linklist_support)
- {
- return;
- }
- var string list = "";
- foreach var UserLink l ($p.linklist)
- {
- if ($l.title) {
- if ($l.is_heading)
- {
- $list = $list + """<li class="sbartitle">$l.title</li>""";
- }
- else
- {
- $list = $list + """<li class="sbaritem"><a href="$l.url">$l.title</a></li>""";
- }
- }
- else
- {
- $list = $list + """<li class="sbarblank"> </li>""";
- }
- }
- var string list_title = ($*text_sidebar_links != "") ? "<li class='sbartitle'>$*text_sidebar_links</li>" : "";
- print_sidebar_box($list_title, $list, "sidebar_linklist");
- }
- function print_sidebar_tags()
- {
- var Page p= get_page();
- var TagDetail[] tag_list = $p->visible_tag_list();
- if( size $tag_list == 0)
- {
- return;
- }
- var string tags = "";
- if($*sidebar_tags_display == "list")
- {
- foreach var TagDetail t ($tag_list)
- {
- $tags = $tags + """<li class="sbaritem"><a rel="tag" href="$t.url">$t.name</a></li> """ + "\n";
- }
- }
- elseif($*sidebar_tags_display == "cloud")
- {
- var int tag_category = 10; # number of tag categories
- var int basefontsize = 80; # size of the first tag category in percent of the default font size of the page
- var int increment = 20; # The difference in size between tag categories.
- var int max_use_count = 0;
- var int min_use_count;
- var int x;
- var int category;
- # Define a maximum and minimum number of uses of the tags:
- $min_use_count = $tag_list[0].use_count;
- foreach var TagDetail td ($tag_list)
- {
- if ($td.use_count > $max_use_count)
- {
- $max_use_count = $td.use_count;
- }
- elseif ($td.use_count < $min_use_count)
- {
- $min_use_count = $td.use_count;
- }
- }
- # Avoid a division by zero
- if ($max_use_count == $min_use_count)
- {
- $max_use_count = $max_use_count + 1;
- }
- # Put the tags into categories according to the number of times they're used,
- # then use it to determine the size of the tag:
- foreach var TagDetail td ($tag_list)
- {
- # Create different categories according to the number of uses of the tag
- $category = (($td.use_count - $min_use_count) * $tag_category / ($max_use_count - $min_use_count));
- if ($category == $tag_category) { $category = $tag_category - 1; }
- # Convert those categories into sizes
- $x = ($category * $increment) + $basefontsize;
- $tags = $tags + """<span style="font-size: $x%;"><a href="$td.url" title="$td.use_count" class="tagcategory$category">$td.name</a></span> """;
- }
- # Enclose the entire list in an li tag as required by the layout.
- $tags = """<li class="tagcloud">""" + $tags + """</li>""";
- }
- var string tags_title = ($*text_sidebar_tags != "") ? "<li class='sbartitle'>$*text_sidebar_tags</li>" : "";
- print_sidebar_box($tags_title, $tags, "sidebar_tags");
- }
- function print_sidebar_summary()
- {
- var Page page = get_page();
- var string summary_title = ($*text_sidebar_summary != "") ? "<li class='sbartitle'>$*text_sidebar_summary</li>" : "";
- var string summary = $page->lay_sidebar_view_summary();
- if ($summary != "")
- {
- print_sidebar_box($summary_title, $summary, "sidebar_summary");
- }
- }
- function RecentPage::lay_sidebar_view_summary() : string
- {
- var string return = "";
- var string item;
- foreach var Entry e ($.entries) {
- $item = "";
- var string datetime = $e.time->date_format() + " " + $e.time->time_format();
- var string subject = $e.subject != "" ? $e->plain_subject() : $*text_nosubject;
- if ($e.security) { $item = $item + " $e.security_icon"; }
- $item = $e.poster.username != $.journal.username ?
- $item + """ $e.poster — <a href="#$e.journal.username$e.itemid" title="$datetime">$subject</a>""" :
- $item + """ <a href="#$e.journal.username$e.itemid" title="$datetime">$subject</a>""";
- $item = $item + """ <span class="count">[+<a href="$e.permalink_url">$e.comments.count</a>]</span>""";
- $return = $return + """<li class="sbaritem">$item</li>""";
- }
- return $return;
- }
- function FriendsPage::lay_sidebar_view_summary() : string
- {
- var string return = "";
- var string item;
- foreach var Entry e ($.entries) {
- $item = "";
- var string datetime = $e.time->date_format() + " " + $e.time->time_format();
- var string poster = $e.poster.username != $e.journal.username ?
- "$e.poster in $e.journal" : $e.journal->as_string();
- var string subject = $e.subject != "" ? $e->plain_subject() : $*text_nosubject;
- if ($e.security) { $item = $item + " $e.security_icon"; }
- $item = $item + """ $poster — <a href="#$e.journal.username$e.itemid" title="$datetime">$subject</a>""";
- $item = $item + """ <span class="count">[+<a href="$e.permalink_url">$e.comments.count</a>]</span>""";
- $return = $return + """<li class="sbaritem">$item</li>""";
- }
- return $return;
- }
- function comment_count(Comment[] c) : int
- {
- var int count = size $c;
- foreach var Comment comment ($c)
- {
- $count = $count + comment_count($comment.replies);
- }
- return $count;
- }
- function EntryPage::lay_sidebar_view_summary() : string
- {
- var string return = "";
- var string item;
- foreach var Comment c ($.comments) {
- $item = "";
- var string datetime = $c.time->date_format() + " " + $c.time->time_format();
- var string poster = defined $c.poster ? $c.poster->as_string() : "<i>$*text_poster_anonymous</i>";
- var string subject = $c.subject != "" ? $c.subject : $*text_nosubject;
- $item = $item + """$poster — <a href="#$c.anchor" title="$datetime">$subject</a>""";
- var int count = comment_count($c.replies);
- $item= $item + """ <span class="count">[+<a href="$c.thread_url">$count</a>]</span>""";
- $return = $return + """<li class="sbaritem">$item</li>""";
- }
- return $return;
- }
- function MonthPage::lay_sidebar_view_summary () : string
- {
- var string return = "";
- foreach var MonthDay d ($.days) {
- if ($d.has_entries) {
- $return = $return + """<li class="sbaritem"><a href="#$d.day">""" + lang_ordinal($d.day) + "</a></li>";
- }
- }
- return $return;
- }
- function YearPage::lay_sidebar_view_summary () : string
- {
- var string return = "";
- foreach var YearMonth m ($.months) {
- if ($m.has_entries) {
- $return = $return + """<li class="sbaritem"><a href="#$m.month">""" + $m->month_format() + "</a></li>";
- }
- }
- return $return;
- }
- function sidebar_order(string order)
- {
- if ($order == "userpic" and $*show_default_userpic)
- {
- print_userpic();
- }
- if ($order == "blurb" and $*show_blurb)
- {
- print_sidebar_blurb();
- }
- if ($order == "linklist" and $*show_linklist)
- {
- print_sidebar_linklist();
- }
- if ($order == "tags" and $*show_tags)
- {
- print_sidebar_tags();
- }
- if ($order == "summary" and $*show_summary)
- {
- print_sidebar_summary();
- }
- if ($order == "calendar" and $*show_calendar)
- {
- print_sidebar_calendar();
- }
- if (viewer_sees_vbox() and $order == "calendar") {
- var Page p = get_page();
- """<div style="margin: 10px auto 10px auto; width: 160px;">""";
- $p->print_vbox();
- "</div>";
- }
- }
- function print_sidebar()
- {
- sidebar_order($*sidebar_order_1);
- sidebar_order($*sidebar_order_2);
- sidebar_order($*sidebar_order_3);
- sidebar_order($*sidebar_order_4);
- sidebar_order($*sidebar_order_5);
- sidebar_order($*sidebar_order_6);
- # Make sure the ad prints
- if (viewer_sees_vbox() and $*sidebar_order_1 != "calendar" and $*sidebar_order_2 != "calendar"
- and $*sidebar_order_3 != "calendar" and $*sidebar_order_4 != "calendar" and $*sidebar_order_5 != "calendar"
- and $*sidebar_order_6 != "calendar") {
- var Page p = get_page();
- """<div style="margin: 10px auto 10px auto; width: 160px;">""";
- $p->print_vbox();
- "</div>";
- }
- }
- # -----------------------------------
- # PAGE
- # -----------------------------------
- # Header
- function Page::lay_print_header()
- "Prints header"
- {
- var Page page = get_page();
- var string title = $this->title();
- print """
- <div id="header">
- <ul class="navheader">""";
- var string website_name = $.journal.website_name ? $.journal.website_name : $*text_website_default_name;
- if ($.journal.website_url != "")
- {
- println safe """<li><a href="$.journal.website_url">$website_name</a></li>""";
- }
- foreach var string v ($.views_order) {
- if ($.view == $v) {
- """<li class="view">"""; println lang_viewname($v) + "</li>";
- } else {
- println "<li><a href=\""+$.view_url{$v}+"\">"+lang_viewname($v)+"</a></li>";
- }
- }
- print safe """
- </ul>
- <div class="title">
- $title
- </div>
- <div class="subtitle">
- $.global_subtitle
- </div>
- </div>
- """;
- }
- # Footer
- function Page::lay_print_footer()
- {
- """
- <div class="clearfoot"> </div>
- """;
- }
- function Page::print_stylesheets() {
- if ($*external_stylesheet and $*external_stylesheet_url != "") {
- if ($*include_default_stylesheet_with_linked) {
- println safe """<link rel="stylesheet" type="text/css" media="screen" href="$.stylesheet_url" />""";
- }
- println safe """<link rel="stylesheet" type="text/css" media="screen" href="$*external_stylesheet_url" />""";
- }
- elseif ($*external_stylesheet and $*include_default_stylesheet) {
- println safe """<link rel="stylesheet" type="text/css" media="screen" href="$.stylesheet_url" />""";
- }
- elseif ($*include_default_stylesheet) {
- println """<style type="text/css">""";
- start_css();
- print_stylesheet();
- end_css();
- println "</style>";
- }
- elseif ($*base_theme == "circular" or $*base_theme == "circular-brown") {
- var string url;
- var string color = ($*base_theme == "circular-brown" ? "/brown" : "");
- if ($*show_sidebar) {
- if ($*sidebar_position == "left") {
- $url = "$*STATDIR/flexiblesquares/circular$color/style-2cl.css";
- } else {
- $url = "$*STATDIR/flexiblesquares/circular$color/style-2cr.css";
- }
- } else {
- $url = "$*STATDIR/flexiblesquares/circular$color/style-1c.css";
- }
- println safe """<link rel="stylesheet" type="text/css" media="screen" href="$url" />""";
- println """<style type="text/css">""";
- start_css();
- print_custom_control_strip_css();
- end_css();
- println "</style>";
- }
- if ($*custom_css != "") {
- println """<style type="text/css">""";
- start_css();
- println safe $*custom_css;
- end_css();
- println """</style>""";
- }
- }
- function Page::print () {
- var Page page = get_page();
- var string title = $this->title();
- var string page_align = "";
- if ($*page_alignment == "left") {
- $page_align = " margin-left: 20px; margin-right: auto;";
- }
- elseif ($*page_alignment == "right") {
- $page_align = " margin-left: auto; margin-right: 20px;";
- }
- elseif ($*page_alignment == "center") {
- $page_align = " margin-left: auto; margin-right: auto;";
- }
- """
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=7"/>
- """;
- $this->print_head();
- $this->print_stylesheets();
- print safe """<title>$title</title>""";
- $this->print_custom_head();
- """
- </head>
- <body class="lj-view-$.view">
- <a name="top"></a>
- """;
- $this->print_control_strip();
- if (viewer_sees_hbox_top()) {
- """<div style="background-color: $*outer_table_bgcolor; border: 1px solid $*border_color; padding: 15px; text-align: center; width: 728px; margin-bottom: 10px;$page_align">""";
- $this->print_hbox_top();
- "</div>";
- }
- """
- <div class="headerimage"></div>
- <div id="content-outer">
- <div id="content">
- """;
- $this->lay_print_header();
- if ($*show_sidebar) {
- """
- <div id="sidebar">""";
- print_sidebar();
- """
- <!--div class="clear"> </div-->
- </div>
- """;
- } elseif (viewer_sees_vbox()) {
- """<div id="sidebar">""";
- """<div style="margin: 0 auto 0 auto; width: 160px;">""";
- $this->print_vbox();
- "</div>";
- """<div class="clear"> </div>""";
- "</div>";
- }
- """
- <div id="maincontent">""";
- $this->print_body();
- "
- </div>";
- $this->lay_print_footer();
- "</div></div>";
- if (viewer_sees_hbox_bottom()) {
- """<div style="background-color: $*outer_table_bgcolor; border: 1px solid $*border_color; padding: 15px; text-align: center; width: 728px; margin-top: 10px;$page_align">""";
- $this->print_hbox_bottom();
- "</div>";
- }
- "</body>
- </html>";
- }
- function Entry::print_linkbar()
- {
- # Links (memories, edit, prev, next)
- var Page p = get_page();
- if ($p.view == "entry" or $p.view == "reply")
- {
- var Link prev = $this->get_link("nav_prev");
- var Link next = $this->get_link("nav_next");
- var string{} link_text = {
- "edit_entry" => $*text_edit,
- "edit_tags" => $*text_edit_tags,
- "mem_add" => $*text_memories,
- "tell_friend" => $*text_tell_friend,
- "watch_comments" => $*text_track,
- "unwatch_comments" => $*text_untrack,
- };
- print safe """
- <div class="clear"> </div>
- <div class="skiplinks">
- <a href="$prev.url">$*text_previous_entry</a> | """;
- var Link link;
- var string url;
- var string text;
- foreach var string link_key ($.link_keyseq) {
- $link = $this->get_link($link_key);
- $url = $link.url;
- $text = $link_text{$link_key} != "" ? $link_text{$link_key} : $link.caption;
- if (defined $link) {
- print safe """<a href="$url">$text</a> | """;
- }
- }
- print safe """<a href="$next.url">$*text_next_entry</a>
- </div>
- <div class="clear"> </div>""";
- }
- }
- function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor)
- {
- """<a name="$e.journal.username$e.itemid"></a>""";
- $e->print_linkbar();
- # Userpic
- var string userpic = "";
- if ($*show_entry_userpic)
- {
- if ($p.view == "read" or $p.view == "network" or $p.view == "entry" or $p.view == "reply")
- {
- if (defined $e.userpic)
- {
- $userpic = $userpic + """<img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name" title="$e.poster.name""";
- if ($e.poster.username != $e.journal.username)
- {
- $userpic = $userpic + " in $e.journal.name";
- }
- $userpic = $userpic + "\">";
- }
- }
- elseif ($p.journal_type == "C" and $p.view == "recent")
- {
- if (defined $e.userpic)
- {
- $userpic = $userpic + """<img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name" title="$e.poster.name" />""";
- }
- }
- else
- {
- if (defined $e.userpic)
- {
- $userpic = $userpic + """<div class="userpic"><img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name" title="$e.poster.name" /></div>""";
- }
- }
- }
- print """
- <div class="subcontent">
- """;
- if (($p.view == "recent" and $p.journal_type != "C" ) or $p.view == "day")
- {
- print """$userpic""";
- }
- else
- {
- if ($p.view == "recent" and $p.journal_type == "C" )
- {
- """<div class="userpicfriends" style="background-color: $*entry_bgcolor;">""";
- }
- else
- {
- """<div class="userpicfriends" style="background-color: $bgcolor;">""";
- }
- print """$userpic""";
- # Poster
- if ($p.view == "read" or $p.view == "network" or $p.view == "entry" or $p.view == "reply")
- {
- var UserLite linkto;
- $linkto = $e.poster;
- #print "$e.poster.username";
- """<br /><a href=\"""" + $linkto->base_url() + "\">";
- "<font color=\"$fgcolor\">$linkto.username</font></a>";
- }
- elseif ($p.journal_type == "C" and $p.view == "recent")
- {
- var UserLite linkto;
- $linkto = $e.poster;
- #print "$e.poster.username";
- """<br /><a href=\"""" + $linkto->base_url() + "\">";
- "$linkto.username</a>";
- }
- if (($p.view == "read" or $p.view == "network" or $p.view == "entry" or $p.view == "reply") and $e.poster.username != $e.journal.username)
- {
- var UserLite linkto;
- $linkto = $e.journal;
- """<br />[<a href=\"""" + $linkto->base_url() + "\">";
- "<font color=\"$fgcolor\">$linkto.username</font></a>]";
- }
- if ($p.view == "recent" and $p.journal_type == "C")
- {
- print "</div>";
- }
- if ($p.view != "recent" and $p.view != "day")
- {
- print """</div>""";
- }
- }
- # Date, time, subject
- var string time = "";
- $time = $time + """ """;
- $time = $time + $e.time->time_format("short");
- var string date = "";
- $date = $date + $e.time->date_format("long_day");
- """
- <div class="datesubject"><div class="date">""";
- print $e.time->date_format("%%mm%%/%%dd%%/%%yy%%");
- "$time
- </div>";
- """
- <div class="subject">""";
- if ($e.security != "")
- {
- $e.security_icon->print();
- }
- if ($p.view != "entry") {
- print $e->formatted_subject({"class"=>"subj-link"});" ";
- }
- else { print "$e.subject "; }
- """</div>
- </div>
- """;
- """
- <div class="entry">
- <div class="entry_text">""";
- $e->print_text();
- print "</div> ";
- # Currents
- var string currents ="";
- $e->print_metadata();
- # Comments
- """
- <div class="clear"> </div>
- <div class="comments">""";
- if ($p.view != "entry" or $p.view != "reply")
- {
- $e.comments->print();
- }
- elseif ($e.comments.enabled)
- {
- $e.comments->print_postlink();
- }
- else
- {
- " ";
- }
- """
- </div>
- </div>
- </div>
- <div class="separator"></div>
- <div class="clear"> </div>""";
- }
- function Page::print_entry(Entry e) {
- print_entry($this, $e, null Color, null Color);
- }
- function FriendsPage::print_entry (Entry e)
- {
- if ($*use_friends_colours)
- {
- var Friend f = $.friends{$e.journal.username};
- print_entry($this, $e, $f.bgcolor, $f.fgcolor);
- }
- else
- {
- print_entry($this, $e, $*entry_bgcolor, $*entry_fgcolor);
- }
- }
- function EntryPage::print_entry(Entry e) {
- print_entry($this, $e, $*entry_bgcolor, $*entry_fgcolor);
- }
- function ReplyPage::print_entry(Entry e) {
- print_entry($this, $e, $*entry_bgcolor, $*entry_fgcolor);
- }
- function Entry::print_metadata() {
- if (size $.metadata)
- {
- print """<div class="clear"> </div><div class="clear"> </div>
- <div class="currents">""";
- var string currents;
- foreach var string k ($.metadata)
- {
- var string text = $k;
- var string val = $.metadata{$k};
- if ($k == "mood")
- {
- $text = $*text_meta_mood;
- }
- elseif ($k == "music")
- {
- $text = $*text_meta_music;
- }
- elseif ($k == "location")
- {
- $text = $*text_meta_location;
- }
- elseif ($k == "groups")
- {
- $text = $*text_meta_groups;
- }
- if ($k == "mood" and defined $.mood_icon)
- {
- var Image i = $.mood_icon;
- $val = "<img src='$i.url' width='$i.width' height='$i.height' align='middle' alt='' /> $val";
- }
- $currents = $currents + """<div class="current$k"><strong>$text:</strong> $val</div>""";
- }
- $currents = $currents + "</div>";
- println safe "$currents";
- }
- }
- function RecentPage::lay_print_footer()
- {
- var string range = "most recent entries";
- var string sep;
- var string back;
- var string forward;
- if ($.nav.skip > 0)
- {
- $range = "$.nav.skip entries back";
- }
- if ($.nav.forward_url != "" or $.nav.backward_url != "")
- {
- if ($.nav.backward_url != "")
- {
- $back = """<li><a href="$.nav.backward_url">""" + get_plural_phrase($.nav.backward_count, "text_skiplinks_back") + """</a></li>""";
- }
- if ($.nav.forward_url != "")
- {
- $forward = """<li><a href="$.nav.forward_url">""" + get_plural_phrase($.nav.forward_count, "text_skiplinks_forward") + """</a></li>""";
- }
- }
- print safe """
- <div class="clearfoot"> </div>
- <div id="footer">
- <ul class="navfooter">
- $back
- <li class="viewing">viewing $range</li>
- $forward
- </ul>
- </div>
- <div class="clearfoot"> </div>
- """;
- }
- function RecentPage::print_body
- {
- foreach var Entry e ($.entries)
- {
- $this->print_entry($e);
- if ($e->viewer_sees_ebox()) {
- """<div style="margin:0px 10px 10px 30px; overflow: hidden;">""";
- $e->print_ebox();
- """
- </div>
- <div class="separator"></div>
- <div class="clear"> </div>
- """;
- }
- }
- }
- function EntryPage::print_body()
- {
- $this->print_entry($.entry);
- if ($.entry->viewer_sees_ebox()) {
- """<div style="margin:0px 10px 10px 30px; overflow: hidden;">""";
- $.entry->print_ebox();
- """
- </div>
- <div class="separator"></div>
- <div class="clear"> </div>
- """;
- }
- if ($.multiform_on and $.entry.comments.enabled and $.comment_pages.total_subitems > 0)
- {
- $this->print_multiform_start();
- }
- if ($.entry.comments.enabled)
- {
- """
- <div class="box">
- <center>""";
- $.comment_pages->print();
- """
- <b>( """;
- $this->print_reply_link({"target" => "topcomment", "linktext" => "Post a new comment"});
- """ )</b></center>""";
- $this->print_reply_container({"target" => "topcomment"});
- $this->print_comments($.comments);
- """
- </div>""";
- }
- if ($this.multiform_on and $.entry.comments.enabled and $.comment_pages.total_subitems > 0)
- {
- """
- <div class="box">""";
- $this->print_multiform_actionline();
- $this->print_multiform_end();
- """
- <center>
- <b>( <a href="$.entry.comments.post_url">Post a new comment</a> )</b>""";
- $.comment_pages->print();
- """
- <br />
- </center>
- </div>""";
- }
- """ <div class="separator"></div>
- <div class="clear"> </div>
- """;
- }
- # -----------------------------------
- # ENTRY
- # -----------------------------------
- function EntryPage::print_comments( Comment[] comments )
- {
- if ( size $comments == 0 )
- {
- return;
- }
- foreach var Comment c ( $comments )
- {
- var int indent = ($c.depth - 1) * 30;
- var string partialcomment = $c.full ? " ljcmt_full" : "partial";
- var string margin = "";
- if ($*userpic_position == "left")
- {
- $margin = "right";
- }
- else
- {
- $margin = "left";
- }
- """<a name="$c.anchor"></a>""";
- """<div class="commentbox$partialcomment" id="$c.dom_id" style="margin-$*userpic_position: ${indent}px">\n""";
- if ( $c.full )
- {
- $this->print_comment( $c );
- }
- else
- {
- $this->print_comment_partial( $c );
- }
- "</div>";
- $this->print_comments( $c.replies );
- }
- }
- function EntryPage::print_comment (Comment comment) {
- var string subject = $comment.subject ? $comment.subject : $*text_nosubject;
- var string date = $comment.time->date_format();
- var string poster = isnull $comment.poster ? $*text_poster_anonymous : $comment.poster->as_string();
- #Comment Userpic
- if (defined $comment.userpic and $*show_entry_userpic)
- {
- var int w = $comment.userpic.width;
- var int h = $comment.userpic.height;
- var string alt = $comment.metadata{"picture_keyword"};
- if ($*comment_userpic_style == "small")
- {
- $w = $w / 2;
- $h = $h / 2;
- }
- if ($alt != "")
- {
- $alt = ": " + $alt;
- }
- """
- <div class="datesubjectcomment">
- <img class="userpiccomment" src="$comment.userpic.url" width="$w" height="$h" alt="$comment.poster.name$alt" title="$comment.poster.name$alt" />""";
- print """$poster on """;
- print $comment->time_display("long", "");
- }
- else
- {
- print """
- <div class="datesubjectcomment">$poster on """;
- print $comment->time_display("long", "");
- }
- if (defined $comment.subject_icon or $comment.subject != "")
- {
- print "<br />$comment.subject_icon <strong>$comment.subject</strong>" + "<br />";
- }
- if ($comment.metadata{"poster_ip"})
- {
- print "<br />" + $*text_comment_ipaddr + "(" + $comment.metadata{"poster_ip"} + ")" + "<br />";
- }
- "</div>";
- print """
- <div class="commentreply">"""; $comment->print_text(); """</div>\n""";
- var string alignlinks = "";
- if ($*userpic_position == "left")
- {
- $alignlinks = "right";
- }
- else
- {
- $alignlinks = "left";
- }
- "<div style='margin-top: 3px; font-size: smaller; text-align: $alignlinks;'>";
- if ($comment.frozen)
- {
- "($*text_comment_frozen)";
- }
- else
- {
- print "(";
- ###$comment->print_reply_link({"linktext" => $*text_comment_reply});
- if($comment.screened == true) {
- ### if comment screened - show link for unscreen
- var Link link;
- $link = $comment->get_link("unscreen_to_reply");
- """<a href="$link.url" title="$link.caption">$link.caption</a>""";
- } else {
- ### showing reply link if comment not screened
- $comment->print_reply_link({ "linktext" => $*text_comment_reply });
- }
- ") ";
- }
- if ($comment.parent_url != "")
- {
- "(<a href='$comment.parent_url'>$*text_comment_parent</a>) ";
- }
- if ($comment.thread_url != "")
- {
- """(<a href="$comment.thread_url">$*text_comment_thread</a>) """;
- var Link expand_link = $comment->get_link("expand_comments");
- if (defined $expand_link) {
- "(" + $comment->expand_link() + ") ";
- }
- }
- "(<a href='$comment.permalink_url'>$*text_permalink</a>)";
- """<div style="padding: 10px; text-align: $alignlinks;">""";
- if ($this.multiform_on)
- {
- """<label for="ljcomsel_$comment.talkid">$*text_multiform_check</label>""";
- $comment->print_multiform_check();
- }
- $comment->print_linkbar();
- if (not $comment.frozen) {
- $comment->print_reply_container({"class" => "quickreply"});
- }
- "</div></div>\n";
- }
- function EntryPage::print_comment_partial( Comment c )
- {
- var string subject = $c.subject ? $c.subject : $*text_nosubject;
- var string date = $c->time_display("long", "");
- var string poster = isnull $c.poster ? $*text_poster_anonymous : $c.poster->as_string();
- print safe """<a href="$c.permalink_url">$subject</a> - $poster on $date""";
- var Link expand_link = $c->get_link("expand_comments");
- if ($c.thread_url != "" and defined $expand_link) {
- " " + $c->expand_link();
- }
- }
- # -----------------------------------
- # DAY
- # -----------------------------------
- function DayPage_near_days(DayPage p) {
- if ($p.prev_url != "") {
- """<a href="$p.prev_url">$*text_day_prev</a>""";
- }
- if ($p.prev_url != "" and $p.next_url != "") {
- """ | """;
- }
- if ($p.next_url != "") {
- """<a href="$p.next_url">$*text_day_next</a>""";
- }
- }
- function DayPage::print_body() {
- """
- <div class="clear"> </div>
- <div class="skiplinks">""";
- DayPage_near_days($this);
- """</div>
- <div class="clear"> </div>""";
- if ($.has_entries)
- {
- foreach var Entry e ($.entries)
- {
- $this->print_entry($e);
- if ($e->viewer_sees_ebox()) {
- """<div style="margin:0px 10px 10px 30px; overflow: hidden;">""";
- $e->print_ebox();
- """
- </div>
- <div class="separator"></div>
- <div class="clear"> </div>
- """;
- }
- }
- }
- else {
- """<p style="text-align: center">$*text_noentries_day</p>""";
- }
- """
- <div class="clear"> </div>
- <div class="skiplinks">""";
- DayPage_near_days($this);
- """\n</div>
- <div class="clear"> </div>
- """;
- }
- function CommentInfo::print_postlink() {
- var Page p = get_page();
- if ($.maxcomments) {
- print safe "$*text_max_comments";
- } else {
- if ($p.view == "entry") {
- $p->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment});
- } else {
- print safe "<a href=\"$.post_url\">"+($p.view == "read" or $p.view == "network" ? $*text_post_comment_friends : $*text_post_comment)+"</a>";
- }
- }
- }
- function CommentInfo::print() {
- if (not $.enabled) { return; }
- if ($.count > 0 or $.screened) {
- $this->print_readlink();
- " | ";
- }
- $this->print_postlink();
- }
- # -----------------------------------
- # REPLY
- # -----------------------------------
- function ReplyPage::print_body
- {
- if (not $.entry.comments.enabled)
- {
- print "
- <h2>$*text_reply_nocomments_header</h2>
- <p>$*text_reply_nocomments</p>";
- return;
- }
- if ($.replyto isa Entry) {
- var Entry en = $.replyto as Entry;
- $this->print_entry($en);
- } else {
- $.entry->print_linkbar();
- """<div class="subcontent">""";
- if (defined $.replyto.userpic)
- {
- print """<div class="userpic">$.replyto.userpic</div>""";
- }
- var string poster = isnull $.replyto.poster ? $*text_poster_anonymous : $.replyto.poster->as_string();
- var Page p;
- print """
- <div class="datesubject">
- <div class="replytoposter">""";
- print $.replyto.poster.name + " (";
- print $poster + ") ";
- print "wrote";
- if ($.journal_type == "C")
- {
- print " in ";
- print $.replyto.journal;
- print " ";
- }
- print " "+lang_at_datetime($.replyto.time);
- print """
- </div>
- <div class="replytosubject">$.replyto.subject</div>
- </div>
- <div class="entry">"""; $.replyto->print_text(); """</div>
- </div>
- <div class="clear"> </div>""";
- }
- """<div style="margin:0px 10px 50px 30px; overflow: hidden;">""";
- $.entry->print_ebox();
- "</div>";
- """<div class="box">
- <center><b>( <a href="$.entry.permalink_url">Read comments</a> )</b> </center>
- Post a comment in response:<br/>""";
- $.form->print();
- "
- </div>
- ";
- }
- # -----------------------------------
- # MONTH
- # -----------------------------------
- function MonthPage::print_body {
- "<form method='post' action='$.redir.url'>
- <center><br />";
- $.redir->print_hiddens();
- if ($.prev_url != "")
- {
- "[<a href='$.prev_url'><<<</a>]\n";
- }
- if (size $.months > 1)
- {
- "<select name='redir_key'>\n";
- foreach var MonthEntryInfo mei ($.months)
- {
- var string sel;
- if ($mei.date.year == $.date.year and $mei.date.month == $.date.month)
- {
- $sel = " selected='selected'";
- }
- "<option value='$mei.redir_key'$sel>" + $mei.date->date_format($*lang_fmt_month_long) + "</option>";
- }
- "</select>\n<input type='submit' value='View' />";
- }
- if ($.next_url != "")
- {
- "\n[<a href='$.next_url'>>>></a>]\n";
- }
- """
- </center></form>\n
- <br /><br />
- <div class="subcontent">
- <div class="entry"><dl>""";
- foreach var MonthDay d ($.days)
- {
- if ($d.has_entries)
- {
- "<dt><a href=\"$d.url\"><b>";
- print lang_ordinal($d.day);
- "</b></a></dt>\n<dd>";
- $d->print_subjectlist();
- "</dd>\n";
- }
- }
- "</dl>
- </div>
- </div>";
- }
- # -----------------------------------
- # YEAR
- # -----------------------------------
- function YearPage::print_body
- {
- $this->print_year_links();
- foreach var YearMonth m ($.months)
- {
- $this->print_month($m);
- }
- }
- function YearPage::print_year_links() {
- """<ul class="year">\n""";
- foreach var YearYear y ($.years) {
- if ($y.displayed) {
- """<li class="active">$y.year</li>\n""";
- } else {
- """<li><a href="$y.url">$y.year</a></li>\n""";
- }
- }
- """</ul>\n""";
- }
- function YearPage::print_month(YearMonth m) {
- if (not $m.has_entries)
- {
- return;
- }
- """<table class="yeartable" align="center">\n
- <tr><td colspan="4" class="yearmonth" align="left">""";
- print $m->month_format();
- print safe """</td>
- <td colspan="3" class="yearmonth" align="right"><a href="$m.url">$*text_view_month</a></td>
- </tr>\n<tr>""";
- foreach var int d (weekdays()) {
- """<td width="50px" class="yearday">"""+$*lang_dayname_short[$d]+"</td>\n";
- }
- "</tr>\n";
- foreach var YearWeek w ($m.weeks) {
- $w->print();
- }
- "</table>
- <br /><br /><br />";
- }
- function YearWeek::print()
- {
- """<tr valign="top">\n""";
- if ($.pre_empty > 0)
- {
- """<td class="yeardate" colspan="$.pre_empty"> </td>\n""";
- }
- foreach var YearDay d ($.days)
- {
- """<td class="yeardate">\n""";
- """<div style="text-align: right;">$d.day</div>\n""";
- if ($d.num_entries > 0)
- {
- """<div style="text-align: center;"><a href="$d.url">$d.num_entries</a></div>\n""";
- }
- else
- {
- """<div> </div>""";
- }
- """</td>\n""";
- }
- if ($.post_empty > 0)
- {
- """<td class="yeardate" colspan="$.post_empty"> </td>\n""";
- }
- "</tr>";
- }
- function print_theme_preview() {
- var string content_font_family = css_font_family($*content_font, $*content_font_fallback);
- """
- <div style="background-color: $*outer_table_bgcolor; padding: 15px; border: 1px solid $*border_color;">
- <div style="background-color: $*content_bgcolor; border: 1px solid $*border_color;">
- <div style="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;"><div style="background-color: #666; width: 100px; height: 100px;"> </div></div>
- <div style="background-color: $*entrytitle_bgcolor; padding: 5px;">
- <div style='line-height: 200%; top: 5px; color: $*date_fgcolor; $content_font_family; font-size: $*date_font_size$*font_unit;'>25 November 2006 @ 04:58 pm</div>
- <div style='font-weight: bold; padding: 10px; color: $*subject_fgcolor; $content_font_family; font-size: $*subject_font_size$*font_unit;'>Lorem ipsum dolor sit amet</div>
- </div>
- <div style='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;'>
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc tincidunt sollicitudin orci. Vivamus sollicitudin arcu non mi lobortis lacinia. Sed quis orci. Vestibulum in risus sit amet lectus gravida pellentesque. Curabitur faucibus risus eu pede hendrerit eleifend. Nunc vitae odio. Praesent turpis velit, venenatis vitae, accumsan quis, aliquam scelerisque, diam. Nulla fringilla dapibus nulla. Sed in sapien sit amet odio eleifend venenatis. Nunc neque ipsum, convallis id, volutpat eget, bibendum placerat, magna. Integer commodo, nunc eu faucibus tincidunt, est lectus sodales purus, pulvinar pretium purus diam sollicitudin justo. Nulla facilisi. Vivamus eleifend. Fusce sodales dui sit amet dolor.
- <div style="height: 15px;"> </div>
- <div style='$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;'><a style="color: $*comments_link_color;" href='#'>3 comments</a> | <a style="color: $*comments_link_color;" href='#'>Leave a comment</a></div>
- </div>
- <div style="height: 35px;"></div>
- <div style="height: 15px;"> </div>
- </div>
- </div>
- """;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement