mourningdove/styles/boxesandborders/layout.s2
2026-05-24 01:03:05 +00:00

528 lines
14 KiB
Text

layerinfo "type" = "layout";
layerinfo "name" = "Boxes and Borders";
layerinfo redist_uniq = "boxesandborders/layout";
layerinfo author_name = "branchandroot";
layerinfo lang = "en";
set layout_authors = [ { "name" => "branchandroot", "type" => "user" } ];
set layout_type = "three-columns-sides";
propgroup presentation_child {
property bool display_header_decoration {
des = "Display the decorative block in the header";
}
}
set display_header_decoration = true;
##===============================
## Colors
##===============================
propgroup colors_child {
property Color color_navigation_module_background {
des = "Header navigation module background color";
}
property use color_header_link;
property use color_header_link_active;
property Color color_header_link_hover_background {
des = "Page header hover link background color";
}
property use color_header_link_hover;
property use color_header_link_visited;
property Color color_calendar_module_emptyday_background {
des = "Calendar module background color on empty days";
}
property Color color_calendar_module_hasday_background {
des = "Calendar module background color on days with entries";
}
property use color_page_details_text;
}
set color_page_details_text = "#999";
##===============================
## Navigation Module
##===============================
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 = "header";
##===============================
##Layout
##===============================
function Page::print() {
"""<!DOCTYPE html>\n<html lang="en">\n<head profile="http://www.w3.org/2006/03/hcard http://purl.org/uF/hAtom/0.1/ http://gmpg.org/xfn/11">\n""";
$this->print_meta_tags();
$this->print_head();
$this->print_stylesheets();
$this->print_head_title();
"""</head>""";
$this->print_wrapper_start();
$this->print_control_strip();
"""
<div id="canvas">
<div class="inner">
<div id="header">
<div class="inner">
""";
$this->print_module_section("header");
$this->print_header();
"""
</div><!-- end header>inner -->
</div><!-- end header -->
<div id="content">
<div class="inner">
""";
if ($*layout_type == "one-column-split") {
"""
<div id="secondary"><div class="inner">
""";
$this->print_module_section("one");
"""
</div></div><!-- end secondary and secondary>inner -->
""";
}
"""
<div id="primary"><div class="inner">
""";
$this->print_body();
"""
</div></div><!-- end primary and primary>inner -->
""";
if ($*layout_type != "one-column-split") {
"""
<div id="secondary"><div class="inner">
""";
$this->print_module_section("one");
"""
</div></div><!-- end secondary and secondary>inner -->
""";
}
"""
<div id="invisible-separator" style="float: left; width: 1px;"></div> <!-- this is a hack for IE7 + two-columns-right -->
<div id="tertiary"><div class="inner">
""";
$this->print_module_section("two");
"""
</div></div><!-- end tertiary and tertiary>inner -->
<div id="content-footer"></div>
</div><!-- end content>inner -->
</div> <!-- end content -->
</div> <!-- end canvas>inner -->
""";
"""
<div id="footer">
<div class="inner">
""";
print safe """
<div class="page-top"><a href="#">$*text_page_top</a></div>
</div><!-- end footer>inner -->
</div><!-- end footer -->
</div> <!-- end canvas -->
""";
$this->print_wrapper_end();
"""</html>""";
}
function Page::print_global_title() {
if ($*display_header_decoration) {
"""<div id="header-decoration"><div id="header-decoration-inner"></div></div>""";
}
if ($.global_title) {
"""<h1 id="title"><span><a href='""" + $.base_url + """'>""" + $.global_title + """</a></span></h1>""";
}
}
function print_stylesheet() {
var string medium_media_query = generate_medium_media_query();
var string header_decoration_colors = generate_color_css( new Color, $*color_page_text, $*color_page_title );
var string header_decoration_inner_colors = generate_color_css( new Color, $*color_page_border, $*color_page_background );
var string entry_title_link_colors = generate_color_css( $*color_entry_title, new Color, new Color );
var string comment_header_link_colors = generate_color_css( $*color_entry_title, new Color, new Color );
var string bottomcomment_colors = generate_color_css( new Color, $*color_page_border, new Color );
var string module_header_link_colors = generate_color_css( $*color_module_title, new Color, new Color );
var string calendar_colors = generate_color_css( $*color_page_title, $*color_calendar_module_emptyday_background, new Color );
var string calendar_link_colors = generate_color_css( $*color_page_background, $*color_calendar_module_hasday_background, new Color );
var string userpic_css = "";
if ($*userpics_position == "left") {
$userpic_css = """
.has-userpic .entry .contents .userpic,
.has-userpic .comment .contents .userpic { float: left;
margin: 0 .5em .5em 0; }
""";
}
elseif ($*userpics_position == "right") {
$userpic_css = """
.has-userpic .entry .contents .userpic,
.has-userpic .comment .contents .userpic { float: right;
margin: 0 0 .5em .5em; }
""";
}
var string navlinks_css = "";
if ($*module_navlinks_section == "header") {
$navlinks_css = """
.module-navlinks {
background: $*color_navigation_module_background;
border: none;
margin: 0;
margin-top: 1em;
padding: 0;
text-align: left;
width: 100%;
}
.module-navlinks ul {
background: $*color_navigation_module_background;
margin: 0;
padding-left: 1em;
}
.module-navlinks ul li {
border-left: 1px solid $*color_page_border;
border-right: 1px solid $*color_page_border;
display: inline;
margin: 0;
padding: .25em .5em;
}
.module-navlinks a {
color: $*color_header_link;
font-size: small;
padding: .15em .5em;
text-decoration: none;
}
.module-navlinks a:visited { color: $*color_header_link_visited; }
.module-navlinks a:hover {
background-color: $*color_header_link_hover_background;
color: $*color_header_link_hover;
text-decoration: underline;
}
.module-navlinks a:active { color: $*color_header_link_active; }
""";
}
else {
$navlinks_css = "";
}
"""
/* Boxes and Borders */
blockquote { border-left: 3px solid $*color_entry_border;
padding-left: .5em; }
dl dt { font-weight: bold; }
ul { list-style: square; }
a { text-decoration: underline; }
a:hover { text-decoration: none; }
body {
border: none;
margin: 0;
}
#canvas { position: relative;
padding-top: 1px; /*margin collapse prevention*/
float: left; width: 100%; /*asinine IE7 hack to keep left sidebar from sliding under #primary when #canvas is relative*/ }
/* header */
#header {
padding: 0;
margin-bottom: 1em;
text-align: right;
}
#title {
font-size: x-large;
font-weight: normal;
padding-right: 20px;
padding-top: 1em;
}
#title a {
color: $*color_page_title;
}
#subtitle {
font-size: large;
font-weight: normal;
padding-right: 20px;
}
#pagetitle {
font-size: medium;
font-style: italic;
font-weight: normal;
padding-right: 20px;
}
#header-decoration {
$header_decoration_colors
border-width: .65em;
float: left;
margin-left: 7em;
margin-top: 1.5em;
}
#header-decoration-inner { margin: .5em;
$header_decoration_inner_colors
border-width: 0.5em;
width: 1em;
height: 1em;}
/* main column */
#primary > .inner:first-child {
padding: 1em 2em;
}
@media $medium_media_query {
.two-columns-left .navigation,
.three-columns-left .navigation { text-align: right; }
}
/* entries */
.entry li { margin-left: 1em; }
.entry-content hr { display: block;
margin: 1em 10%; }
.entry { margin-bottom: 3em;
border: none;
border-bottom: 10px dotted $*color_entry_border;
border-top: 10px dotted $*color_entry_border;
position: relative; }
.entry .entry-title {
padding: .25em 5px;
margin-bottom: .5em;}
.entry .entry-title a,
.entry .entry-title a:visited { $entry_title_link_colors
text-decoration: none }
.entry .entry-title a:hover { text-decoration: underline; }
.entry .datetime { font-size: small;
padding: 0 5px;
color: $*color_page_details_text; }
.entry .poster { display: block;
margin: .5em 0; }
.entry .contents { padding: 0 .5em; }
.entry-content { margin: 1em 0; }
.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; }
.entry .footer > .inner:first-child { padding: 1px; } /*float uneveness fix */
.entry .tag { margin-left: .25em; }
.entry .tag li { margin-left: 0; padding: .25em 0; }
.entry .tag-text { font-weight: bold; }
ul.entry-management-links { float: left;
margin-left: -1em;
margin-top: 1em; }
ul.entry-interaction-links { text-align: right;
margin-top: 1em;
margin-bottom: .25em;
min-height: 17px; } /* prevent entry-management icons from shoving quickreply aside */
/* comments */
.comment { margin-bottom: 1em; }
.partial .comment { margin-bottom: 0;}
.comment .header { padding: 2px 5px;
margin-bottom: .5em;
border-left: 10px dashed $*color_entry_border; }
.comment .header a,
.comment .header a:visited { $comment_header_link_colors }
.comment-title {
font-weight: bold;
padding: 0 0 .25em;
}
.partial .comment-title {
display: inline;
margin-right: .2em;
}
.partial .comment-poster:before {
content: "- ";
}
.comment .poster-ip { font-size: small;
color: $*color_page_details_text; }
.comment-content { margin-top: 1em; }
.comment .edittime { margin-top: 1em; }
.comment .header .datetime { color: $*color_entry_title; }
.comment .multiform-checkbox { display: block;
text-align: right;
font-size: small;
color: $*color_entry_text;
}
.comment .footer { margin: .5em 0; }
.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: 1px 1px 3px 1px;
$bottomcomment_colors }
.bottomcomment .entry-management-links,
.bottomcomment .entry-interaction-links { margin: .25em 0 .5em 0; }
.comment-pages { text-align: center; }
#qrdiv { margin: 1em; }
#qrdiv table { width: 100%; }
/* archive */
/* year-by-month view */
#archive-year .navigation { text-align: left; }
div.month { margin: 0 0 2em 0; }
table.month td,
table.month th { border-color: $*color_entry_border;
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; }
.month dl .tag-text { font-style: italic; }
.month dl h3.entry-title { font-weight: bold; }
/* day-by-entries view */
.day .inner > h3:first-child { text-align: center; }
/* icons */
.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;
}
.icon-keywords ul li {
margin-left: 0;
padding: .25em 0;
}
/* sidebars */
#secondary > .inner:first-child,
#tertiary > .inner:first-child {
padding: 1em .5em !important;
}
#secondary, #tertiary { margin-top: 0; }
.module { padding: 3px;
margin-bottom: 1em;
border: none; }
.module-header {
border-left: 8px dashed $*color_module_border;
font-size: large;
padding: 1px 3px; }
.module-header a,
.module-header a:visited { $module_header_link_colors
text-decoration: none; }
.module-header a:hover { text-decoration: underline; }
.module-content ul { list-style: outside square; }
@media $medium_media_query {
.two-columns #secondary .module-userprofile,
.three-columns .module-userprofile {
text-align: center;
}
}
.module-userprofile .module-header { text-align: left; }
.module-typelist ul { list-style: none; }
$navlinks_css
.module-customtext .module-content { padding: .25em 0; }
.module-calendar td { $calendar_colors }
.module-calendar td a { $calendar_link_colors
text-decoration: none; }
$userpic_css
""";
}