mourningdove/styles/basicboxes/layout.s2

518 lines
14 KiB
Text
Raw Permalink Normal View History

2026-05-24 01:03:05 +00:00
layerinfo "type" = "layout";
layerinfo "name" = "Basic Boxes";
layerinfo redist_uniq = "basicboxes/layout";
layerinfo author_name = "branchandroot";
layerinfo lang = "en";
set layout_type = "three-columns-sides";
set layout_authors = [ { "name" => "branchandroot", "type" => "user" } ];
set userpics_position = "right";
##===============================
## Colors
##===============================
propgroup colors_child {
property use color_page_details_text;
property use color_header_link;
property use color_header_link_active;
property use color_header_link_hover;
property use color_header_link_visited;
}
set color_page_details_text = "#999";
##===============================
## Fonts
##===============================
set font_journal_title = "'Book Antiqua', Palatino, 'Times New Roman', serif";
set font_journal_subtitle = "'Book Antiqua', Palatino, 'Times New Roman', serif";
##===============================
## 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");
"""<div id="journaltitles-container">""";
$this->print_header();
"""</div>""";
"""
</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 print_stylesheet () {
var string medium_media_query = generate_medium_media_query();
var string primary_colors = generate_color_css( $*color_entry_text, $*color_entry_background, $*color_entry_border );
var string header_colors = generate_color_css( new Color, $*color_header_background, $*color_page_border );
var string link_colors = generate_color_css( $*color_entry_link, new Color, new Color );
var string link_colors_visited = generate_color_css( $*color_entry_link_visited, new Color, new Color );
var string entry_colors = generate_color_css( new Color, $*color_entry_title_background, $*color_entry_border );
var string entry_title_colors = generate_color_css( $*color_entry_title, new Color, new Color );
var string comment_colors = generate_color_css( $*color_entry_text, $*color_entry_background, new Color );
var string comment_header_colors = generate_color_css( $*color_page_title, $*color_header_background, $*color_entry_border );
var string comment_title_colors = generate_color_css( $*color_page_title, new Color, new Color );
var string module_colors = generate_color_css( $*color_module_text, $*color_module_background, $*color_module_border );
var string module_header_colors = generate_color_css( $*color_module_title, $*color_module_title_background, $*color_module_border );
var string module_header_link_colors = generate_color_css( $*color_module_title, new Color, 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 userpic_css = "";
if ($*userpics_position == "left") {
$userpic_css = """
.has-userpic .entry .contents .userpic,
.has-userpic .comment .contents .userpic { float: left;
margin: -1em .25em .25em 0; }
.has-userpic .comment .contents .userpic { margin-top: 0 }
.entry .header { text-align: right; }
.entry-title,
.comment-title { text-align: left; }
""";
}
elseif ($*userpics_position == "right") {
$userpic_css = """
.has-userpic .entry .contents .userpic,
.has-userpic .comment .contents .userpic { float: right;
margin: -1em 0 .25em .25em; }
.has-userpic .comment .contents .userpic { margin-top: 0 }
""";
}
var string navlinks_css = "";
if ($*module_navlinks_section == "header") {
$navlinks_css = """
.module-navlinks {
background: none;
border: none;
margin: 0;
padding: .5em 0 0 .25em;
}
.module-navlinks ul {
margin: 0;
padding: 0;
}
.module-navlinks ul li {
border-left: 1px solid $*color_page_border;
border-right: 1px solid $*color_page_border;
display: inline;
margin: 0;
padding: 0;
}
.module-navlinks ul li a {
color: $*color_header_link;
font-size: small;
padding: .15em .5em;
}
.module-navlinks a:visited { color: $*color_header_link_visited; }
.module-navlinks a:hover { color: $*color_header_link_hover; }
.module-navlinks a:active { color: $*color_header_link_active; }
""";
}
else {
$navlinks_css = "";
}
"""
/* Basic Boxes */
blockquote { font-style: italic; }
dl dt { font-weight: bold; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
body {
margin: 0;
}
#canvas { position: relative;
float: left; width: 100%; /*asinine IE7 hack to keep left sidebar from sliding under #primary when #canvas is relative*/ }
/* header */
#header {
background-color: transparent;
padding: 0;
}
#header #journaltitles-container {
$header_colors
margin: 2em 3.5em 2.5em;
padding: 0 .5em;
text-align: center;
}
/* main column */
#primary { $primary_colors
margin-bottom: 1em; }
#primary a { $link_colors }
#primary a:visited { $link_colors_visited }
#primary {
width: 96%;
margin-right: -98%;
margin-left: 2%;
}
@media $medium_media_query {
.multiple-columns #primary {
width: 98%;
}
.column-left #primary {
margin-left: 0;
}
.column-right #primary {
margin-left: 2%;
}
.three-columns-sides #primary {
width:100%;
margin-right:-100%;
margin-left: 0;
}
.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; }
.entry .entry-title { $entry_colors
padding: .25em 5px;
margin-bottom: .5em;}
#primary .entry .entry-title a,
#primary .entry .entry-title a:visited { $entry_title_colors }
.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; clear: both; }
.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;
margin-bottom: 0; }
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 */
.page-entry #primary > .inner:first-child { padding: 1em 0; }
.page-entry .entry-wrapper { padding: 0 1em; }
.partial .comment { margin-bottom: 0; padding: 0 .5em; }
.comment > .inner:first-child { padding: 1em; }
.comment { margin-bottom: 1em; $comment_colors }
.comment .header { $comment_header_colors
padding: 2px 5px;
margin-bottom: .5em; }
#primary .comment .comment-title a,
#primary .comment .comment-title a:visited { $comment_title_colors }
.comment-title {
font-weight: bold;
padding: 0 0 .25em;
}
.partial .comment-title {
display: inline;
margin-right: .2em;
}
.partial .comment-poster:before {
content: "- ";
}
#primary .partial .comment .comment-title a,
#primary .partial .comment .comment-title a:visited { color: $*color_entry_link; }
.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 {
$module_header_colors
padding: .25em;
}
.bottomcomment .entry-management-links,
.bottomcomment .entry-interaction-links { margin: .25em 0 .5em 0; }
.comment-pages { text-align: center; }
#qrdiv table { width: 100%; margin: 1em 0; }
/* 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_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; }
.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 */
.icons-container .header {
$entry_colors
color: $*color_entry_title;
}
/* Reset font size to H3 */
/* But use entry title font if set */
.icons-container h2 {
font-size: 1.17em;
$entry_title_font
margin: 0;
padding: .25em 5px;
}
.icons-container .contents {
padding: 0 .5em;
}
.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: 0 .5em !important;
}
@media $medium_media_query {
.three-columns-right #secondary > .inner:first-child {
padding: 0 0 0 .5em !important;
}
.three-columns-right #tertiary > .inner:first-child {
padding: 0 !important;
}
.three-columns-left #secondary > .inner:first-child {
padding: 0 !important;
}
.three-columns-left #tertiary > .inner:first-child {
padding: 0 .5em 0 0 !important;
}
.two-columns #secondary .module-search .search-form,
.three-columns .module-search .search-form {
text-align: right;
}
}
.module { padding: 3px;
margin: 0 .5em 1em .5em;
$module_colors }
.module-header {
text-align: center;
font-size: large;
padding: 1px 3px;
$module_header_colors }
.module-header a,
.module-header a:visited { $module_header_link_colors }
.module-userprofile { text-align: center; }
.module-customtext .module-content { padding: .25em 0; }
.module-typelist ul { list-style: none; }
$navlinks_css
.module-search input { border: 1px solid $*color_entry_border;
background: $*color_entry_background, !important;
font-size: .9em !important;
color: $*color_entry_text !important; }
$userpic_css
""";
}