layerinfo type = "layout"; layerinfo name = "Librarian's Dream"; layerinfo author_name = "branchandroot"; layerinfo redist_uniq = "librariansdream/layout"; layerinfo lang = "en"; set layout_authors = [ { "name" => "branchandroot", "type" => "user" } ]; # loosely inspired by the WordPress theme whose name I have never found ##=============================== ## Colors ##=============================== propgroup colors_child { 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_entry_management_background { des = "Entry management links background color"; } property Color color_module_link_background { des = "Module link background color"; } property Color color_module_link_hover_background { des = "Module hovered link background color"; } property Color color_module_link_border { des = "Module link border color"; } property Color color_module_link_hover_border { des = "Module hovered link border color"; } property Color color_navigation_link { des = "Navigation link color"; } property Color color_navigation_link_visited { des = "Navigation visited link color"; } property Color color_navigation_link_active { des = "Navigation active link color"; } property Color color_navigation_link_hover { des = "Navigation hovered link color"; } property Color color_primary_background { des = "Entries column background color"; } property Color color_sidebars_background { des = "Sidebar background color"; } } ##=============================== ## Text ##=============================== set userlite_interaction_links = "text"; set module_tags_opts_count_type = "title"; set all_commentsubjects = true; ##=============================== ## Presentation ##=============================== set userpics_position = "right"; ##=============================== ## Modules ##=============================== property string module_navlinks_section_override { values = "none|(none)|header|Header|one|Main Module Section|two|Secondary Module Section"; grouped = 1; } set grouped_property_override = { "module_navlinks_section" => "module_navlinks_section_override" }; set module_navlinks_section = "one"; ##=============================== ## Layout ##=============================== set margins_size = "2"; set margins_unit = "%"; set layout_type = "two-columns-left"; set module_tags_opts_type = "multi"; ##=============================== ## Functions ##=============================== #to give a title to the navlinks module function print_module_navlinks( bool apply_class_to_link ) { 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 = ""; 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 section for navlinks module 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(); """
"""; 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(); """"""; } ## Enclose userpic and name in new DIV ## Switch from DIV to SPAN for userpic and name function print_module_userprofile() { var Page p = get_page(); open_module("userprofile", $*text_module_userprofile, $p.view_url{"userinfo"}); if ($*module_userprofile_opts_userpic or $*module_userprofile_opts_name) { """
"""; if ($*module_userprofile_opts_userpic) { if (defined $p.journal.default_pic) { $p.journal.default_pic.width = $p.journal.default_pic.width / 4; $p.journal.default_pic.height = $p.journal.default_pic.height / 4; """"""; $p.journal->print_userpic(); """"""; } } if ($*module_userprofile_opts_name) { println "" + $p.journal.name + ""; } "
"; } if ($*module_userprofile_opts_website and $p.journal.website_url != "") { var string website_name = ( $p.journal.website_name != "" ) ? $p.journal.website_name : $*text_website_default_name; println "
$website_name
"; } $p.journal->print_interaction_links(); close_module(); } ##=============================== ## Stylesheet ##=============================== function print_stylesheet() { var string medium_media_query = generate_medium_media_query(); #to move userpic left or right var string userpic_css = ""; if ($*userpics_position == "right") { $userpic_css = ".entry .userpic, .comment .userpic { float: right; }"; } else { $userpic_css = ".entry .userpic, .comment .userpic { float: left; } .entry .header, .comment .header { text-align: right; } .entry-title, .comment-title { text-align: left; }"; } #for showing the module in the header var string navlinks_css = ""; if ( $*module_navlinks_section == "header" ) { $navlinks_css = """ #header > .inner:first-child { padding-bottom: 2em; position: relative; } .module-navlinks { text-align:right;} .module-navlinks * { display: inline !important; background: transparent !important; border-left: none !important; } /* Above standard link colors so hover and active still work */ .module-navlinks .module-content li a.current, .module-navlinks .module-content li a.current:visited { color: $*color_page_title; text-decoration: none; } /* Extra specificity needed to override code below */ .module-navlinks .module-content li a { color: $*color_header_link; } .module-navlinks .module-content li a:visited { color: $*color_header_link_visited; } .module-navlinks .module-content li a:hover { color: $*color_header_link_hover; } .module-navlinks .module-content li a:active { color: $*color_header_link_active; } .module-navlinks .module-header { display: none !important; } """; } else { $navlinks_css = ""; } var string entry_title_colors = generate_color_css($*color_entry_title, $*color_entry_title_background, new Color); 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 entry_colors = generate_color_css($*color_entry_text, $*color_entry_background, $*color_entry_border); var string header_background = generate_background_css ($*image_background_header_url, $*image_background_header_repeat, $*image_background_header_position, $*color_header_background); if ($*image_background_header_height > 0) { var int header_height = $*image_background_header_height - 2; $header_background = """ $header_background height: """ + $header_height + """px;"""; } """ /* Lists CSS */ /* Spacing */ #primary > .inner:first-child { margin: .25em .25em .25em .25em; padding: .5em 1em; } @media $medium_media_query { .two-columns-left #primary > .inner:first-child, .three-columns-left #primary > .inner:first-child { margin-right: 0; } .two-columns-right #primary > .inner:first-child, .three-columns-right #primary > .inner:first-child { margin-left: 0; } .two-columns-left #header, .three-columns-sides #header { margin-left: $*sidebar_width; padding-left: .25em; border: none;} .three-columns-left #header { margin-left: $*sidebar_width_doubled; padding-left: .25em; border: none;} .two-columns-right #header, .three-columns-sides #header { margin-right: $*sidebar_width; padding-right: .25em; border: none;} .three-columns-right #header { margin-right: $*sidebar_width_doubled; padding-right: .25em; border: none;} .multiple-columns #secondary, .three-columns-left #tertiary, .three-columns-right #tertiary, .three-columns-sides #tertiary { position: absolute; top: 1em; margin: 0 !important; } .two-columns-left #secondary, .three-columns-sides #secondary { left: 0; } .three-columns-left #secondary { left: -.25em; } .two-columns-right #secondary, .three-columns-sides #tertiary { right: 0; } .three-columns-right #tertiary {right: -.25em; } .three-columns-right #secondary { right: $*sidebar_width; } .three-columns-left #tertiary { left: $*sidebar_width; } .two-columns-left #tertiary .module, .two-columns-right #tertiary .module { margin: 0 .25em 0 0; } } #secondary > .inner:first-child, #tertiary > .inner:first-child { padding: .5em .75em; } #footer { margin-top: .25em; } /* Canvas level */ blockquote { padding: 1em 1em .5em 2em; font-style: italic; } blockquote > p:first-child { margin-top: 0; } q { font-style: italic; } dl dt { font-weight: bold; } a:hover { text-decoration: none; } body { padding: 0; margin: 0; } #canvas { margin: 0 $*margins_size$*margins_unit; padding: 1em 0; position: relative; background: $*color_page_background; } #header { padding: 1px; background: none;} #header > .inner { padding: 1px 1em; $header_background } #content { border-color: $*color_page_background !important; } #content-footer { clear: both; } .navigation { text-align: right; } .navigation ul { margin: .5em 0; } .navigation a { color: $*color_navigation_link; } .navigation a:visited { color: $*color_navigation_link_visited; } .navigation a:hover { color: $*color_navigation_link_hover; } .navigation a:active { color: $*color_navigation_link_active; } #title, #pagetitle, #subtitle, .entry-title, .module-header, .comment-title, .tags-container h2, #archive-year .month .header h3 { font-weight: normal; text-transform: capitalize; } #header h1, #header h2, #header h3 { margin: 0; padding: .15em 0; } #header h1 a { color: $*color_page_title; text-decoration: none; } .one-column #header .module-navlinks {width:100%;} /* entry */ #primary > .inner:first-child { background: $*color_primary_background; } .entry-wrapper, .comment-wrapper { background: $*color_entry_management_background; margin: 0 0 1em 0; } .entry, .comment { margin: 0 0 0 35px; padding: 0; position: relative; border: none; } .entry .header .datetime, .comment .header .datetime { padding:0 10px; } /*so datetime et al has some padding */ .entry .header {padding-left: 10px;} .entry-title, .comment-title { padding: .25em .5em; margin: 0; margin-left: -45px; border-bottom: 1px solid $*color_primary_background; } .entry .datetime, .comment .header .datetime { font-size: small; } .entry .contents, .comment .contents { padding: 0 .5em .5em; min-height: 100px; } .entry-content, .comment-content { padding: 1em .5em .5em; } $userpic_css .entry .userpic, .comment .userpic { margin: -.75em .25em .5em; } .entry .tag { padding-left: .5em; } .entry ul.text-links, .comment-interaction-links { padding: 0 .5em .75em; margin: 0; text-align:right;} .entry ul.icon-links, .comment .icon-links { position: absolute; top: 3em; left: -30px; width: 25px; } .entry ul.icon-links, .comment .icon-links { display: block; padding: 0 .25em; } .bottomcomment { background: $*color_entry_background; padding: 1px; margin: .5em 0; } .bottomcomment ul.entry-management-links { position: static; width: auto; } .bottomcomment ul.entry-management-links li { display: inline; padding: 0 .25em; } .bottomcomment ul.entry-management-links { float: left; margin-top: .5em; margin-bottom: .25em; } .bottomcomment ul.entry-interaction-links { text-align: right; margin: .5em .5em .25em 0; } /* Comments */ .comment-pages { background: $*color_entry_background; padding: .25em; margin: .5em 0; text-align: center; /* links when paginated */ } .comment-wrapper { padding: 0; } .comment { background: $*color_entry_background; } .comment-title { background: $*color_entry_title_background; } .comment-title a { color: $*color_entry_title; } .poster-ip { font-size: small; } .comment .footer { padding: 1px; } .comment .footer .multiform-checkbox { margin: 0 10px; font-size: small; } .comment-management-links { top: 2em; } .comment-interaction-links { text-align: right; } .partial .comment { padding: .25em; } .partial .comment-title { display: inline; background: transparent; margin-left: 0; } /*-----------------------Generic Secondary Pages Styling----------------------------*/ #archive-year .header h3, .tags-container .header h2, .icons-container .header h2, #archive-month .header h3 { $entry_title_font $entry_title_colors; border-bottom: 1px solid $*color_primary_background; padding: .20em .25em; margin: 0; } .tags-container, .icons-container, #archive-year .month, #comments, #archive-month .month { $entry_colors } .tags-container a, .icons-container a, #archive-year .month a, #comments a, #archive-month .month a { color:$*color_entry_link; } .tags-container a:visited, .icons-container a:visited, #archive-year .month a:visited, #comments a:visited, #archive-month .month a:visited { color:$*color_entry_link_visited; } .tags-container a:hover, .icons-container a:hover, #archive-year .month a:hover, #comments a:hover, #archive-month .month a:hover { color:$*color_entry_link_hover; } .tags-container a:active, .icons-container a:active, #archive-year .month a:active, #comments a:active, #archive-month .month a:active { color:$*color_entry_link_active; } /* Archive */ #archive-year .month-wrapper {margin: 0 0 1.5em; } #archive-year .month .contents { padding-top: 1em; } #archive-year .month .footer { padding: 1em; } table.month td, table.month th { padding: .25em .5em; vertical-align: top; } table.month caption { display: none; } #archive-month .month { padding: 1em; } #archive-month .month .entry-title { border-bottom: none; font-weight: bold; margin-left: 0; } #archive-month .navigation { text-align: center; } /* Tags */ .tags-container .manage-tags-link { padding: 1em; } /* Icons */ div.icons-container div.icon:nth-of-type(2n) { clear: both; } .icons-container .icon { float: left; margin-bottom: 15px; min-width: 350px; vertical-align: bottom; width: 50%; display:table; } .icon-image { display: inline; float: left; margin-right: 1em; min-width: 100px; margin-top: 0; } .icon-info { overflow: auto; vertical-align: bottom; word-wrap: break-word; display:table-cell; width:100%; } .icon-info .label, .icon-info span { font-weight: bold; } .icons-container .inner .footer, .icon-pages { clear: both; text-align: center; } .userprofile-userinfo { border-left: .5em solid $*color_module_link_border; background: $*color_module_link_background; margin-bottom: 1px; } /*Sidebars*/ #secondary, #tertiary { background: $*color_sidebars_background; } #secondary, #tertiary { background-color: $*color_sidebars_background; width: 100%; position: relative; text-align:center; margin: 1em 0; top: 0; } .any-column .module { display: inline-block; vertical-align: top; width: $*sidebar_width; margin: 0.5em; } .any-column .module-list {text-align: left;} @media $medium_media_query { .two-columns-left #tertiary .separator-after, .two-columns-right #tertiary .separator-after {clear: both; } .two-columns-left #tertiary { margin-left: .25em; } .two-columns-right #tertiary { margin-right: .25em; } .multiple-columns #secondary, .multiple-columns #tertiary { text-align: left; margin-bottom: 0; margin-top: 0; } .multiple-columns .module { display: block; width: auto; margin: 0 0 4px 0; } } .module { border: none; background: transparent; } .module-header { font-size: large; padding: .25em; margin: 0; } /* Extra specificity needed to override .module a */ .module .module-header a { color: $*color_module_title; } .module .module-header a:visited { color: $*color_module_title; } .module .module-header a:hover { color: $*color_module_link_hover; } .module .module-header a:active { color: $*color_module_link_active; } .module-content ul, .module-list, .module dl { list-style: none; margin: 0; padding: 0; } .module-content li, .module-list-item, .module-syndicate a, .module .manage-link a, .module dt, .module dd, .module-search input { margin: 1px 0; } .module-content li a, .module-list-item a, .module-syndicate a, .module .manage-link a, .module-calendar td a, .journal-website-name a, .module-credit li, .module-search input { display: block; padding: .25em .5em; background: $*color_module_link_background; border-left: .5em solid $*color_module_link_border; color: $*color_module_link; } .module-credit .module-list-item a, .module-credit .module-content li a, .module-credit .module-content li a:hover { display: inline; background: none; border: none; padding: 0; } .module-calendar td { font-size: small; } .module-calendar td.empty-day { padding: .25em; } .module-search input.search-box { margin-top: 2px; } .module-content li a:hover, .module-list-item a:hover, .module-syndicate a:hover, .module .manage-link a:hover, .module-calendar td a:hover, .journal-website-name a:hover, .module-search input.search-button:hover, .module-search input.search-box:focus { background: $*color_module_link_hover_background; border-left: .5em solid $*color_module_link_hover_border; color: $*color_module_link_hover; } $navlinks_css .manage-link { font-style: italic; } .module-calendar td a:hover { border: .05em solid $*color_module_link_hover_border; padding: .20em .5em; } .module-calendar td a { border: .05em solid transparent; padding: .20em .5em; } .module-userprofile .module-content { text-align: left; padding-top: 1px; } .module-user-links .module-content { text-align: left; } ul.userlite-interaction-links { list-style: none; margin-left: 0; padding-left: 0; } ul.userlite-interaction-links li { display: block !important; padding: 0 !important; } .module-userprofile .journal-name { padding-left: .5em; } .module-powered, .module-time, .module-tags_cloud .module-content .module-list{ background: $*color_module_background; padding: .5em; } .module-pagesummary li { background: $*color_module_link_background; padding: .25em .5em; border-left: .5em solid $*color_module_link_border; } .module-pagesummary li:hover { background: $*color_module_link_hover_background; border-left: .5em solid $*color_module_link_hover_border; } .module-pagesummary a { display: inline !important; border-left: none !important; padding: 0 !important; } .module-pagesummary li:hover a { background: transparent; color: $*color_module_link_hover; } .module-tags_multilevel .non-link-tag { display: block; padding: .25em .5em; background: $*color_module_link_background; border-left: .5em solid $*color_module_link_border; } .module-tags_multilevel ul ul a { padding-left: 2em; } .module-tags_cloud .module-list-item a, .module-tags_cloud .manage-tags-link a { display: inline; background: transparent; border-left: none; padding: .25em; } .module-tags_cloud .module-list-item a:hover, .module-tags_cloud .manage-tags-link a:hover { background: transparent; border-left: none; } .module-tags_cloud .manage-tags-link { margin-top: 1em; } .module-active .active-entry-label { display:none; } /* Footer */ #footer .inner { background: $*color_footer_background; padding: .5em; } #footer {border: none; background: none; padding: 0; } @media $medium_media_query { .two-columns-left #footer, .three-columns-sides #footer { margin-left: $*sidebar_width; padding-left: .25em; } .two-columns-right #footer, .three-columns-sides #footer { margin-right: $*sidebar_width; padding-right: .25em; } .three-columns-left #footer { margin-left: $*sidebar_width_doubled; padding-left: .25em; } .three-columns-right #footer { margin-right: $*sidebar_width_doubled; padding-right: .25em; } } """; }