layerinfo type = "layout"; layerinfo name = "Fluid Measure"; layerinfo des = "Inspired by the WordPress theme Ahimsa, by Ravi Sarma"; layerinfo redist_uniq = "fluidmeasure/layout"; layerinfo author_name = "branchandroot"; layerinfo lang = "en"; set layout_authors = [ { "name" => "branchandroot", "type" => "user" } ]; ##=============================== ## Presentation ##=============================== set layout_type = "two-columns-right"; property string margins_size { noui = 1; } property string margins_unit { noui = 1; } set userpics_position = "right"; set all_commentsubjects = true; ##=============================== ## Colors ##=============================== propgroup colors_child { property use color_page_details_text; } set color_page_details_text = "#999"; ##=============================== ## Fonts ##=============================== set font_base = "Verdana, Helvetica"; set font_fallback = "sans-serif"; function print_module_navlinks() { var Page p = get_page(); var string title = "Navigation"; open_module("navlinks", "$title", ""); var string{}[] links = []; foreach var string k ($p.views_order) { var string class = "list-item-$k"; var string css = """ class="$k" """; if ($p.view == $k) { $css = """ class="current $k" """; } $links[size $links] = { "class" => $class, "item" => """"""+lang_viewname($k)+"""""" }; } print_module_list($links); close_module(); } function Page::print() "The meat of each new layout. Describes how each page will look. In nearly all cases, the logic and decision-making processes should come from pre-existing functions in core2, and should not get written here. If you limit the structure of the page to HTML, function calls, and attached CSS, then you will be able to pick up all of the enhancements and accessibility requirements managed by core2." { """\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(); """
"""; if ($*layout_type == "one-column-split") { """
"""; $this->print_module_section("one"); """
"""; } """
"""; $this->print_body(); """
"""; if ($*layout_type != "one-column-split") { """
"""; $this->print_module_section("one"); """
"""; } """
"""; $this->print_module_section("two"); """
"""; """
"""; $this->print_wrapper_end(); """"""; } function print_stylesheet() { var string medium_media_query = generate_medium_media_query(); var string entry_title_font = generate_font_css($*font_entry_title, $*font_base, $*font_fallback, $*font_entry_title_size, $*font_entry_title_units); var string userpic_css = ""; if ($*userpics_position == "left") { $userpic_css = """ .has-userpic .entry .contents .userpic { float: left; } .has-userpic .comment .contents .userpic { float: left; margin: .5em .5em .5em 0; } .has-userpic .entry .contents .entry-poster { clear: right; /* Fixes display bug in Chrome. Keeps username below entry title. */ } """; } elseif ($*userpics_position == "right") { $userpic_css = """ .has-userpic .entry .contents .userpic { float: right; } .has-userpic .comment .contents .userpic { float: right; margin: .5em 0 .5em .5em; } .has-userpic .entry .contents .entry-poster { clear: left; /* Fixes display bug in Chrome. Keeps username below entry title. */ } """; } """ /* Fluid Measure */ blockquote { margin: 0 1em 1em 1em; padding: .5em; background-color: $*color_entry_border; border-radius: 1em; } dl dt { font-weight: bold; } ul { } a { color: $*color_page_link; } a:visited { color: $*color_page_link_visited; } a:hover {text-decoration: none; } body { margin: 0; border: none; } H1, H2, H3, H4, H5 { font-weight: normal; font-style: italic;} #top-color { position: fixed; top: 0; left: 0; z-index: -1; width: 100%; height: 25em; background-color: $*color_module_border; border-bottom: .5em solid $*color_page_title; } #lj_controlstrip { z-index: 200 !important;} #title a { color: $*color_page_title; text-decoration: none; } #canvas { background-color: $*color_entry_title_background; padding: 1px;} #canvas > .inner:first-child { margin: 2em 4% 0 4%; position: relative; z-index: 100; float: left; width: 92%; /*asinine IE7 hack to keep left sidebar from sliding under #primary when #canvas is relative*/ } #content { background-color: $*color_page_background; position: relative; z-index: 120;} #content-footer { clear: both; } #content-footer { height: 0; font-size: 0; } /* IE clearing fix */ /*to make the bottom curves */ .any-column #content { border-bottom-color: transparent; border-bottom-left-radius: 1em; border-bottom-right-radius: 1em; } @media $medium_media_query { .two-columns-left #content, .three-columns-sides #content { border-left: $*sidebar_width solid $*color_page_border; } .two-columns-right #content, .three-columns-sides #content { border-right: $*sidebar_width solid $*color_page_border; } .three-columns-left #content { border-left: $*sidebar_width_doubled solid $*color_page_border; } .three-columns-right #content { border-right: $*sidebar_width_doubled solid $*color_page_border; } .three-columns #content { border-bottom-left-radius: 0; border-bottom-right-radius: 0; } .three-columns-sides #color-footer, .three-columns-left #color-footer, .three-columns-right #color-footer { background-color: $*color_page_border; margin: 0 4%; border: 1em solid $*color_page_border; border-bottom-left-radius: 1em; border-bottom-right-radius: 1em; clear: both; } } /* header */ #header { padding: .5em 1em; background-color: $*color_header_background; color: $*color_page_title; border-top-left-radius: 1em; border-top-right-radius: 1em; position: relative; z-index: 130; } #pagetitle { } /* main column */ #primary > .inner:first-child { padding: 2em; } .navigation { text-align: right; clear: both; } .navigation ul { margin: 0; padding: .25em; display: inline; } .navigation li, .noentries { background-color: $*color_entry_title_background; color: $*color_entry_title; padding: .5em; border-radius: 1em; } .navigation .page-forward { margin-left: 1em; } .navigation a { color: $*color_entry_title; } .navigation .page-separator { display: none; } .page-read .navigation.empty ul { display: block; } .page-read .navigation.empty ul li { display: block; } /* entries */ .entry-wrapper { margin-top: 2em; position: relative; float: left; width: 100%; /*asinine IE7 hack*/ } .entry-wrapper .separator-after { height: 2em; } .entry li { margin-left: 1em; } .entry-content hr { display: block; margin: 1em 10%; } .entry { background-color: $*color_entry_background; border: 1px solid $*color_page_background !important; border-radius: 1em; padding: 3em 0 0 0; } .entry .header { padding: 0 .5em; } .entry .entry-title { background-color: $*color_entry_title_background; border-radius: 1em; margin: -4em 15em 1em 1.5em; padding: .5em; float: left; } .entry .entry-title a, .entry .entry-title a:visited { color: $*color_entry_title; } .entry .header .restrictions {position: absolute; top: 1.5em; left: .5em;} .entry .header .access-filter { position: absolute; top: .5em; left: .5em; } .entry .header .datetime { float: right; margin-top: -1.5em; white-space: nowrap; } .entry .contents { padding: .5em .5em 0 .5em; } .entry .contents .userpic { margin: 1em .5em .5em .5em; position: relative; /*more asinine IE7 hackish fixing*/ } .entry .contents .entry-poster { display: block; margin-top: -.5em; } .entry-content { margin: 1em .5em; } .metadata { margin: 1em 0 0 0; } .metadata.top-metadata { margin-bottom: 2em; } .metadata-label { font-weight: bold; } .metadata ul li { margin-left: 0; padding-left: 0; } .entry .footer { margin: .5em 0 0 0; padding-bottom: .5em; background-color: $*color_entry_border; clear: both; overflow: auto; /* keep floated elements inside the footer */ border-bottom-left-radius: 1em; border-bottom-right-radius: 1em; } .entry .footer > .inner:first-child { padding: 1px; } /*float uneveness fix */ .entry .tag { padding: .5em .5em 1em .5em; background-color: $*color_entry_background; margin-top: -2px; } .entry .tag-text { font-weight: bold; } .entry .tag ul li { margin-left: 0; } ul.entry-management-links { float: left; margin-left: -.5em; margin-top: 1em; margin-bottom: .5em; } ul.entry-interaction-links { text-align: right; margin-right: .5em; margin-top: 1em; margin-bottom: .5em; } /* comments */ #comments { clear: both; float: left; width: 100%; /*yet more asinine position fixing*/ } .comment-wrapper { min-width: 10em; margin-bottom: 1em; padding-top: 2em; } /*die in a fire, IE7*/ .comment { background-color: $*color_entry_background; border-radius: 1em; padding: 3em .5em .5em .5em; } .partial .comment { margin-bottom: 0; padding: 1em;} .comment .comment-title { background-color: $*color_comment_title_background; border: 1px solid $*color_comment_title_background; border-radius: 1em; color: $*color_comment_title; float: left; margin: -4.5em 14em 1em 1em; padding: .5em; } .comment-title a { color: $*color_comment_title; } .partial .comment-title { display: inline; margin: -.5em 0 0; } .partial .comment-poster:before { content: "- "; } .full .comment .datetime { float: right; margin-top: -1.5em; white-space: nowrap; } .edittime .datetime { float: none; } .comment .contents { } .comment .poster-ip { font-size: small; color: $*color_page_details_text; } .comment-content { margin-top: 1em; } .comment .edittime { margin-top: 1em; } .comment .multiform-checkbox { display: block; text-align: right; font-size: small; color: $*color_entry_text; } .comment .footer { margin: .5em 0; clear: both; } .comment .footer > .inner:first-child { padding: 1px; } /*float uneveness fix */ .comment-management-links { float: right; } .comment-interaction-links { text-align: left; } .bottomcomment, .comments-message { padding: .5em; margin-bottom: 2em; background-color: $*color_entry_background; border-radius: 1em; } .bottomcomment .entry-management-links, .bottomcomment .entry-interaction-links { margin: .25em 0 .5em 0; } .comment-pages { text-align: center; } #qrformdiv table { margin: .5em; } table.talkform { background-color: $*color_entry_background; padding: .5em; border-radius: 1em; clear: both; display: block; } /* archive */ /* year-by-month view */ #archive-year .navigation { text-align: left; margin-bottom: 2em; } div.month { margin: 1em 0 2em 0; background-color: $*color_entry_background; padding: .5em; border-radius: 1em; } table.month td, table.month th { border-color: $*color_page_details_text; vertical-align: top; } .month caption { display: none; } #archive-year .month .footer { padding: .5em; text-align: center; } /* month-by-day view */ #archive-month .navigation { text-align: center; } #archive-month .navigation li { background-color: transparent; } #archive-month .navigation .month-back, #archive-month .navigation .month-forward { background-color: $*color_entry_title_background; } .month dl .tag-text { font-style: italic; } .month dl h3.entry-title { font-weight: bold; } /* day-by-entries view */ .day h3.day-date { text-align: center; background-color: $*color_entry_background; padding: .5em; margin-bottom: 3em; width: 14em; border-radius: 1em; } /* tags page */ .tags-container { background: $*color_entry_background; padding: .5em; margin: 1em 2em; border-radius: 1em; } /* icons */ .icons-container { background: $*color_entry_background; border-radius: 1em; color: $*color_entry_text; margin-top: 2em; } .icons-container a { color: $*color_entry_link; } .icons-container a:visited { color: $*color_entry_link_visited; } .icons-container a:hover { color: $*color_entry_link_hover; } .icons-container a:active { color: $*color_entry_link_active; } .icons-container > .inner:first-child { padding: 3em 0 0 0; } .icons-container .header { padding: 0 .5em; } /* Reset font size to H3 */ /* But use entry title font if set */ .icons-container .header h2 { background-color: $*color_entry_title_background; border-radius: 1em; float: left; clear: left; font-size: 1.17em; $entry_title_font margin: -4em 15em 1em 1.5em; padding: .5em; } .icons-container .contents { padding: 0 1em 1em; } .icons-container .footer { padding: 0 .5em 1em; } .sorting-options ul { padding-left: 0; } .icons-container .icon { margin: 1em 0; } .icon-image { float: left; clear: left; margin-bottom: .25em; min-width: 100px; padding-right: 1em; } .icon-info { min-height: 100px; } .icon-info span { font-weight: bold; } .icon-info .default { text-decoration: underline; } /* sidebars */ #secondary, #tertiary { background-color: $*color_page_border; border-radius: 1em; } #secondary a, #tertiary a { color: $*color_module_link; } #secondary a:visited, #tertiary a:visited { color: $*color_module_link_visited; } #tertiary .separator-after { clear: both; } #secondary > .inner:first-child, #tertiary > .inner:first-child { padding: 0 !important; } .any-column #secondary, .any-column #tertiary { padding: .5em 0; } .any-column #tertiary { margin-top: 2em; } .one-column-split #tertiary { margin-top: 0; } @media $medium_media_query { .multiple-columns #secondary, .multiple-columns #tertiary { padding: 0; } .multiple-columns #tertiary { margin-top: 0; } .two-columns #tertiary { border-bottom-left-radius: 1em; border-bottom-right-radius: 1em; } .two-columns #tertiary .module { margin: 1em 1.5em; } .two-columns-left #tertiary .module { float: right !important; } .two-columns #secondary .module-search .search-form, .three-columns .module-search .search-form { text-align: right; } } .module { padding: 1em .25em .5em .25em; margin: 2.5em 1.5em; background-color: $*color_module_background; border-color: transparent !important; border-radius: 1em; } .module-header { background-color: $*color_module_title_background; font-size: medium; padding: .5em; margin: -2.5em .5em 1em .5em; float: left; color: $*color_module_title; border-radius: 1em; } #secondary .module-header a, #tertiary .module-header a, #secondary .module-header a:visited, #tertiary .module-header a:visited { color: $*color_module_title; } .module-userprofile { text-align: center; } .module-userprofile .module-header { text-align: left; } .module-userprofile .module-content { padding-top: 1em; } .module-navlinks ul, .module-typelist ul { list-style: none; } .module-calendar .module-content { padding-top: 1em; } .module-calendar table { font-size: small; } .module-calendar .entry-day a { display: block; background-color: $*color_page_border; padding: 2px; border-radius: 4px; } .module-calendar table a { text-decoration: none; } .module-calendar table a:hover { text-decoration: underline; } .module-syndicate .module-content { margin-top: 1em; } .module-customtext .module-content { padding: 1em .5em .5em .5em; } .module-time, .module-powered { padding: .5em; } .module-search .search-box, .module-search .search-button { border-radius: 1em; background-color: $*color_entry_background; color: $*color_entry_text; border: 1px solid $*color_module_title_background; } .module-search .search-form { margin: .2em auto; } .module-search .search-box { margin: .2em; } .module-search .module-content, .module-cuttagcontrols .module-content { padding-top: 1em; } /* footer */ #footer { background-color: $*color_entry_title_background; height: 4em; } #footer .page-top {background-color: $*color_footer_background; padding: .5em; margin: 1em 2em; float: left; border-radius: 1em; } $userpic_css """; }