[dw-free] Styles: add new one-column mode to allow modules to go either above or below entries
[commit: http://hg.dwscoalition.org/dw-free/rev/53915645ef71]
http://bugs.dwscoalition.org/show_bug.cgi?id=2873
Implement one-column-split mode, with CSS as appropriate, for
Compartmentalize, Crisped, Dusty Foot, Funky Circles, Nouveau Oleanders,
Practicality, Refried Tablet, Stepping Stones.
Patch by
ninetydegrees.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2873
Implement one-column-split mode, with CSS as appropriate, for
Compartmentalize, Crisped, Dusty Foot, Funky Circles, Nouveau Oleanders,
Practicality, Refried Tablet, Stepping Stones.
Patch by
Files modified:
- bin/upgrading/s2layers/dustyfoot/layout.s2
- bin/upgrading/s2layers/funkycircles/layout.s2
- bin/upgrading/s2layers/nouveauoleanders/layout.s2
- bin/upgrading/s2layers/practicality/layout.s2
- bin/upgrading/s2layers/steppingstones/layout.s2
- cgi-bin/LJ/S2Theme/compartmentalize.pm
- cgi-bin/LJ/S2Theme/crisped.pm
- cgi-bin/LJ/S2Theme/dustyfoot.pm
- cgi-bin/LJ/S2Theme/funkycircles.pm
- cgi-bin/LJ/S2Theme/nouveauoleanders.pm
- cgi-bin/LJ/S2Theme/practicality.pm
- cgi-bin/LJ/S2Theme/refriedtablet.pm
- cgi-bin/LJ/S2Theme/steppingstones.pm
--------------------------------------------------------------------------------
diff -r 667d15045007 -r 53915645ef71 bin/upgrading/s2layers/dustyfoot/layout.s2
--- a/bin/upgrading/s2layers/dustyfoot/layout.s2 Tue Aug 02 18:13:50 2011 +0800
+++ b/bin/upgrading/s2layers/dustyfoot/layout.s2 Tue Aug 02 18:20:33 2011 +0800
@@ -174,16 +174,33 @@
</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">
""";
diff -r 667d15045007 -r 53915645ef71 bin/upgrading/s2layers/funkycircles/layout.s2
--- a/bin/upgrading/s2layers/funkycircles/layout.s2 Tue Aug 02 18:13:50 2011 +0800
+++ b/bin/upgrading/s2layers/funkycircles/layout.s2 Tue Aug 02 18:20:33 2011 +0800
@@ -1028,6 +1028,23 @@
margin-bottom: 4em;
}
+.one-column-split #secondary,
+.one-column-split #tertiary {
+ text-align: center;
+ }
+
+.one-column-split .module {
+ display: inline-block;
+ text-align: left;
+ vertical-align: top;
+ width: $*sidebar_width;
+ }
+
+.one-column-split #secondary .module,
+.one-column-split #tertiary .module {
+ margin: 2em 1em;
+ }
+
.module li {
list-style: url($image_module_list_url) disc;
margin: .5em;
@@ -1071,6 +1088,14 @@
text-align: center;
}
+ .one-column .module-userprofile {
+ text-align: left;
+ }
+
+ .one-column-split .module-userprofile {
+ text-align: center;
+ }
+
.module-userprofile .userpic {
margin-bottom: .5em;
}
@@ -1151,11 +1176,29 @@
$module_title_colors
}
+ .one-column .module h2,
+ .one-column .module h2 a {
+ text-align: left;
+ }
+
+ .one-column-split .module h2,
+ .one-column-split .module h2 a {
+ text-align: center;
+ }
+
.module-search .search-form {
margin: 0 auto;
text-align: center;
}
+ .one-column .module-search .search-form {
+ text-align: left;
+ }
+
+ .one-column-split .module-search .search-form {
+ text-align: center;
+ }
+
.module-search .search-box,
.module-search .search-button {
border: 0;
@@ -1176,6 +1219,14 @@
-khtml-box-shadow: .067em .067em .134em $*color_shadow_alt;
}
+ .one-column .module-search .search-box {
+ width: auto;
+ }
+
+ .one-column-split .module-search .search-box {
+ width: 90%;
+ }
+
.module-search .search-button {
background-color: $*color_specificmodule_background;
color: $*color_specificmodule_text;
@@ -1186,6 +1237,16 @@
-khtml-box-shadow: .067em .067em .134em $*color_shadow;
}
+ .one-column .module-search .search-button {
+ margin-left: .3em;
+ margin-top: 0;
+ }
+
+ .one-column-split .module-search .search-button {
+ margin-left: 0;
+ margin-top: .3em ;
+ }
+
.module-search .search-button:hover {
background-color: $*color_specificmodule_background_hover;
color: $*color_specificmodule_text_hover;
diff -r 667d15045007 -r 53915645ef71 bin/upgrading/s2layers/nouveauoleanders/layout.s2
--- a/bin/upgrading/s2layers/nouveauoleanders/layout.s2 Tue Aug 02 18:13:50 2011 +0800
+++ b/bin/upgrading/s2layers/nouveauoleanders/layout.s2 Tue Aug 02 18:20:33 2011 +0800
@@ -243,16 +243,33 @@
</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">
""";
diff -r 667d15045007 -r 53915645ef71 bin/upgrading/s2layers/practicality/layout.s2
--- a/bin/upgrading/s2layers/practicality/layout.s2 Tue Aug 02 18:13:50 2011 +0800
+++ b/bin/upgrading/s2layers/practicality/layout.s2 Tue Aug 02 18:20:33 2011 +0800
@@ -80,16 +80,33 @@
</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">
""";
diff -r 667d15045007 -r 53915645ef71 bin/upgrading/s2layers/steppingstones/layout.s2
--- a/bin/upgrading/s2layers/steppingstones/layout.s2 Tue Aug 02 18:13:50 2011 +0800
+++ b/bin/upgrading/s2layers/steppingstones/layout.s2 Tue Aug 02 18:20:33 2011 +0800
@@ -169,6 +169,11 @@
.navigation ul li a:active { color: $*color_entry_link_active; }
/* entries */
+
+.one-column-split #entries {
+ padding-top: 2em;
+ }
+
.entry-wrapper { margin-top: 2em;
margin-bottom: 4em;
margin-left: .5em; }
diff -r 667d15045007 -r 53915645ef71 cgi-bin/LJ/S2Theme/compartmentalize.pm
--- a/cgi-bin/LJ/S2Theme/compartmentalize.pm Tue Aug 02 18:13:50 2011 +0800
+++ b/cgi-bin/LJ/S2Theme/compartmentalize.pm Tue Aug 02 18:20:33 2011 +0800
@@ -2,7 +2,7 @@
use base qw( LJ::S2Theme );
use strict;
-sub layouts { ( "1" => "one-column", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
+sub layouts { ( "1" => "one-column", "1s" => "one-column-split", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
sub layout_prop { "layout_type" }
1;
diff -r 667d15045007 -r 53915645ef71 cgi-bin/LJ/S2Theme/crisped.pm
--- a/cgi-bin/LJ/S2Theme/crisped.pm Tue Aug 02 18:13:50 2011 +0800
+++ b/cgi-bin/LJ/S2Theme/crisped.pm Tue Aug 02 18:20:33 2011 +0800
@@ -2,7 +2,7 @@
use base qw( LJ::S2Theme );
use strict;
-sub layouts { ( "1" => "one-column", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
+sub layouts { ( "1" => "one-column", "1s" => "one-column-split", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
sub layout_prop { "layout_type" }
sub header_props {
diff -r 667d15045007 -r 53915645ef71 cgi-bin/LJ/S2Theme/dustyfoot.pm
--- a/cgi-bin/LJ/S2Theme/dustyfoot.pm Tue Aug 02 18:13:50 2011 +0800
+++ b/cgi-bin/LJ/S2Theme/dustyfoot.pm Tue Aug 02 18:20:33 2011 +0800
@@ -2,7 +2,7 @@
use base qw( LJ::S2Theme );
use strict;
-sub layouts { ( "1" => "one-column", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
+sub layouts { ( "1" => "one-column", "1s" => "one-column-split", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
sub layout_prop { "layout_type" }
1;
diff -r 667d15045007 -r 53915645ef71 cgi-bin/LJ/S2Theme/funkycircles.pm
--- a/cgi-bin/LJ/S2Theme/funkycircles.pm Tue Aug 02 18:13:50 2011 +0800
+++ b/cgi-bin/LJ/S2Theme/funkycircles.pm Tue Aug 02 18:20:33 2011 +0800
@@ -2,7 +2,7 @@
use base qw( LJ::S2Theme );
use strict;
-sub layouts { ( "1" => "one-column", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
+sub layouts { ( "1" => "one-column", "1s" => "one-column-split", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
sub layout_prop { "layout_type" }
sub page_props {
diff -r 667d15045007 -r 53915645ef71 cgi-bin/LJ/S2Theme/nouveauoleanders.pm
--- a/cgi-bin/LJ/S2Theme/nouveauoleanders.pm Tue Aug 02 18:13:50 2011 +0800
+++ b/cgi-bin/LJ/S2Theme/nouveauoleanders.pm Tue Aug 02 18:20:33 2011 +0800
@@ -2,7 +2,7 @@
use base qw( LJ::S2Theme );
use strict;
-sub layouts { ( "1" => "one-column", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
+sub layouts { ( "1" => "one-column", "1s" => "one-column-split", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
sub layout_prop { "layout_type" }
sub entry_props {
diff -r 667d15045007 -r 53915645ef71 cgi-bin/LJ/S2Theme/practicality.pm
--- a/cgi-bin/LJ/S2Theme/practicality.pm Tue Aug 02 18:13:50 2011 +0800
+++ b/cgi-bin/LJ/S2Theme/practicality.pm Tue Aug 02 18:20:33 2011 +0800
@@ -2,7 +2,7 @@
use base qw( LJ::S2Theme );
use strict;
-sub layouts { ( "1" => "one-column", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
+sub layouts { ( "1" => "one-column", "1s" => "one-column-split", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
sub layout_prop { "layout_type" }
1;
diff -r 667d15045007 -r 53915645ef71 cgi-bin/LJ/S2Theme/refriedtablet.pm
--- a/cgi-bin/LJ/S2Theme/refriedtablet.pm Tue Aug 02 18:13:50 2011 +0800
+++ b/cgi-bin/LJ/S2Theme/refriedtablet.pm Tue Aug 02 18:20:33 2011 +0800
@@ -2,7 +2,7 @@
use base qw( LJ::S2Theme );
use strict;
-sub layouts { ( "1" => "one-column", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
+sub layouts { ( "1" => "one-column", "1s" => "one-column-split", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
sub layout_prop { "layout_type" }
sub header_props {
diff -r 667d15045007 -r 53915645ef71 cgi-bin/LJ/S2Theme/steppingstones.pm
--- a/cgi-bin/LJ/S2Theme/steppingstones.pm Tue Aug 02 18:13:50 2011 +0800
+++ b/cgi-bin/LJ/S2Theme/steppingstones.pm Tue Aug 02 18:20:33 2011 +0800
@@ -2,7 +2,7 @@
use base qw( LJ::S2Theme );
use strict;
-sub layouts { ( "1" => "one-column", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
+sub layouts { ( "1" => "one-column", "1s" => "one-column-split", "2l" => "two-columns-left", "2r" => "two-columns-right", "3" => "three-columns-sides", "3r" => "three-columns-right", "3l" => "three-columns-left" ) }
sub layout_prop { "layout_type" }
1;
--------------------------------------------------------------------------------
