layerinfo type = "layout"; layerinfo name = "Trifecta"; layerinfo redist_uniq = "trifecta/layout"; layerinfo author_name = "ninetydegrees"; layerinfo lang = "en"; set layout_authors = [ {"name" => "ninetydegrees", "type" => "user"} ]; ##=============================== ## Presentation ##=============================== propgroup presentation_child { property string post_text_align { des = "Content text alignment"; values = "left|Left|justify|Justify"; } } set layout_type = "three-columns-left"; set entry_date_format = "long_day_dayfirst"; set entry_time_format = "short_24"; set comment_time_format = "short_24"; set entry_userpic_style = "small"; set comment_userpic_style = "small"; set post_text_align = "justify"; set reverse_sortorder_year = true; set reverse_sortorder_month = true; set reverse_sortorder_day = true; set reg_firstdayofweek = "monday"; ##=============================== ## Colors ##=============================== propgroup colors_child { property Color color_calendar_background { des = "Calendar background color on days with entries"; } property Color color_calendar_link { des = "Calendar link color on days with entries"; } property Color color_calendar_link_active { des = "Calendar active link color on days with entries"; } property Color color_calendar_link_hover { des = "Calendar hover link color on days with entries"; } property Color color_calendar_link_visited { des = "Calendar visited link color on days with entries"; } property Color color_calendar_text { des = "Calendar text color on days with entries"; } property Color color_calendar_border { des = "Calendar border color"; } property use color_header_link; property use color_header_link_active; property use color_header_link_hover; property use color_header_link_visited; property Color color_main_background { des = "Main background color"; note = "If none is specified the page color will be used. This is true for all main colors."; } property Color color_main_text { des = "Main text color"; } property Color color_main_link { des = "Main link color"; } property Color color_main_link_active { des = "Main active link color"; } property Color color_main_link_hover { des = "Main hover link color"; } property Color color_main_link_visited { des = "Main visited link color"; } property Color color_main_border { des = "Main border color"; } property Color color_secondary_background { des = "Main module section background color"; } property Color color_tertiary_background { des = "Secondary module section background color"; note = "If none is specified the main module background color will be used. This is true for all secondary colors."; } property Color color_module_background_alt { des = "Secondary module background color"; } property Color color_module_text_alt { des = "Secondary module text color"; } property Color color_module_link_alt { des = "Secondary module link color"; } property Color color_module_link_active_alt { des = "Secondary module active link color"; } property Color color_module_link_hover_alt { des = "Secondary module hover link color"; } property Color color_module_link_visited_alt { des = "Secondary module visited link color"; } property Color color_module_title_background_alt { des = "Secondary module title background color"; } property Color color_module_title_alt { des = "Secondary module title color"; } property Color color_module_border_alt { des = "Secondary module border color"; } property Color color_footer_text { des = "Footer text color"; } property Color color_footer_border { des = "Footer border color"; } } ##=============================== ## Fonts ##=============================== set font_base = "'Times New Roman', Georgia"; set font_fallback = "serif"; set font_module_heading_size = "1.2"; set font_module_heading_units = "em"; set font_journal_title_size = "2"; set font_journal_title_units ="em"; set font_journal_subtitle_size = "1"; set font_journal_subtitle_units = "em"; set font_entry_title_size = "1.2"; set font_entry_title_units ="em"; set font_comment_title_size = "1.1"; set font_comment_title_units ="em"; ##=============================== ## Images ##=============================== propgroup images_child { property string[] image_background_main_group { des = "Main background image"; grouptype = "image"; } set image_background_main_group = [ "image_background_main_url", "image_background_main_repeat", "image_background_main_position" ]; property string image_background_main_url { grouped = 1; } property string image_background_main_repeat { values = "repeat|tile image|no-repeat|don't tile|repeat-x|tile horizontally|repeat-y|tile vertically"; grouped = 1; } property string image_background_main_position { values = "top left|top left|top center|top center|top right|top right|center left|center left|center center|center|center right|center right|bottom left|bottom left|bottom center|bottom center|bottom right|bottom right"; grouped = 1; allow_other = 1; } property string[] image_background_footer_group { des = "Footer background image"; grouptype = "image"; } set image_background_footer_group = [ "image_background_footer_url", "image_background_footer_repeat", "image_background_footer_position" ]; property string image_background_footer_url { grouped = 1; } property string image_background_footer_repeat { values = "repeat|tile image|no-repeat|don't tile|repeat-x|tile horizontally|repeat-y|tile vertically"; grouped = 1; } property string image_background_footer_position { values = "top left|top left|top center|top center|top right|top right|center left|center left|center center|center|center right|center right|bottom left|bottom left|bottom center|bottom center|bottom right|bottom right"; grouped = 1; allow_other = 1; } property string[] image_background_secondary_group { des = "Main module section background image"; grouptype = "image"; } set image_background_secondary_group = [ "image_background_secondary_url", "image_background_secondary_repeat", "image_background_secondary_position" ]; property string image_background_secondary_url { grouped = 1; } property string image_background_secondary_repeat { values = "repeat|tile image|no-repeat|don't tile|repeat-x|tile horizontally|repeat-y|tile vertically"; grouped = 1; } property string image_background_secondary_position { values = "top left|top left|top center|top center|top right|top right|center left|center left|center center|center|center right|center right|bottom left|bottom left|bottom center|bottom center|bottom right|bottom right"; grouped = 1; allow_other = 1; } property string[] image_background_tertiary_group { des = "Secondary module section background image"; grouptype = "image"; } set image_background_tertiary_group = [ "image_background_tertiary_url", "image_background_tertiary_repeat", "image_background_tertiary_position" ]; property string image_background_tertiary_url { grouped = 1; } property string image_background_tertiary_repeat { values = "repeat|tile image|no-repeat|don't tile|repeat-x|tile horizontally|repeat-y|tile vertically"; grouped = 1; } property string image_background_tertiary_position { values = "top left|top left|top center|top center|top right|top right|center left|center left|center center|center|center right|center right|bottom left|bottom left|bottom center|bottom center|bottom right|bottom right"; grouped = 1; allow_other = 1; } property string[] image_background_module_alt_group { des = "Secondary module background image"; grouptype = "image"; } set image_background_module_alt_group = [ "image_background_module_url_alt", "image_background_module_repeat_alt", "image_background_module_position_alt" ]; property string image_background_module_url_alt { grouped = 1; } property string image_background_module_repeat_alt { values = "repeat|tile image|no-repeat|don't tile|repeat-x|tile horizontally|repeat-y|tile vertically"; grouped = 1; } property string image_background_module_position_alt { values = "top left|top left|top center|top center|top right|top right|center left|center left|center center|center|center right|center right|bottom left|bottom left|bottom center|bottom center|bottom right|bottom right"; grouped = 1; allow_other = 1; } } ##=============================== ## Text ##=============================== set text_default_separator = " / "; set text_meta_music = ""; set text_meta_mood = ""; set text_meta_location = ""; set text_meta_groups = ""; set text_meta_xpost = ""; set text_tags = "-"; set text_skiplinks_back = ""; set text_skiplinks_forward = ""; set text_day_prev = ""; set text_day_next = ""; set text_page_top = "^"; set text_posting_in = " in "; set text_comment_from = "- Posted by "; set text_openid_from = "- Posted by "; set text_comment_date = ""; set text_comment_ipaddr = ""; set text_comment_edittime = "Edited"; ##=============================== ## Modules ##=============================== propgroup modules_child { property string module_navlinks_section_override { values = "none|(none)|aboveheader|Above Header|one|Main Module Section|two|Secondary Module Section"; grouped = 1; } property string module_search_section_override { values = "none|(none)|header|Header|one|Main Module Section|two|Secondary Module Section"; grouped = 1; } property string module_syndicate_section_override { values = "none|(none)|header|Header|one|Main Module Section|two|Secondary Module Section"; grouped = 1; } property string module_time_section_override { values = "none|(none)|footer|Footer"; grouped = 1; } property string module_poweredby_section_override { values = "none|(none)|footer|Footer"; grouped = 1; } } set grouped_property_override = { "module_navlinks_section" => "module_navlinks_section_override", "module_search_section" => "module_search_section_override", "module_syndicate_section" => "module_syndicate_section_override", "module_time_section" => "module_time_section_override", "module_poweredby_section" => "module_poweredby_section_override" }; set module_search_section = "header"; set module_syndicate_section = "header"; set module_time_section = "footer"; set module_poweredby_section = "footer"; set module_tags_opts_type = "cloud"; set module_subscriptionfilters_section = "one"; set module_active_section = "two"; set module_links_section = "two"; set module_credit_section = "two"; set module_tags_section = "two"; set module_pagesummary_section = "two"; ##=============================== ## Functions ##=============================== ## If main doesn't have colors use page instead ## If tertiary doestn't have colors use secondary instead function prop_init () { $*color_main_background = isnull $*color_main_background ? $*color_page_background : $*color_main_background; $*color_main_text = isnull $*color_main_text ? $*color_page_text : $*color_main_text; $*color_main_link = isnull $*color_main_link ? $*color_page_link : $*color_main_link; $*color_main_link_active = isnull $*color_main_link_active ? $*color_page_link_active : $*color_main_link_active; $*color_main_link_hover = isnull $*color_main_link_hover ? $*color_page_link_hover : $*color_main_link_hover; $*color_main_link_visited = isnull $*color_main_link_visited ? $*color_page_link_visited : $*color_main_link_visited; $*color_main_border = isnull $*color_main_border ? $*color_page_border : $*color_main_border; $*color_tertiary_background = isnull $*color_tertiary_background ? $*color_secondary_background : $*color_tertiary_background; $*color_module_background_alt = isnull $*color_module_background_alt ? $*color_module_background : $*color_module_background_alt; $*color_module_text_alt = isnull $*color_module_text_alt ? $*color_module_text : $*color_module_text_alt; $*color_module_link_alt = isnull $*color_module_link_alt ? $*color_module_link : $*color_module_link_alt; $*color_module_link_active_alt = isnull $*color_module_link_active_alt ? $*color_module_link_active : $*color_module_link_active_alt; $*color_module_link_hover_alt = isnull $*color_module_link_hover_alt ? $*color_module_link_hover : $*color_module_link_hover_alt; $*color_module_link_visited_alt = isnull $*color_module_link_visited_alt ? $*color_module_link_visited : $*color_module_link_visited_alt; $*color_module_title_background_alt = isnull $*color_module_title_background_alt ? $*color_module_title_background : $*color_module_title_background_alt; $*color_module_title_alt = isnull $*color_module_title_alt ? $*color_module_title : $*color_module_title_alt; $*color_module_border_alt = isnull $*color_module_border_alt ? $*color_module_border : $*color_module_border_alt; } ## Add title function print_module_navlinks( bool apply_class_to_link ) { var Page p = get_page(); open_module("navlinks", "Navigation", ""); var string{}[] links = []; foreach var string k ($p.views_order) { var string class = "list-item-$k"; var string css = ""; if ($apply_class_to_link ) { var string css = """ class="$k" """; if ($p.view == $k) { $css = """ class="current $k" """; } } else { $class = "$k " + $class; if ($p.view == $k) { $class = "current " + $class; } } $links[size $links] = { "class" => $class, "item" => """"""+lang_viewname($k)+"""""" }; } print_module_list($links); close_module(); } ## Add header section ## Wrap header and primary in core container ## Add content wrapper ## Move footer inside content if layout is of three-column type ## Close canvas inner after footer function Page::print() { """\n\n
\n"""; $this->print_meta_tags(); $this->print_head(); $this->print_stylesheets(); $this->print_head_title(); """"""; $this->print_wrapper_start(); $this->print_control_strip(); """