Allow users to choose whether icons are on the right or on the left for
the following layouts: Bases, Blanket, Brittle, Negatives
Patch by 900degrees.
diffs (241 lines):
diff -r 26b05d3b044d -r 07ae09630580 bin/upgrading/s2layers/bases/layout.s2
--- a/bin/upgrading/s2layers/bases/layout.s2 Tue Jun 22 12:29:32 2010 +0800
+++ b/bin/upgrading/s2layers/bases/layout.s2 Tue Jun 22 15:43:35 2010 +0800
@@ -17,6 +17,7 @@ propgroup presentation {
property use use_journalstyle_entry_page;
property use layout_type;
property use tags_page_type;
+ property use userpics_position;
property use entry_metadata_position;
property use use_custom_friend_colors;
property use use_shared_pic;
@@ -237,6 +238,7 @@ set layout_type = "two-columns-right";
set layout_type = "two-columns-right";
set show_userpics_recent = true;
+set userpics_position = "right";
set num_items_recent = 10;
set num_items_reading = 10;
@@ -295,6 +297,20 @@ if ($*image_background_header_height > 0
if ($*image_background_header_url == "" ){}
else { print """ <style type="text/css"> #title, #subtitle, #pagetitle
{display: none} </style> """; }
+
+ var string userpic_css = "";
+ if ($*userpics_position == "left") {
+ $userpic_css = """
+ .has-userpic .entry .userpic,
+ .has-userpic .comment .userpic { float: left; }
+ """;
+ }
+ elseif ($*userpics_position == "right") {
+ $userpic_css = """
+ .has-userpic .entry .userpic,
+ .has-userpic .comment .userpic { float: right; }
+ """;
+ }
"""<style type="text/css">""";
start_css();
@@ -540,7 +556,7 @@ border-bottom: 0.083em solid $*color_ent
.access-filter, .restrictions {float: left; margin: 0.25em 0.5em 0.25em 0.5em;}
-.has-userpic .entry .userpic {float: right; border: 0.083em solid
$*color_entry_border; padding: 0.2em; margin: 0.5em; background:
$*color_entry_background; }
+.has-userpic .entry .userpic { border: 0.083em solid $*color_entry_border;
padding: 0.2em; margin: 0.5em; background: $*color_entry_background; }
.entry .userpic img {border: 0;}
.entry .userpic img:hover {opacity: .7;}
@@ -614,7 +630,7 @@ li.first-item {margin-left: 0;}
.comment-content {padding: 0.5em; border-bottom: 0.083em solid
$*color_entry_border; min-height: 7em;}
.no-userpic .comment-content {min-height: 1em;}
-.has-userpic .comment .userpic {border: 0.083em solid $*color_entry_border;
float: right; margin: 0.5em; padding: 0.2em; }
+.has-userpic .comment .userpic {border: 0.083em solid $*color_entry_border;
margin: 0.5em; padding: 0.2em; }
.screened .comment-content {background: $element_background; padding: 0.833em;
}
@@ -725,6 +741,9 @@ div.ContextualPopup {border: 0.083em sol
div.ContextualPopup {border: 0.083em solid $*color_page_border; background:
$*color_entry_background; padding: 0.583em;}
div.ContextualPopup div.Inner {border: 0; }
div.ContextualPopup .Userpic {border: 0.083em solid $*color_page_border;
padding: 0.25em; }
+
+$userpic_css
+
""";
end_css();
diff -r 26b05d3b044d -r 07ae09630580 bin/upgrading/s2layers/blanket/layout.s2
--- a/bin/upgrading/s2layers/blanket/layout.s2 Tue Jun 22 12:29:32 2010 +0800
+++ b/bin/upgrading/s2layers/blanket/layout.s2 Tue Jun 22 15:43:35 2010 +0800
@@ -17,6 +17,7 @@ propgroup presentation {
property use use_journalstyle_entry_page;
property use layout_type;
property use tags_page_type;
+ property use userpics_position;
property use entry_metadata_position;
property use use_custom_friend_colors;
property use use_shared_pic;
@@ -260,6 +261,17 @@ var string month_header_colors = generat
var string module_font = generate_font_css($*font_module_text,
$*font_fallback, $*font_module_text_size, $*font_module_text_units);
var string module_title_font = generate_font_css($*font_module_heading,
$*font_fallback, $*font_module_heading_size, $*font_module_heading_units);
+ var string userpic_css = "";
+ if ($*userpics_position == "left") {
+ $userpic_css = """
+ .userpic { float: left; margin: 0 10px 10px 0; }
+ """;
+ }
+ elseif ($*userpics_position == "right") {
+ $userpic_css = """
+ .userpic { float: right; margin: 0 0 10px 10px; }
+ """;
+ }
"""
@@ -334,7 +346,7 @@ h3.entry-title a { $entry_title_colors }
.datetime { font-size: 0.9em; font-weight: normal; text-transform: uppercase;
letter-spacing: 1px; padding: 0; $page_title_colors }
.datetime a { $page_title_colors }
-.userpic { display: block; float: left; margin: 0 10px 10px 0; }
+.userpic { display: block; }
.userpic img { width: 80px; height: 80px; padding: 5px; $userpic_colors }
span.poster { font-size: 0.9em; font-weight: normal; text-transform:
uppercase; letter-spacing: 0; padding: 0; $page_title_colors }
@@ -397,6 +409,8 @@ td.day { padding: 5px; border: 1px solid
.page-tags .tags-container ul { margin: 1em; padding: 0; }
.page-tags .tags-container ul li { margin: 0 0 0 1em; padding: 0; list-style:
none; }
+$userpic_css
+
</style>
""";
diff -r 26b05d3b044d -r 07ae09630580 bin/upgrading/s2layers/brittle/layout.s2
--- a/bin/upgrading/s2layers/brittle/layout.s2 Tue Jun 22 12:29:32 2010 +0800
+++ b/bin/upgrading/s2layers/brittle/layout.s2 Tue Jun 22 15:43:35 2010 +0800
@@ -16,6 +16,7 @@ propgroup presentation {
property use layout_type;
property use tags_page_type;
property use sidebar_width;
+ property use userpics_position;
property use entry_metadata_position;
property use use_custom_friend_colors;
property use use_shared_pic;
@@ -295,6 +296,34 @@ function Page::print_default_stylesheet(
var Color blockquote_text = $*color_entry_text -> lighter(10);
var Color blockquote_background = $*color_entry_background -> darker(10);
+ var string userpic_css = "";
+ if ($*userpics_position == "left") {
+ $userpic_css = """
+ div.entry div.userpic {
+ float: left;
+ margin: 0 0 0 -100px;
+ }
+ div.comment div.userpic {
+ float: left;
+ margin: 0 0 0 -110px;
+ }
+ """;
+ }
+ elseif ($*userpics_position == "right") {
+ $userpic_css = """
+ div.entry div.userpic {
+ float: right;
+ margin: 0 -100px 0 0;
+ }
+ div.comment div.userpic {
+ float: right;
+ margin: 0 -110px 0 0;
+ }
+ #secondary {
+ margin-left: 110px;
+ }
+ """;
+ }
"""<style type="text/css">""";
start_css();
@@ -429,8 +458,6 @@ h3.entry-title a { color: $*color_entry_
div.entry div.userpic {
display: block;
- float: left;
- margin: 0 0 0 -100px;
}
div.entry div.userpic img {
@@ -640,8 +667,6 @@ textarea.textbox { width: 90%!important
div.comment div.userpic {
display: block;
- float: left;
- margin: 0 0 0 -110px;
}
div.comment div.userpic img {
@@ -859,6 +884,9 @@ hr {
border-style: none;
border-bottom: 3px double $solid_border;
}
+
+$userpic_css
+
} --->
""";
end_css();
diff -r 26b05d3b044d -r 07ae09630580 bin/upgrading/s2layers/negatives/layout.s2
--- a/bin/upgrading/s2layers/negatives/layout.s2 Tue Jun 22 12:29:32
2010 +0800
+++ b/bin/upgrading/s2layers/negatives/layout.s2 Tue Jun 22 15:43:35
2010 +0800
@@ -17,6 +17,7 @@ propgroup presentation {
property use use_journalstyle_entry_page;
property use layout_type;
property use tags_page_type;
+ property use userpics_position;
property use entry_metadata_position;
property use use_custom_friend_colors;
property use use_shared_pic;
@@ -25,6 +26,7 @@ propgroup presentation {
property use comment_management_links;
}
+set userpics_position = "right";
set layout_type = "two-columns-right";
set custom_colors_template = "%%new%% div.footer, %%new%% div.footer ul,
%%new%% div.footer ul a {background-color: %%background%%} %%new%% {border: 5px
solid %%background%%;} %%new%% div.footer a, %%new%% div.footer {color:
%%foreground%%;}";
@@ -299,6 +301,23 @@ function Page::print_default_stylesheet(
var string entry_title_font = generate_font_css($*font_entry_title,
$*font_fallback, $*font_entry_title_size, $*font_entry_title_units);
var string module_font = generate_font_css($*font_module_text,
$*font_fallback, $*font_module_text_size, $*font_module_text_units);
var string module_title_font = generate_font_css($*font_module_heading,
$*font_fallback, $*font_module_heading_size, $*font_module_heading_units);
+
+ var string userpic_css = "";
+ if ($*userpics_position == "left") {
+ $userpic_css = """
+ .userpic{
+ float: left;
+ margin-right: 2px;
+ }
+ """;
+ }
+ elseif ($*userpics_position == "right") {
+ $userpic_css = """
+ .userpic{
+ float: right;
+ }
+ """;
+ }
"""<style type="text/css">""";
start_css();
@@ -667,6 +686,8 @@ function Page::print_default_stylesheet(
.two-columns-right #primary {left: 10%; width: 70%;}
.two-columns-right #secondary {left: 10%; width: 15%;}
+$userpic_css
+
""";
end_css();
"</style>\n";
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog