layerinfo "type" = "layout";
layerinfo "name" = "Tabula Rasa";
layerinfo redist_uniq = "core2base/layout";

##===============================
## Presentation
##===============================

propgroup presentation {
    property use layout_type;
    property use num_items_recent;
    property use num_items_reading;
    property use use_custom_friend_colors;
    property use use_shared_pic;
    property use use_journalstyle_entry_page;
    property use margins_size;
    property use margins_unit;
    property use sidebar_width;
    property use sidebar_width_doubled;
    property use medium_breakpoint_width;
    property use large_breakpoint_width;
    property use custom_control_strip_colors;

    property use reverse_sortorder_group;
    property use reg_firstdayofweek;
    property use tags_page_type;
    property use num_items_icons;
    property use icons_page_sort;

    property use all_entrysubjects;
    property use all_commentsubjects;
    property use entry_datetime_format_group;
    property use comment_datetime_format_group;
    property use userpics_style_group;
    property use userpics_position;
    property use entry_metadata_position;
    property use userlite_interaction_links;
    property use entry_management_links;
    property use comment_management_links;

}

set layout_type = "one-column";
set sidebar_width = "15em";
set sidebar_width_doubled = "30em";
set userpics_position = "left";
set use_custom_friend_colors = false;
set custom_foreground_element = "userpic_border";
set custom_background_element = "userpic_background";

##===============================
## Colors
##===============================

propgroup colors {
    property use color_page_background;
    property use color_page_text;
    property use color_page_link;
    property use color_page_link_active;
    property use color_page_link_hover;
    property use color_page_link_visited;
    property use color_page_border;

    property use color_module_background;
    property use color_module_text;
    property use color_module_link;
    property use color_module_link_active;
    property use color_module_link_hover;
    property use color_module_link_visited;
    property use color_module_title_background;
    property use color_module_title;
    property use color_module_border;

    property use color_header_background;
    property use color_page_title;

    property use color_footer_background;
    property use color_footer_link;
    property use color_footer_link_active;
    property use color_footer_link_hover;
    property use color_footer_link_visited;

    property use color_entry_background;
    property use color_entry_text;
    property use color_entry_link;
    property use color_entry_link_active;
    property use color_entry_link_hover;
    property use color_entry_link_visited;
    property use color_entry_title_background;
    property use color_entry_title;
    property use color_entry_interaction_links;
    property use color_entry_interaction_links_active;
    property use color_entry_interaction_links_hover;
    property use color_entry_interaction_links_visited;
    property use color_entry_border;

    property use color_comment_title_background;
    property use color_comment_title;

    property use control_strip_bgcolor;
    property use control_strip_fgcolor;
    property use control_strip_bordercolor;
    property use control_strip_linkcolor;
}

##===============================
## Fonts
##===============================

propgroup fonts {
    property use font_base;
    property use font_fallback;
    property use font_base_size;
    property use font_base_units;
    property use font_module_heading;
    property use font_module_heading_size;
    property use font_module_heading_units;
    property use font_module_text;
    property use font_module_text_size;
    property use font_module_text_units;
    property use font_journal_title;
    property use font_journal_title_size;
    property use font_journal_title_units;
    property use font_journal_subtitle;
    property use font_journal_subtitle_size;
    property use font_journal_subtitle_units;
    property use font_entry_title;
    property use font_entry_title_size;
    property use font_entry_title_units;
    property use font_comment_title;
    property use font_comment_title_size;
    property use font_comment_title_units;
    property use font_sources;
}

set font_base = "";
set font_fallback = "";
set font_base_size = "100";
set font_base_units = "%";

##===============================
## Images
##===============================

propgroup images {
    property use image_background_page_group;
    property use image_background_module_group;
    property use image_background_header_group;
    property use image_background_header_height;
    property use image_background_entry_group;
}

##===============================
## Modules
##===============================

propgroup modules {
    property use module_userprofile_group;
    property use module_navlinks_group;
    property use module_calendar_group;
    property use module_links_group;
    property use module_syndicate_group;
    property use module_tags_group;
    property use module_pagesummary_group;
    property use module_active_group;
    property use module_time_group;
    property use module_poweredby_group;
    property use module_customtext_group;
    property use module_credit_group;
    property use module_search_group;
    property use module_cuttagcontrols_group;
    property use module_subscriptionfilters_group;
}

# Explicitly define what sections the layout has available
set module_layout_sections = "none|(none)|one|Main Module Section|two|Secondary Module Section";

##===============================
## Text
##===============================

propgroup text {

    property use text_module_userprofile;
    property use text_module_links;
    property use text_module_syndicate;
    property use text_module_tags;
    property use text_module_popular_tags;
    property use text_module_pagesummary;
    property use text_module_active_entries;
    property use text_module_customtext;
    property use text_module_customtext_url;
    property use text_module_customtext_content;
    property use text_module_credit;
    property use text_module_search;
    property use text_module_cuttagcontrols;
    property use text_module_subscriptionfilters;

    property use text_view_recent;
    property use text_view_archive;
    property use text_view_friends;
    property use text_view_friends_comm;
    property use text_view_network;
    property use text_view_tags;
    property use text_view_memories;
    property use text_view_userinfo;

    property use text_entry_prev;
    property use text_entry_next;
    property use text_edit_entry;
    property use text_edit_tags;
    property use text_mem_add;
    property use text_tell_friend;
    property use text_watch_comments;
    property use text_unwatch_comments;

    property use text_read_comments;
    property use text_read_comments_friends;
    property use text_read_comments_screened_visible;
    property use text_read_comments_screened;
    property use text_post_comment;
    property use text_post_comment_friends;
    property use text_permalink;

    property use text_meta_location;
    property use text_meta_mood;
    property use text_meta_music;
    property use text_meta_xpost;
    property use text_tags;

    property use text_stickyentry_subject;

    property use text_max_comments;
    property use text_skiplinks_back;
    property use text_skiplinks_forward;
}

##===============================
## Custom CSS
##===============================

propgroup customcss {
    property use external_stylesheet;
    property use include_default_stylesheet;
    property use linked_stylesheet;
    property use custom_css;
}

function Page::print_default_stylesheet() {
    var string medium_media_query = generate_medium_media_query();
    var string large_media_query = generate_large_media_query();

    var string page_background = generate_background_css ($*image_background_page_url, $*image_background_page_repeat, $*image_background_page_position, $*color_page_background);
    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) {
        $header_background = """
            $header_background
            height: """ + $*image_background_header_height + """px;""";
    }

    var string footer_background = generate_background_css( "", "", "", $*color_footer_background );
    var string footer_link_colors = generate_color_css( $*color_footer_link, new Color, new Color );
    var string footer_link_active_colors = generate_color_css( $*color_footer_link_active, new Color, new Color );
    var string footer_link_hover_colors = generate_color_css( $*color_footer_link_hover, new Color, new Color );
    var string footer_link_visited_colors = generate_color_css( $*color_footer_link_visited, new Color, new Color );

    var string entry_background = generate_background_css ($*image_background_entry_url, $*image_background_entry_repeat, $*image_background_entry_position, $*color_entry_background);
    var string module_background = generate_background_css ($*image_background_module_url, $*image_background_module_repeat, $*image_background_module_position, $*color_module_background);

    var string page_colors = generate_color_css($*color_page_text, $*color_page_background, $*color_page_border);
    var string entry_colors = generate_color_css($*color_entry_text, $*color_entry_background, $*color_entry_border);
    var string module_colors = generate_color_css($*color_module_text, $*color_module_background, $*color_module_border);

    var string page_title_colors = generate_color_css($*color_page_title, new Color, new Color);
    var string entry_title_colors = generate_color_css($*color_entry_title, $*color_entry_title_background, new Color);
    var string comment_title_colors = generate_color_css($*color_comment_title, $*color_comment_title_background, new Color);
    var string module_title_colors = generate_color_css($*color_module_title, $*color_module_title_background, new Color);

    var string page_link_colors = generate_color_css($*color_page_link, new Color, new Color);
    var string page_link_active_colors = generate_color_css($*color_page_link_active, new Color, new Color);
    var string page_link_hover_colors = generate_color_css($*color_page_link_hover, new Color, new Color);
    var string page_link_visited_colors = generate_color_css($*color_page_link_visited, new Color, new Color);

    var string entry_link_colors = generate_color_css($*color_entry_link, new Color, new Color);
    var string entry_link_active_colors = generate_color_css($*color_entry_link_active, new Color, new Color);
    var string entry_link_hover_colors = generate_color_css($*color_entry_link_hover, new Color, new Color);
    var string entry_link_visited_colors = generate_color_css($*color_entry_link_visited, new Color, new Color);
    var string entry_interaction_link_colors = generate_color_css($*color_entry_interaction_links, new Color, new Color);
    var string entry_interaction_link_active_colors = generate_color_css($*color_entry_interaction_links_active, new Color, new Color);
    var string entry_interaction_link_hover_colors = generate_color_css($*color_entry_interaction_links_hover, new Color, new Color);
    var string entry_interaction_link_visited_colors = generate_color_css($*color_entry_interaction_links_visited, new Color, new Color);

    var string module_link_colors = generate_color_css($*color_module_link, new Color, new Color);
    var string module_link_active_colors = generate_color_css($*color_module_link_active, new Color, new Color);
    var string module_link_hover_colors = generate_color_css($*color_module_link_hover, new Color, new Color);
    var string module_link_visited_colors = generate_color_css($*color_module_link_visited, new Color, new Color);

    var string page_font = generate_font_css("", $*font_base, $*font_fallback, $*font_base_size, $*font_base_units);
    var string page_title_font = generate_font_css($*font_journal_title, $*font_base, $*font_fallback, $*font_journal_title_size, $*font_journal_title_units);
    var string page_subtitle_font = generate_font_css($*font_journal_subtitle, $*font_base, $*font_fallback, $*font_journal_subtitle_size, $*font_journal_subtitle_units);
    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 comment_title_font = generate_font_css($*font_comment_title, $*font_base, $*font_fallback, $*font_comment_title_size, $*font_comment_title_units);
    var string module_font = generate_font_css($*font_module_text, $*font_base, $*font_fallback, $*font_module_text_size, $*font_module_text_units);
    var string module_title_font = generate_font_css($*font_module_heading, $*font_base, $*font_fallback, $*font_module_heading_size, $*font_module_heading_units);


     var string userpic_css = "";
         if ($*userpics_position == "right") {
             $userpic_css = """
             .entry .userpic,
             .comment .userpic {
                 text-align: right;
                 }
             """;
         }
    print_custom_control_strip_css();

    """
H1, H2, H3 {
    margin: .25em 0;
    padding: .25em 0;
}

img {
    border: none;
}

hr {
    display: none;
}
.entry-content hr,
.comment-content hr {
    display: block;
    margin: 1em 10%;
}

body {
    $page_font
    padding: 0;
    $page_background
    $page_colors
}

html body {
    margin-left: $*margins_size$*margins_unit;
    margin-right: $*margins_size$*margins_unit;
}

a { $page_link_colors }
a:visited { $page_link_visited_colors }
a:hover { $page_link_hover_colors }
a:active { $page_link_active_colors }

q { font-style: italic; }

/* #content layout */
#content { float: none; }
@media $medium_media_query {
    .two-columns-left #content,
    .three-columns-sides #content {
        border-left: $*sidebar_width solid transparent;
    }
    .two-columns-right #content,
    .three-columns-sides #content {
        border-right: $*sidebar_width solid transparent;
    }
    .three-columns-left #content {
        border-left: $*sidebar_width_doubled solid transparent;
    }
    .three-columns-right #content {
        border-right: $*sidebar_width_doubled solid transparent;
    }
    .column-right #content {
        min-width: $*sidebar_width; /* prevents sidebar overlap of entry, when entry becomes narrower than sidebar */
    }
}

#content-footer {
    height: 0;
    font-size: 0; /*to make IE happy*/
    clear: both;
}

#header, #footer {
    margin: 0;
    clear: both;
    padding: .5em;
}

#header {
    $header_background
    $page_title_colors
}

h1#title {
    $page_title_font
}

h2#subtitle,
h2#pagetitle {
    $page_subtitle_font
}

#footer {
    $footer_background
}

#footer a { $footer_link_colors }
#footer a:visited { $footer_link_visited_colors }
#footer a:hover { $footer_link_hover_colors }
#footer a:active { $footer_link_active_colors }

#primary {
    width:100%;
    margin-right:-100%;
    margin-left: 0;
}

#primary > .inner:first-child, #secondary > .inner:first-child, #tertiary > .inner:first-child {
    padding: 1em;
}

/* modules layout */
#primary { float: none; }
#secondary, #tertiary { width: 100%; }

@media $medium_media_query {
    .multiple-columns #primary {
        float: left;
    }

    .two-columns-left #secondary,
    .three-columns-sides #secondary {
        float: left;
        width: $*sidebar_width;
        margin-left: -$*sidebar_width;
    }
    .two-columns-right #secondary {
        float: right;
        width: $*sidebar_width;
        margin-right: -$*sidebar_width;
    }
    .three-columns-left #secondary {
        float: left;
        width: $*sidebar_width;
        margin-left: -$*sidebar_width_doubled;
    }
    .three-columns-right #secondary {
        float: right;
        width: $*sidebar_width;
        margin-right: -$*sidebar_width;
    }

    .two-columns #tertiary {
        clear: both;
        width: auto;
    }
    .two-columns-left #tertiary { margin-left: -$*sidebar_width; }
    .two-columns-right #tertiary { margin-right: -$*sidebar_width; }
    .two-columns #tertiary .module {
        float: left;
        width: $*sidebar_width;
    }
    .three-columns-left #tertiary {
        float: left;
        width: $*sidebar_width;
        margin-left: -$*sidebar_width;
    }
    .three-columns-right #tertiary {
        float: right;
        width: $*sidebar_width;
        margin-right: -$*sidebar_width_doubled;
        margin-left: $*sidebar_width; /* so that #tertiary won't overlay #secondary in IE7 */
    }
    .three-columns-sides #tertiary {
        float: right;
        width: $*sidebar_width;
        margin-right: -$*sidebar_width;
    }
}

.navigation ul {
    margin-left: 0;
    padding-left: 0;
}
.navigation li {
    display: inline;
    padding: 0 .5em;
}
.noentries {
    padding: 0 .5em;
}

/* entries */

.entry {
    $entry_background
    $entry_colors
}

.entry .entry-title {
    $entry_title_font
}

.entry .entry-title, .entry .entry-title a {
    $entry_title_colors
}

.no-subject .entry .entry-title {
    background: none;
    border: none;
}

.entry a { $entry_link_colors }
.entry a:visited { $entry_link_visited_colors }
.entry a:hover { $entry_link_hover_colors }
.entry a:active { $entry_link_active_colors }

/* ensure comment content stretches out horizontally so it's readable */
.comment-content:before {
    content: "";
    display: block;
    overflow: hidden;
    width: 10em;
}
.comment-content { border-top: 1px transparent solid; } /* for firefox */

/* To prevent overlapping when icon's on the left */
/* and list is the first thing in content */
.entry-content li,
.comment-content li {
    list-style-position: inside;
    }

/* To constrain the width and prevent layout breaking */
.entry-content img, .comment-content img {
    max-width: 100%;
    height: auto;
}

@media $large_media_query {
    .entry-content img, .comment-content img { max-width: none; }
}

.metadata ul {
    display: inline;
    list-style: none;
    margin-left: .5em;
    padding-left: 0;
}
.metadata li {
    margin-bottom: .5em;
}
.metadata.top-metadata ul {
    margin: 0;
}
.metadata.top-metadata {
    margin-bottom: 1em;
}

.tag ul {
    display: inline;
    margin-left: 0;
    padding-left: 0;
}

.tag ul li {
    display: inline;
} /* same for month view */

ul.entry-management-links {
    margin-left: 0;
    padding-left: 0;
}
ul.entry-management-links li {
    display: inline;
    padding: 0 .25em;
}

ul.entry-interaction-links {
    margin-left: 0;
    padding-left: 0;
    text-align: right;
}

.entry-interaction-links a, .entry-management-links a { $entry_interaction_link_colors }
.entry-interaction-links a:visited, .entry-management-links a:visited { $entry_interaction_link_visited_colors }
.entry-interaction-links a:hover, .entry-management-links a:hover { $entry_interaction_link_hover_colors }
.entry-interaction-links a:active, .entry-management-links a:active { $entry_interaction_link_active_colors }

ul.entry-interaction-links li {
    display: inline;
    padding: 0 .25em;
}

/* comments */

.comment-posted {font-weight:bold;}

.comment-wrapper {
    padding: .5em 0;
    min-width: 15em;
}

.comment .comment-title {
    $comment_title_font
    margin: 0;
}

.comment .comment-title, .comment .comment-title a {
    $comment_title_colors
}

.no-subject .comment .comment-title {
    background: none;
    border: none;
}

ul.comment-management-links {
    margin-left: 0;
    padding-left: 0;
    text-align: right;
}
ul.comment-management-links li {
    display: inline;
    padding: 0 .25em;
}

ul.comment-interaction-links {
    margin-left: 0;
    padding-left: 0;
}
ul.comment-interaction-links li {
    display: inline;
    padding: 0 .25em;
}

textarea#commenttext {
    width: 100%; /* fix for FF form width glitch */
}

/* archive */

table.month {
    margin: 0 auto;
    border-collapse: collapse;
}
table.month td {
    height: 3.25em;
}
table.month td,
table.month th {
    border: 1px solid; /* ? */
    padding: 3px;
}
table.month td p {
    margin: 0;
    padding: 3px;
}

.month dl dt {
    font-weight: bold;
}
.month dl .time {
    padding-right: .5em;
}
.month dl h3 {
    display: inline;
    font-size: medium;
}
.page-month .month .entry-poster {
    margin-right: .5em;
}
.month dl .tag ul {
    margin-top: 0;
}

/* icons */

.sorting-options ul {
    margin-left: 0;
}

.sorting-options ul li {
    display: inline;
}

.icon-keywords ul {
    display: inline;
    margin-left: 0;
    padding-left: 0;
}

.icon-keywords ul li {
    display: inline;
}

/* modules */

.module {
    $module_background
    $module_colors
}

.module a { $module_link_colors }
.module a:visited { $module_link_visited_colors }
.module a:hover { $module_link_hover_colors }
.module a:active { $module_link_active_colors }

.module h2 {
    $module_title_colors
    $module_title_font
}

.module-content {
    $module_font
}

.module-content ul {
    list-style: outside;
    margin-left: 1em;
    padding-left: 0;
}
.module-content li {
    margin: .5em 0;
}

ul.userlite-interaction-links.icon-links {
    margin-left: 0;
    padding-left: 0;
}

ul.userlite-interaction-links.icon-links li {
    display: inline;
    padding: 0 .20em;
}

ul.userlite-interaction-links.text-links {
    text-align: left;
}

.any-column .module-calendar table { margin: 0; }
.module-calendar .module-content { text-align: left; }
@media $medium_media_query {
    .multiple-columns .module-calendar .module-content {
        text-align: center;
    }

    .multiple-columns .module-calendar table {
        margin: 0 auto;
    }

    .multiple-columns .module-syndicate .module-content {
        text-align: center;
    }
}

.module-calendar td {
    padding: 1px;
}
.module-calendar td a {
    display: block;
    padding: 2px;
}

.search-box {
    margin: .2em auto;
    max-width: 100%;
}

.search-form .search-box-item, 
.search-form .search-button-item {
    display: block
}

.search-form .comment_search_checkbox_item {
    display: inline
}

/* wrap long content, particularly openid usernames */
.module-pagesummary .ljuser {
    white-space: normal !important;
}
.module-pagesummary .module-content {
    word-wrap: break-word;
}

.module-credit .category-title {
    font-weight: bold;
}

.tags_cloud li, .module-tags_cloud li { display: inline; }

$userpic_css
    """;
}

layerinfo type = "layout";
layerinfo name = "Medallion Vertical";
layerinfo redist_uniq = "medallionvertical/layout";
layerinfo author_name = "ninetydegrees";
layerinfo lang = "en";
layerinfo is_public = 1;
layerinfo source_viewable = 1;

set layout_authors = [ {"name" => "ninetydegrees", "type" => "user"} ];

##===============================
## Presentation
##===============================

propgroup presentation_child {
  property int right_margin {
    des = "Content right margin (in %)";
    size = 5;
  }
  property string post_text_align {
    des = "Content text alignment";
    values = "left|Left|justify|Justify";
  }

  property bool show_journaltitle {
    des = "Show the journal title";
    note = "Text will be hidden from view but still displayed to screenreaders.";
  }

  property bool show_journalsubtitle {
    des = "Show the journal subtitle";
    note = "Text will be hidden from view but still displayed to screenreaders.";
  }

  property bool show_pagetitle {
    des = "Show the page title";
    note = "Text will be hidden from view but still displayed to screenreaders.";
  }
}

set layout_type = "two-columns-left";
set right_margin = 10;
set show_journaltitle = false;
set show_journalsubtitle = false;
set show_pagetitle = false;
set lang_fmt_date_short_dayfirst_full = "%%dd%%.%%mm%%.%%yyyy%%";
set entry_date_format = "short_dayfirst_full";
set entry_time_format = "short";
set comment_date_format = "short_dayfirst_full";
set comment_time_format = "short";
set post_text_align = "justify";
set userlite_interaction_links = "text";
set reverse_sortorder_year = true;
set reverse_sortorder_month = true;
set reverse_sortorder_day = true;
set reg_firstdayofweek = "monday";
set userpics_position = "right";
set all_commentsubjects = true;

##===============================
## Colors
##===============================

propgroup colors_child {  
  property Color color_menu_background { des = "Menu background color"; }
  property Color color_menu_link { des = "Menu link color"; }
  property Color color_menu_link_active { des = "Menu link active color"; }
  property Color color_menu_link_hover { des = "Menu link hover color"; }
  property Color color_menu_link_visited { des = "Menu link visited color"; }
  property Color color_menu_hover_background { des = "Menu background color on hover"; }
  property Color color_menu_hover_link { des = "Menu link color on hover"; }
  property Color color_menu_hover_link_active { des = "Menu link active color on hover";  }
  property Color color_menu_hover_link_hover { des = "Menu link color on hover"; }
  property Color color_menu_hover_link_visited { des = "Menu link visited color on hover"; }

  property Color color_medallion_background {
    des = "Header medallion background color";
  }
  property Color color_medallion_border {
    des = "Header medallion border color";
  }

  property Color color_userpic_background {
    des = "Userpic background color";
  }
  property Color color_userpic_border {
    des = "Userpic border color";
  }

  property Color color_footer_text { des = "Page footer text color"; }

  property Color color_sidebar_border { des = "Sidebar border color"; }
  property Color color_sidebar_text { des = "Sidebar text color"; }
  property Color color_sidebar_link { des = "Sidebar link color"; }
  property Color color_sidebar_link_active { des = "Sidebar active link color"; }
  property Color color_sidebar_link_hover { des = "Sidebar hover link color"; }
  property Color color_sidebar_link_visited { des = "Sidebar visited link color"; }

  property Color color_archive_background { des = "Archive calendar background color"; }
  property Color color_archive_text { des = "Archive calendar text color"; }
  property Color color_archive_link { des = "Archive calendar link color"; }
  property Color color_archive_link_active { des = "Archive calendar active link color"; }
  property Color color_archive_link_hover { des = "Archive calendar hover link color"; }
  property Color color_archive_link_visited { des = "Archive calendar visited link color"; }

  property Color color_archive_hover_background { des = "Archive calendar hover background color"; }
  property Color color_archive_hover_text { des = "Archive calendar hover text color"; }
  property Color color_archive_hover_link { des = "Archive calendar hover link color"; }
  property Color color_archive_hover_link_active { des = "Archive calendar hover active link color"; }
  property Color color_archive_hover_link_hover { des = "Archive calendar hover hover link color"; }
  property Color color_archive_hover_link_visited { des = "Archive calendar hover visited link color"; }
}

##===============================
## Fonts
##===============================

propgroup fonts_child {
  property use font_sources;
  property string font_sidebar {
    des = "Preferred font for the sidebar modules";
    maxlength = 50;
    size = 25;
    note = "For example: Arial or \"Times New Roman\". Leave blank to use the default.";
  }
  property string font_sidebar_size {
    des = "Size of sidebar module font";
    size = 3;
  }
  property string font_sidebar_units {
    des = "Units for sidebar module size";
    values = "em|em|ex|ex|%|%|pt|pt|px|px";
  }
}

set font_sources = "https://fonts.googleapis.com/css?family=Lustria";

set font_base = "'Lustria', 'Times New Roman', Georgia";
set font_fallback = "serif";
set font_base_size = "100";
set font_base_units = "%";
set font_sidebar_size = "1.3";
set font_sidebar_units = "em";
set font_module_heading_size = "1.3";
set font_module_heading_units = "em";
set font_journal_title_size = "1.3";
set font_journal_title_units ="em";
set font_journal_subtitle_size = "1.1";
set font_journal_subtitle_units = "em";
set font_entry_title_size = "1.3";
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_sidebar_group {
    des = "Sidebar background image";
    grouptype = "image";
}
set image_background_sidebar_group = [ "background_sidebar_sidebar_url", "image_background_sidebar_repeat", "image_background_sidebar_position" ];
  property string image_background_sidebar_url {
    des = "Sidebar background image URL";
  }
  property string image_background_sidebar_repeat {
    values = "repeat|tile image|no-repeat|don't tile|repeat-x|tile horizontally|repeat-y|tile vertically";
    grouped = 1;
  }
  property string image_background_sidebar_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_menu_url {
    des = "Menu image URL";
    note = "Leave blank if you do not want to use one. You can use text in addition or instead of an icon.";
  }
  property int image_menu_height {
    des = "The height of your image, in pixels.";
    example = "50";
    size = 6;
  }
  property int image_menu_width {
    des = "The width of your image, in pixels.";
    example = "50";
    size = 6;
  }

  property string image_medallion_url {
    des = "Header medallion image URL";
    note = "The image you link to does not have to be round. The style will display it as a circle. It links to your journal homepage.";
  }
  property int image_medallion_height {
    des = "The height of your image, in pixels.";
    example = "50";
    size = 6;
  }
  property int image_medallion_width {
    des = "The width of your image, in pixels.";
    example = "50";
    size = 6;
  }

  property string image_managelink_url {
    des = "Header background image URL";
  }
  property int image_managelink_height {
    des = "The height of your image, in pixels.";
    example = "50";
    size = 6;
  }
  property int image_managelink_width {
    des = "The width of your image, in pixels.";
    example = "50";
    size = 6;
  }

  property string image_divider_url {
    des = "Divider image URL";
  }
  property int image_divider_height {
    des = "The height of your image, in pixels.";
    example = "50";
    size = 6;
  }
  property int image_divider_width {
    des = "The width of your image, in pixels.";
    example = "50";
    size = 6;
  }

  property string image_subject_url {
    des = "Subject image URL";
  }
  property int image_subject_height {
    des = "The height of your image, in pixels.";
    example = "50";
    size = 6;
  }
  property int image_subject_width {
    des = "The width of your image, in pixels.";
    example = "50";
    size = 6;
  }

  property string image_footer_url {
    des = "Footer image URL";
    note = "The image links to the site homepage.";
  }
  property int image_footer_height {
    des = "The height of your image, in pixels.";
    example = "50";
    size = 6;
  }
  property int image_footer_width {
    des = "The width of your image, in pixels.";
    example = "50";
    size = 6;
  }

}

##===============================
## Modules
##===============================

propgroup modules_child {
  property string module_userprofile_section_override {
    values = "none|(none)|header|Header|one|footer|Footer";
    grouped = 1;
  }
  property string module_navlinks_section_override {
    values = "none|(none)|sidebar|Sidebar|footer|Footer";
    grouped = 1;
  }
  property string module_subscriptionfilters_section_override {
    values = "none|(none)|sidebar|Sidebar|footer|Footer";
    grouped = 1;
  }
}

set grouped_property_override = {
    "module_userprofile_section" => "module_userprofile_section_override",
    "module_navlinks_section" => "module_navlinks_section_override",
    "module_belowheader_section" => "module_belowheader_section_override",
};

set module_layout_sections = "none|(none)|footer|Footer";

set module_userprofile_show = true;
set module_userprofile_order = 1;
set module_userprofile_section = "header";
set module_userprofile_opts_userpic = true;
set module_userprofile_opts_name = true;
set module_userprofile_opts_website = true;

set module_syndicate_show = false;
set module_syndicate_order = 2;
set module_syndicate_section = "footer";

set module_search_show = true;
set module_search_order = 6;
set module_search_section = "footer";

set module_navlinks_show = true;
set module_navlinks_order = 3;
set module_navlinks_section = "sidebar";

set module_subscriptionfilters_show = true;
set module_subscriptionfilters_order = 4;
set module_subscriptionfilters_section = "sidebar";

set module_customtext_show = false;
set module_customtext_order = 5;
set module_customtext_section = "footer";

set module_calendar_show = true;
set module_calendar_order = 7;
set module_calendar_section = "footer";
set module_calendar_opts_type = "";

set module_links_show = false;
set module_links_order = 8;
set module_links_section = "footer";

set module_tags_show = true;
set module_tags_order = 9;
set module_tags_section = "footer";
set module_tags_opts_type = "cloud";
set module_tags_opts_limit = 0;

set module_pagesummary_show = false;
set module_pagesummary_order = 10;
set module_pagesummary_section = "footer";
set module_pagesummary_opts_comments_tooltip = true;

set module_credit_show = true;
set module_credit_order = 11;
set module_credit_section = "footer";

set module_active_show = false;
set module_active_order = 12;
set module_active_section = "footer";

set module_time_show = false;
set module_time_order = 13;
set module_time_section = "footer";

set module_poweredby_show = false;
set module_poweredby_order = 14;
set module_poweredby_section = "footer";

set module_cuttagcontrols_show = false;
set module_cuttagcontrols_order = 15;
set module_cuttagcontrols_section = "footer";

##===============================
## Text
##===============================

propgroup text_child {
  property string text_page_bottom {
    des = "Text of the link which takes you down to the footer";
    maxlength = 20;
    size = 15;
    example = "Bottom";
  }
  property string text_menu {
    des = "Text for the menu";
    size = 250;
    note = "This can be displayed in addition or instead of an icon.";
  }
  property string text_menu_inbox {
    des = "Text for the inbox link in the menu";
    size = 250;
  }
  property string text_menu_settings {
    des = "Text for the settings link in the menu";
    size = 250;
  }
  property string text_header_logout {
    des = "Text for the log out link in the header menu";
    size = 250;
  }
  property string text_header_login {
    des = "Text for the log in link in the header menu";
    size = 250;
  }
  property string text_menu_icon {
    des = "Description for the menu icon";
    size = 250;
  }
  property string text_medallion {
    des = "Description  for the medallion";
    size = 250;
  }
  property string text_image_footer {
    des = "Description for the footer image";
    size = 250;
  }
}

set text_skiplinks_back = "Previous";
set text_skiplinks_forward = "Next";
set text_page_top = "Top";
set text_page_bottom = "Bottom";
set text_menu = "Menu";
set text_menu_inbox = "Inbox";
set text_menu_settings = "Settings";
set text_header_logout = "Log out";
set text_header_login = "Log in";

set text_view_recent = "Home";
set text_view_recent_tagged = "Entries tagged with";
set text_view_archive = "Archive";
set text_view_friends = "Reading";
set text_view_friends_comm = "Members' Posts";
set text_view_friends_filter = "Reading (Custom filter)";
set text_view_network = "Network";
set text_view_network_filter = "Network (Custom filter)";
set text_view_tags = "Tags";
set text_view_memories = "Memories";

set text_default_separator = " . ";
set text_posting_in = " in ";
set text_meta_music = "Music:";
set text_meta_mood = "Mood:";
set text_meta_location = "Location:";
set text_meta_groups = "Access Groups:";
set text_meta_xpost = "Crossposts:";
set text_tags = "Tags:";
set text_entry_prev = "Previous";
set text_entry_next = "Next";

set text_comment_date = "";
set text_comment_from = "Posted by";

##===============================
## Functions
##===============================

## Add link to Profile
## Add links to Inbox and Account Settings
## Move website there

function UserLite::print_interaction_links() {
  var Page p = get_page();
    var string display_type = ($*userlite_interaction_links == "text") ? " text-links" : " icon-links";
    var Link link;
    var int count;
    $count = 0;

    """<ul class="userlite-interaction-links$display_type">""";
    """<li><a href="$p.view_url{"userinfo"}">$*text_module_userprofile</a>""";

    foreach var string k ($.link_keyseq) {
        $link = $this->get_link($k);
        if ($link.url) {
            $count ++;
            if ($*userlite_interaction_links == "text") {
                """<li class="link $k""" + ( $count == 1 ? " first-item" : "" ) + """"><a href="$link.url">$link.caption</a></li>\n""";
            }
            else { ## if ($*userlite_interaction_links == "icon")
                """<li class="link $k""" + ( $count == 1 ? " first-item" : "" ) + """">$link</li>\n""";
            }
        }
    }

    if (viewer_is_owner()) {
      """<li><a href="$*SITEROOT/inbox/">$*text_menu_inbox</a></li>""";
      """<li><a href="$*SITEROOT/manage/settings/">$*text_menu_settings</a></li>""";
    }

    if (viewer_logged_in()) {
      """<li><a href="$*SITEROOT/logout?ret=1">$*text_header_logout</a></li>""";

    } else {

      """<li><a href="$*SITEROOT/login?ret=1">$*text_header_login</a></li>""";

    }

    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 "<li class='journal-website-name'><a href='$p.journal.website_url'>$website_name</a></li>";
    }

    if ($count > 0) {
    """</ul>""";
    }
}

## Add menu display in header

function print_module_userprofile() {
  var Page p = get_page();
  var string textmenu = "";
  if ($*module_userprofile_section=="header") {
    open_module("userprofile", "", "");
    if ($*text_menu != "") { $textmenu = "$*text_menu "; }
    """<ul class="menu"><li>$textmenu<img src="$*image_menu_url" alt="$*text_menu_icon" title="$*text_menu_icon" width="$*image_menu_width" height="$*image_menu_height" />""";

    $p.journal->print_interaction_links();

    """</li></ul>""";

    close_module();
  }

  else {

    open_module("userprofile", $*text_module_userprofile, $p.view_url{"userinfo"});

    if ($*module_userprofile_opts_userpic) {
        if (defined $p.journal.default_pic) {
            """<div class="userpic">""";
            $p.journal->print_userpic();
             "</div>";
        }
    }

    if ($*module_userprofile_opts_name) {
        println "<div class='journal-name'>" + $p.journal.name + "</div>";
    }

    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 "<div class='journal-website-name'><a href='$p.journal.website_url'>$website_name</a></div>";
    }

    $p.journal->print_interaction_links();
    close_module();
    }
}

## Reorder

function Entry::print_poster {
    var Page p = get_page();
    var string emptyclass = ((($p isa RecentPage and not $p isa FriendsPage) or $p isa MonthPage or $p isa DayPage) and $p.journal.journal_type != "C") ? "empty" : "";
    print safe "<span class=\"poster entry-poster $emptyclass\">";
    if ($p isa FriendsPage or $p isa EntryPage or $p isa ReplyPage) {
        $this.poster->print();
        if (not $this.poster->equals($this.journal)) {
            print $*text_posting_in;
            $this.journal->print();
        }
    }
    else {
        if (not $this.poster->equals($this.journal)) {
          $this.poster->print();
        }
    }
    print safe "</span>";
}


## Reorder header
## Move userpic to header
## Move tags to contents for spacing issues

function Page::print_entry(Entry e) {
    $e->print_wrapper_start();
    """<div class="header">\n""";
    """<div class="inner">\n""";
    $e->print_metatypes();
    $e->print_time();
    $e->print_subject();
    $e->print_userpic();
    """</div>\n""";
    """</div>\n""";
    """<div>\n""";
    """<div class="contents">\n""";
    """<div class="inner">\n""";
    $e->print_poster();
    $e->print_text();
    $e->print_metadata();
    $e->print_tags();
    """</div>\n""";
    """</div>\n""";
    """</div>\n""";
    """<div class="footer">\n""";
    """<div class="inner">\n""";
    $this->print_entry_footer($e);
    "</div>\n</div>\n";
    $e->print_wrapper_end();
}

function ReplyPage::print_comment (Comment c) {

    $c->print_wrapper_start();
    """<div class="header">\n""";
    """<div class="inner">\n""";
    $c->print_metatypes();
    $c->print_time();
    $c->print_subject();
    $c->print_userpic();
    """</div>\n""";
    """</div>\n""";
    """<div class="contents">\n""";
    """<div class="inner">\n""";
    """<div class="poster-information">\n""";
    $c->print_poster();
    $c->print_metadata();
    $c->print_text();
    """</div>\n""";
    """</div>\n""";
    """</div>\n""";
    """<div class="footer">\n""";
    """<div class="inner">\n""";
    $c->print_management_links();
    $c->print_interaction_links();
    $c->print_reply_container();
    "</div>\n</div>\n";
    $c->print_wrapper_end();
}

function EntryPage::print_comment (Comment c) {
    $c->print_wrapper_start();
    """<div class="header">\n""";
    """<div class="inner">\n""";
    $c->print_metatypes();
    $c->print_time();
    $c->print_subject();
    $c->print_userpic();
     if ( $c.comment_posted ) {
         print safe "<div class='comment-posted'>$*text_comment_posted</div>";
     }
    """</div>\n""";
    """</div>\n""";
    """<div class="contents">\n""";
    """<div class="inner">\n""";
    $c->print_poster();
    $c->print_metadata();
    $c->print_text();
    """</div>\n""";
    """</div>\n""";
    """<div class="footer">\n""";
    """<div class="inner">\n""";
    if ($this.multiform_on) {
        """<span class="multiform-checkbox">""";
        print safe " <label for='ljcomsel_$c.talkid'>$*text_multiform_check</label> ";
        $c->print_multiform_check();
    "</span>";
    }
    $c->print_management_links();
    $c->print_interaction_links();
    $c->print_reply_container();
    "</div>\n</div>\n";
    $c->print_wrapper_end();
}

function EntryPage::print_comment_partial (Comment c) {
    $c->print_wrapper_start();
    if ($c.deleted) {
        print $*text_deleted;
        if ($c.hide_children) {
            var Link expand_link = $c->get_link("expand_comments");
            if (defined $expand_link) {
                print " (";
                $c->print_expand_link();
                print ")";
            }
        }
    }
    elseif ($c.fromsuspended) {
        print $*text_fromsuspended;
        if ($c.hide_children) {
            var Link expand_link = $c->get_link("expand_comments");
            if (defined $expand_link) {
                print " (";
                $c->print_expand_link();
                print ")";
            }
        }
    }
    elseif ($c.screened_noshow) {
        print $*text_screened;
        if ($c.hide_children) {
            var Link expand_link = $c->get_link("expand_comments");
            if (defined $expand_link) {
                print " (";
                $c->print_expand_link();
                print ")";
            }
        }
    }
    else {
        var string poster = defined $c.poster ? $c.poster->as_string() : "<i>$*text_poster_anonymous</i>";
        $c->print_time();
        $c->print_subject();
        $c->print_poster();
        var Link expand_link = $c->get_link("expand_comments");
        if (defined $expand_link) {
            $c->print_expand_link();
    if ( $c.comment_posted ) {
         print safe " <span class='comment-posted'>$*text_comment_posted</span>";
     }
        }
    }
    $c->print_wrapper_end();
}


## Change text to image in sidebar

function print_subscriptionfilters_manage_link() {
    var Page p = get_page();
    var string link = ($*image_managelink_url !="" and $*module_subscriptionfilters_section == "sidebar") ? """<img src="$*image_managelink_url" alt="$*text_subscriptionfilters_manage" title="$*text_subscriptionfilters_manage" height="$*image_managelink_height" width="$*image_managelink_width" /></a>""": """$*text_subscriptionfilters_manage""";
    print viewer_is_owner() ? """<div class="manage-link manage-subfilters-link"><a href=""" + $p.journal->subscriptionfilters_manage_url() + """>$link</a></div>""" : "";
}

## Create bottom page link

function print_bottom_link () {
    print safe """<span class="bottomlink"><a href="#bottom">$*text_page_bottom</a><span>""";
}

## Add bottom page link

function RecentPage::print_body {
    var bool empty = $.nav.backward_url == "" and $.nav.forward_url == "";
"""<div id="entries" class="hfeed"><div class="inner">
       <div class="navigation-block">
""";
           $this->print_navigation( { "class" => "topnav" } );
           if (not $empty) {
                print safe """<span class="page-separator">$*text_default_separator</span>""";
           }
           print_bottom_link();
"""  
       </div>
""";

    foreach var Entry e ($.entries) {
        # Print the entry
        if ( $e isa StickyEntry ) {
            var StickyEntry s = $e as StickyEntry;
            $this->print_sticky_entry($s);
        }
        else {
            $this->print_entry($e);
        }
    }

    $this->print_navigation( { "class" => "bottomnav" } );
"""    
</div></div><!-- end entries and >inner-->
""";
}

## Add HTML & CSS for various parts
## Reorder: print titles, navlinks and subsciptionfilters in sidebar
## Then print userprofile then content and footer
## Add module sections
## Remove coding for other layouts

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="wrapper">
        <div id="sidebar">  
          <div id="medallion"><a href="$this.base_url"><img src="$*image_medallion_url" height="$*image_medallion_height" width="$*image_medallion_width" alt="$*text_medallion" title ="$*text_medallion" /></a></div>
    """;
          $this->print_header();
          $this->print_module_section("sidebar");
    """
        </div><!-- end sidebar -->
        <div id="core">
          <div id="header"><div class="inner">
                    """;
                    $this->print_module_section("header");
                    """
          </div></div><!-- end header and >inner -->
          <div id="content"><div class="inner">
                """;
                $this->print_body();
                """
          </div></div><!-- end content and content>inner -->
          <div id="footer"><div class="inner"><a name="bottom"></a>
            """;
            $this->print_module_section("footer");
            """
            <div id="image-footer"><a href="$*SITEROOT"><img src="$*image_footer_url" height="$*image_footer_height" width="$*image_footer_width" alt="$*text_image_footer" title ="$*text_image_footer"/></a></div>
            """;
            print safe """<div class="page-top"><a href="#">$*text_page_top</a></div>""";
            """
          </div></div><!-- end footer and footer>inner -->
        </div><!-- end core -->
      </div><!-- end wrapper -->
    </div></div> <!-- end canvas and canvas>inner -->
""";
    $this->print_wrapper_end();
"""</html>""";
}

##===============================
## Stylesheet
##===============================

function print_stylesheet () {

var string margin = $*right_margin + "%";

var string display_title = $*show_journaltitle ? "" : "display: none";
var string display_subtitle = $*show_journalsubtitle ? "" : "display: none";
var string display_pagetitle = $*show_pagetitle ? "" : "display: none";

var string medallion_height = $*image_medallion_height + """px""";
var string medallion_width = $*image_medallion_width + """px""";

var string divider_height = 15 + $*image_divider_height + """px""";
var string divider_width = $*image_divider_width + """px""";

var string subject_height = $*image_subject_height + """px""";
var string subject_width = 5 + $*image_subject_width + """px""";
var string subject_width_sticky = $*image_subject_width + """px""";

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) {
        $header_background = """
            $header_background
            min-height: """ + $*image_background_header_height + """px;""";
    }

var string sidebar_background = generate_background_css ($*image_background_sidebar_url, $*image_background_sidebar_repeat, $*image_background_sidebar_position, new Color);

var string sidebar_font = generate_font_css($*font_sidebar, $*font_base, $*font_fallback, $*font_sidebar_size, $*font_sidebar_units);
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_margin = "";
    if ( $*entry_userpic_style == "" ) { $entry_margin = "125px"; }
    elseif ( $*entry_userpic_style == "small" ) { $entry_margin = "100px"; }
    elseif ( $*entry_userpic_style == "smaller" ) { $entry_margin = "75px"; }

var string comment_margin = "";
    if ( $*comment_userpic_style == "" ) { $comment_margin = "125px"; }
    elseif ( $*comment_userpic_style == "small" ) { $comment_margin = "100px"; }
    elseif ( $*comment_userpic_style == "smaller" ) { $comment_margin = "75px"; }

var string userpic_css = "";
if ($*userpics_position == "left") {
$userpic_css = """
.has-userpic .entry .userpic,
.has-userpic .comment .userpic {
  float: left;
  margin-right: 25px;
}
""";
}
elseif ($*userpics_position == "right") {
$userpic_css = """
.has-userpic .entry .userpic,
.has-userpic .comment .userpic {
  float: right;
  margin-left: 25px;
}
""";
}
"""

/* Medallion Sidebar
/* by ninetydegrees
******************************/

/* Main
******************************/

body {
  margin: 0;
}

hr {
  display: none;
}

#canvas {
  margin: 0;
}

/* Containers
******************************/

#wrapper {
  background-color: $*color_page_background;
  $sidebar_background
  display: table;
  width: 100%;
}

#sidebar {
  color: $*color_sidebar_text;
  display: table-cell;
  float: left;
  margin-top: 2em;
  width: $*sidebar_width;
  display: table-cell;
}

#sidebar a { color: $*color_sidebar_link; }
#sidebar a:visited { color: $*color_sidebar_link_visited; }
#sidebar a:hover, #sidebar a.current { color: $*color_sidebar_link_hover; }
#sidebar a:active { color: $*color_sidebar_link_active; }

#core {
  background-color: $*color_page_background;
  border-left: 25px solid $*color_sidebar_border;
  color: $*color_page_text;
  display: table-cell;
  vertical-align: top;
}

#core a { color: $*color_page_link; }
#core a:visited { color: $*color_page_link_visited; }
#core a:hover { color: $*color_page_link_hover; }
#core a:active { color: $*color_page_link_active; }

#content {
  padding: 1.75em $margin 1.75em 1.75em;
}

/* Negate Tabula Rasa styling */

.two-columns-left #content{
  border-left: none;
}

/* Menu
******************************/

#header {
  padding: 0;
}

.module-section-header .module-header {
  display: none;
}

.module-section-header {
  background: $*color_menu_background;
  color: $*color_menu_link;
  float: right;
  height: 2.5em;
  min-width: 4em;
  text-align: right;
  clear: right;
}

/* Stricter selector to negate Tabula Rasa styling */

.module-content .menu {
  height: 2.5em;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.module-content li {
    margin: 0;
}

.menu li {
  height: 2.5em;
  margin: 0;
  padding: 0;
}

.menu li {
  color: $*color_menu_link;
  font-weight: bold;
  padding: .5em;
  text-decoration: none;
}

.menu li a { color: $*color_menu_link; }
.menu li a:visited { color: $*color_menu_link_visited; }
.menu li a:hover { color: $*color_menu_link_hover; }
.menu li a:active { color: $*color_menu_link_active; }

.menu li img { vertical-align: middle; }

.menu li:hover {
  background: $*color_menu_hover_background;
  color: $*color_menu_hover_link;
}

.menu li ul {
  display: none;
  height: auto;
  position: absolute;
  right: 0;
  left: auto;
  width: auto;
  z-index: 200;
  top: 2.5em;
}

.menu li:hover ul {
  display: block;
}

.menu li li {
  background: $*color_menu_background;
  display: block;
  height: auto;
  float: none;
  margin: 0;
}

.menu li li a { color: $*color_menu_link !important; }
.menu li li a:visited { color: $*color_menu_link_visited !important; }
.menu li li a:hover { color: $*color_menu_link_hover !important; }
.menu li li a:visited { color: $*color_menu_link_active !important; }

.menu li li:hover {
  background: $*color_menu_hover_background;
}

.menu li li:hover a { color: $*color_menu_hover_link !important; }
.menu li li:hover a:visited { color: $*color_menu_hover_link_visited !important; }
.menu li li:hover a:hover { color: $*color_menu_hover_link_hover !important; }
.menu li li:hover a:active { color: $*color_menu_hover_link_active !important; }

/* Sidebar
******************************/

#medallion {
  background: $*color_medallion_background;
  border: 3px solid $*color_medallion_border;
  border-radius: 50%;
  clear: both;
  height: $medallion_height;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  width: $medallion_width;
}

#title {
  text-align: center;
  $display_title;
}

#subtitle {
  text-align: center;
  $display_subtitle;
}

#pagetitle {
  text-align: center;
  $display_pagetitle;
}

.module-section-sidebar .module {
  font-weight: bold;
  padding: 1em .5em;
  text-align: center;
}

.module-section-sidebar .module-header {
  display: none;
}

.module-section-sidebar .module-navlinks {
  $sidebar_font;
  background: url($*image_divider_url);
  background-repeat: no-repeat;
  background-position: center bottom;
  min-width: $divider_width;
  padding-bottom: $divider_height;
}

.module-section-sidebar .module ul {
  margin: 0;
  padding: 0;
}

.module-section-sidebar .module li {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.module-section-sidebar .manage-link {
  font-style: italic;
  padding-top: .5em;
}

.module-section-sidebar .manage-link img {
  vertical-align: middle;
}

/* Navigation
******************************/

.navigation-block,
.page-archive .navigation,
.page-month .navigation,
.page-day .navigation {
  $entry_title_font
  margin: 1em 0;
  text-align: left;
}

.navigation {
  display: inline-block;
}

.page-archive .navigation,
.page-month .navigation,
.page-day .navigation {
  display: block;
}

.navigation ul {
  margin: 0;
  padding: 0;
}

.navigation li {
  margin: 0;
  padding: 0;
}

.page-archive .navigation li::after {
  content: " . " ;
}

.page-archive .navigation li:last-child::after {
  content: "" ;
}

/* Entries
******************************/

.entry-wrapper,
.comment-wrapper {
  margin-bottom: 2em;
}

.entry .header,
.comment .header {
  margin-bottom: 1.2em;  
}

.entry .datetime,
.comment .datetime {
  $entry_title_font
  display: inline;
  padding-right: 5px;
}

.entry .date:after {
  content:' . ';
}

.entry .entry-title,
.comment .comment-title {
  display: inline;
}

.entry .entry-title,
.comment .comment-title {
  background: url($*image_subject_url);
  background-repeat: no-repeat;
  background-position: left center;
  min-height: $divider_height;
  padding-left: $subject_width;
}

$userpic_css

.has-userpic .entry .userpic,
.has-userpic .comment .userpic {
  border-radius: 50%;
}

.has-userpic .entry .userpic img,
.has-userpic .comment .userpic img  {
  background: $*color_userpic_background;
  border-radius: 50%;
  border: 2px solid $*color_userpic_border;
}

.poster {
  display: block;
}

.entry .poster {
  margin-bottom: 1.5em;
}

.comment .poster {
  margin-bottom: .5em;
}

.entry-poster:before {
  content:'Posted by ';
}

.entry-poster,
.comment-poster {
  color: $*color_entry_title;
  font-weight: bold;
}

.entry-poster {
  $entry_title_font
}

.entry-poster img,
.comment-poster img {
  vertical-align: middle !important;
}

.poster.empty {
  display: none;
}

.entry-content,
.comment-content {
  text-align: $*post_text_align;
}

.entry-content {
  min-height: 100px;
  margin-bottom: 1.5em;
  margin-right: $entry_margin;
}

.comment-content {
  min-height: 75px;
  margin-bottom: .5em;
  margin-right: $comment_margin;
}

.metadata {
  clear: both;
}

.metadata.top-metadata {
  margin-bottom: 1em;
}

.metadata-label,
.tag-text {
  font-style: italic;
  text-transform: lowercase;
}

.metadata ul,
.metadata li,
.tag ul,
.tag ul li {
  font-style: italic;
  margin: 0;
  padding: 0;
  text-transform: lowercase;
  }

.footer {
  clear: both;
  text-align: right;
}

.tag {
  text-align: left;
}

ul.entry-interaction-links,
ul.entry-management-links {
  display: inline;
  margin: 0;
  font-style: italic;
  text-transform: lowercase;
}

ul.entry-interaction-links li,
ul.entry-management-links li {
  padding: 0;
}

ul.entry-interaction-links li::after {
  content: " .";
}

ul.entry-interaction-links li:last-child::after {
  content: "";
}

.admin-post-icon,
.sticky-entry-icon {
  float: left;
  padding-right: .2em;
}

.sticky-entry .admin-post-icon {
  padding-right: .1em;
}

.sticky-entry .entry-title,
.admin-post .entry-title {
  clear: left;
}

.sticky-entry .entry-title {
  padding-left: $subject_width_sticky;
}

/* Comments
******************************/

ul.comment-interaction-links,
ul.comment-management-links {
  display: inline;
  margin: 0;
  font-style: italic;
  text-transform: lowercase;
}

ul.comment-interaction-links li,
ul.comment-management-links li {
  padding: 0;
}

ul.comment-interaction-links li::after {
  content: " .";
}

ul.comment-interaction-links li:last-child::after {
  content: "";
}

/* Footer
******************************/

.module-section-footer .module {
  display: inline-block;
  margin: 1em;
  vertical-align: top;
  width: $*sidebar_width;
}

.module-section-footer .module li {
  list-style-type: circle;
}

.module-section-footer .module a { color: $*color_footer_link; }
.module-section-footer .module a:visited { color: $*color_footer_link_visited; }
.module-section-footer .module a:hover { color: $*color_footer_link_hover; }
.module-section-footer .module a:active { color: $*color_footer_link_active; }

.module-section-footer .module-calendar .entry-day {
  font-weight: bold;
}

.page-top {
  margin-top: 1em;
  text-align: center;
}

#image-footer {
  float: right;
  padding: 0 .5em;
  clear: right;
}

/* Archive Pages
******************************/

.day-date {
  padding-left: 1em;
}

.month .footer,
.year .manage-link {
  font-style: italic;
  text-align: center;
  text-transform: lowercase;
}

.month caption {
  display: none;
}

.year .header {
  $entry_title_font
  text-align: center;
}

.page-archive .month .contents {
  margin: 1.5em 0;
}

table.month {
  width: 80%;
}

.page-archive .month td,
.page-archive .month th {
  border: none;
}

.page-archive .month td {
  vertical-align: top;
  width: 14%;
}

table.month td.day {
  padding: 2px 0;
  text-align: center;
}

table.month td.day-has-entries {
  background: $*color_archive_background;
  font-weight: bold;
  color: $*color_archive_text;
}

table.month td.day-has-entries a {
  font-weight: bold;
  padding: 1px;
  color: $*color_archive_link !important;
}

table.month td.day-has-entries a:visited { color: $*color_archive_link_visited !important; }
table.month td.day-has-entries a:hover { color: $*color_archive_link_hover !important; }
table.month td.day-has-entries a:active { color: $*color_archive_link_active !important; }

table.month td.day-has-entries:hover {
  background: $*color_archive_hover_background;
  color: $*color_archive_hover_text !important;
}

table.month td.day-has-entries:hover a { color: $*color_archive_hover_link !important; }
table.month td.day-has-entries:hover a:visited { color: $*color_archive_hover_link_visited; !important }
table.month td.day-has-entries:hover a:hover { color: $*color_archive_hover_link_hover !important; }
table.month td.day-has-entries:hover a:active { color: $*color_archive_hover_link_active !important; }

/* Tags Page
******************************/

.tags-container .header h2 {
  $entry_title_font
  margin-top: .5em;
}

.tags-container li {
  list-style-type: circle;
}

.tags-container .manage-link {
  font-style: italic;
  text-align: center;
  text-transform: lowercase;
}

/* Icons Page
******************************/

.icons-container .header h2 {
  $entry_title_font
  margin-top: .5em;
}

.sorting-options ul {
  margin: 0 0 1em;
  padding: 0;
  text-align: center;
}

.icons-container .manage-link {
  font-style: italic;
  text-align: center;
  text-transform: lowercase;
}

.icons-container .icon {
  min-height: 125px;
}

.icon-image {
  float: left;
  clear: left;
  min-width: 106px;
  padding-right: 1em;
}

.icon-keywords {
  font-weight: bold;
}

.icon-info .keywords-label,
.icon-info .comment-text,
.icon-info .description-text {
  font-style: italic;
  text-transform: lowercase;
}

.icon-info .default { font-weight: bold; }

.icon-keywords ul { margin: 0; }

.icon-keywords ul li { padding: 0; }

""";
}