[dw-nonfree] Transmogrified: implement two-columns-left layout
[commit: http://hg.dwscoalition.org/dw-nonfree/rev/8758e4ce2ee1]
http://bugs.dwscoalition.org/show_bug.cgi?id=2635
Add an option to have the sidebar on the left.
Patch by
ninetydegrees.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2635
Add an option to have the sidebar on the left.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- bin/upgrading/s2layers/transmogrified/layout.s2
- cgi-bin/LJ/S2Theme/transmogrified.pm
-------------------------------------------------------------------------------- diff -r ace8fe3ae014 -r 8758e4ce2ee1 bin/upgrading/s2layers/transmogrified/layout.s2 --- a/bin/upgrading/s2layers/transmogrified/layout.s2 Mon May 17 04:49:08 2010 +0000 +++ b/bin/upgrading/s2layers/transmogrified/layout.s2 Tue May 25 15:16:39 2010 +0800 @@ -318,9 +318,11 @@ function Page::print() } function Page::print_default_stylesheet () { - var string sidebar_positioning = "margin-right: -$*sidebar_width;"; - var string sidebar_position = "right"; - var string sidebar_position_alt = "left"; + var string sidebar_positioning = ""; + var string sidebar_position = ""; + var string sidebar_position_alt = ""; + if ($*layout_type == "two-columns-right") { $sidebar_positioning = "margin-right: -$*sidebar_width;"; $sidebar_position = "right"; $sidebar_position_alt = "left"; } + elseif ($*layout_type == "two-columns-left") { $sidebar_positioning = "margin-left: -$*sidebar_width;"; $sidebar_position = "left"; $sidebar_position_alt = "right"; } 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, new Color); @@ -936,6 +938,9 @@ function Page::print_default_stylesheet .two-columns-right #content { float: left; } .two-columns-right .module-section-two { float: left; } .two-columns-right #wrap { padding-$sidebar_position: $*sidebar_width; } + .two-columns-left #content { float: right; } + .two-columns-left .module-section-two { float: right; } + .two-columns-left #wrap { padding-$sidebar_position: $*sidebar_width; } """; end_css(); diff -r ace8fe3ae014 -r 8758e4ce2ee1 cgi-bin/LJ/S2Theme/transmogrified.pm --- a/cgi-bin/LJ/S2Theme/transmogrified.pm Mon May 17 04:49:08 2010 +0000 +++ b/cgi-bin/LJ/S2Theme/transmogrified.pm Tue May 25 15:16:39 2010 +0800 @@ -3,7 +3,7 @@ use base qw( LJ::S2Theme ); sub designer { "Yvonne" } -sub layouts { ( "1" => "one-column", "2r" => "two-columns-right" ) } +sub layouts { ( "1" => "one-column", "2l" => "two-columns-left", "2r" => "two-columns-right" ) } sub layout_prop { "layout_type" } sub page_props { --------------------------------------------------------------------------------