fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-09-01 03:02 pm

[dw-free] Most site schemes hardcode a class layout-wide-right-sidebar for #content

[commit: http://hg.dwscoalition.org/dw-free/rev/567751911423]

http://bugs.dwscoalition.org/show_bug.cgi?id=3000

Make the content options customizable; default value (if the page does not
choose to provide a custom value) is still class='layout-wide-right-
sidebar')

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/bml/scheme/blueshift.look
  • cgi-bin/bml/scheme/celerity.look
  • cgi-bin/bml/scheme/gradation-horizontal.look
  • cgi-bin/bml/scheme/gradation-vertical.look
  • htdocs/misc/render_sitescheme.bml
--------------------------------------------------------------------------------
diff -r 57118859d07d -r 567751911423 cgi-bin/bml/scheme/blueshift.look
--- a/cgi-bin/bml/scheme/blueshift.look	Wed Sep 01 21:06:49 2010 +0800
+++ b/cgi-bin/bml/scheme/blueshift.look	Wed Sep 01 23:02:45 2010 +0800
@@ -27,6 +27,8 @@ standout<=
 standout<=
 {DRps}<div class='standout'><table class='standout-inner'><tr><td>%%data%%</td></tr></table></div>
 <=standout
+
+contentopts=>class='layout-wide-right-sidebar'
 
 head<=
 <head>
@@ -168,7 +170,7 @@ page<=
                     </span>
                 </div>
 
-                <div id="content" class="layout-wide-right-sidebar">
+                <div id="content" %%contentopts%%>
                 <h1>%%title%%</h1>
                 %%body%%
                 </div>
diff -r 57118859d07d -r 567751911423 cgi-bin/bml/scheme/celerity.look
--- a/cgi-bin/bml/scheme/celerity.look	Wed Sep 01 21:06:49 2010 +0800
+++ b/cgi-bin/bml/scheme/celerity.look	Wed Sep 01 23:02:45 2010 +0800
@@ -27,6 +27,8 @@ standout<=
 standout<=
 {DRps}<div class='standout'><table class='standout-inner'><tr><td>%%data%%</td></tr></table></div>
 <=standout
+
+contentopts=>class='layout-wide-right-sidebar'
 
 head<=
 <head>
@@ -179,7 +181,7 @@ page<=
                         <?logo?>
                 </div><!-- end masthead-->
 
-                <div id="content" class="layout-wide-right-sidebar">
+                <div id="content" %%contentopts%%>
                 <h1>%%title%%</h1>
                 %%body%%
                 </div><!--end content-->
diff -r 57118859d07d -r 567751911423 cgi-bin/bml/scheme/gradation-horizontal.look
--- a/cgi-bin/bml/scheme/gradation-horizontal.look	Wed Sep 01 21:06:49 2010 +0800
+++ b/cgi-bin/bml/scheme/gradation-horizontal.look	Wed Sep 01 23:02:45 2010 +0800
@@ -27,6 +27,8 @@ standout<=
 standout<=
 {DRps}<div class='standout'><table class='standout-inner'><tr><td>%%data%%</td></tr></table></div>
 <=standout
+
+contentopts=>class='layout-wide-right-sidebar'
 
 head<=
 <head>
@@ -169,7 +171,7 @@ page<=
                     </span>
                 </div>
 
-                <div id="content" class="layout-wide-right-sidebar">
+                <div id="content" %%contentopts%%>
                 <h1>%%title%%</h1>
                 %%body%%
                 </div>
diff -r 57118859d07d -r 567751911423 cgi-bin/bml/scheme/gradation-vertical.look
--- a/cgi-bin/bml/scheme/gradation-vertical.look	Wed Sep 01 21:06:49 2010 +0800
+++ b/cgi-bin/bml/scheme/gradation-vertical.look	Wed Sep 01 23:02:45 2010 +0800
@@ -27,6 +27,8 @@ standout<=
 standout<=
 {DRps}<div class='standout'><table class='standout-inner'><tr><td>%%data%%</td></tr></table></div>
 <=standout
+
+contentopts=>class='layout-wide-right-sidebar'
 
 head<=
 <head>
@@ -167,7 +169,7 @@ page<=
                     </span>
                 </div>
 
-                <div id="content" class="layout-wide-right-sidebar">
+                <div id="content" %%contentopts%%>
                 <h1>%%title%%</h1>
                 %%body%%
                 </div>
diff -r 57118859d07d -r 567751911423 htdocs/misc/render_sitescheme.bml
--- a/htdocs/misc/render_sitescheme.bml	Wed Sep 01 21:06:49 2010 +0800
+++ b/htdocs/misc/render_sitescheme.bml	Wed Sep 01 23:02:45 2010 +0800
@@ -21,7 +21,7 @@ body<=
 {
     use strict;
     use DW::Request;
-    use vars qw/ $title $windowtitle $head /;
+    use vars qw/ $title $windowtitle $head $contentopts /;
 
     my $r = DW::Request->get;
     my $code = $r->pnote( 'render_sitescheme_code' );
@@ -31,6 +31,7 @@ body<=
     $head = $extras->{head} || "";
     $title = $extras->{title} || "";
     $windowtitle = $extras->{windowtitle} || "";
+    $contentopts = $extras->{contentopts};
 
     return BML::ebml($code);
 }
@@ -39,4 +40,5 @@ head=><?_code return BML::ebml( $head );
 head=><?_code return BML::ebml( $head ); _code?>
 title=><?_code return BML::ebml( $title ); _code?>
 windowtitle=><?_code return BML::ebml( $windowtitle ); _code?>
+contentopts=><?_code return defined $contentopts ? BML::ebml( $contentopts ) : "<?contentopts?>"; _code?>
 page?>
--------------------------------------------------------------------------------
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)

[personal profile] ninetydegrees 2010-09-04 09:27 am (UTC)(link)
I don't know if this is a result of this change but the logged-in homepage now displays as one column for me, in all schemes. (Firefox 3.6.8/1440x900/15px)
Edited 2010-09-04 09:29 (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)

[personal profile] afuna 2010-09-04 10:07 am (UTC)(link)
Aha, got it. I'd tested on entry pages (which goes through a different path), and not anything else. fixed now, thanks for catching that!