[geeklog-cvs] geeklog: Backed out changeset: 115d146a5a5f

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Apr 15 10:29:40 EDT 2012


changeset 8595:7701ab85f66c
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/7701ab85f66c
user: Rouslan Placella <rouslan at placella.com>
date: Sun Apr 15 14:53:46 2012 +0100
description:
Backed out changeset: 115d146a5a5f

diffstat:

 public_html/layout/newpro/README                 |    2 +
 public_html/layout/newpro/css/layout.css         |  156 +++++++++++++++++++++-
 public_html/layout/newpro/footer.thtml           |   22 ++-
 public_html/layout/newpro/functions.php          |    3 +-
 public_html/layout/newpro/header.thtml           |   21 +-
 public_html/layout/newpro/javascript/fix_html.js |   27 +++
 6 files changed, 201 insertions(+), 30 deletions(-)

diffs (truncated from 317 to 300 lines):

diff -r 40693fcea086 -r 7701ab85f66c public_html/layout/newpro/README
--- a/public_html/layout/newpro/README	Sun Apr 15 14:19:51 2012 +0100
+++ b/public_html/layout/newpro/README	Sun Apr 15 14:53:46 2012 +0100
@@ -79,6 +79,8 @@
     | +css ----------------- Images for ProfessionalCSS_en
     |
     +javascript ------------ JavaScript
+    | |
+    | +fix_html.js --------- Geeklog body Class Attribute
     |
     +README ---------------- 'ProfessionalCSS_en' README(this file)
     |
diff -r 40693fcea086 -r 7701ab85f66c public_html/layout/newpro/css/layout.css
--- a/public_html/layout/newpro/css/layout.css	Sun Apr 15 14:19:51 2012 +0100
+++ b/public_html/layout/newpro/css/layout.css	Sun Apr 15 14:53:46 2012 +0100
@@ -3,6 +3,25 @@
   Authors     : Fumito Arakawa as Phize (http://phize.net/) and Geeklog Japanese
                 Rouslan Placella <rouslan at placella.com>
   Description : Basic layout style.
+                JavaScript enabled
+              * Always set 'js_on' 
+              * 3 Column ( Left Block * Center Block * Right Block)...left-center-right
+              * 2 Column ( Left Block * Center Block)...left-center
+              * 2 Column ( Center Block * Right Block)...center-right
+              * 1 Column ( Center Block)...center
+
+            JavaScript Disenabled: HTML body class attribute is always 3 Column
+              * Always set 'js_off'
+
+            Block Width:
+              *  Container Width = 100%
+              *  Site Width[W] = 960px
+              *  Left   Block Width[L]         = 180px
+              *  Right  Block Width[R]         = 180px
+              *  Center Block Width(3 Column ) = [W] - [L] - [R] = 600px = 580px + left padding 10px + right padding 10px
+              *  Center Block Width(2 Column ) = [W] - [L] = 780px = 770px + left padding 10px
+              *  Center Block Width(2 Column ) = [W] - [R] = 780px = 770px + right padding 10px
+              *  Center Block Width(1 Column ) = [W] = 960px
 
   Apply       : storytext.thtml, storybodytext.thtml
                 featuredstorytext.thtml, featuredstorybodytext.thtml
@@ -154,30 +173,143 @@
     Include contents Block level elements(div#leftblocks, div#centerblocks, div#rightblocks)
 --------------------------------------*/
 
-div#container table#wrapper {
-    width: 100%;
+div#container div#wrapper {
+  overflow: visible;  /* Adjust floating element */
+  width: 960px;  /*  Site Width[W] */
+  margin: 0 auto;
+  padding: 0 0 2em 0;
 }
 
-div#container table#wrapper td {
-    padding: 0;
+/* Content generated by the float clear */
+div#container div#wrapper:after {
+  content: "";
+  display: block;
+  clear: both;
+  height: 1px;
+  overflow: hidden;
 }
 
-div#container div#rightblocks {
-    width: 180px;
+/* Win IE 6(Adjust floating element) { \*/
+* html div#container div#wrapper {
+  height: 1%;
+  overflow: visible;
+}
+/* } Win IE 6(Adjust floating element) */
+
+/* JavaScript Enabled* 3 Column ( Left Block*  Center Block*  Right Block) Wrapper */
+body.left-center-right div#container div#wrapper {
 }
 
-div#container td#centerblocks-wrapper {
-    width: 100%;
+/* JavaScript Enabled* 2 Column ( Left Block*  Center Block) Wrapper */
+body.left-center div#container div#wrapper {
 }
 
-div#container div#centerblocks {
-    width: 100%;
+/* JavaScript Enabled* 2 Column ( Center Block*  Right Block) Wrapper */
+body.center-right div#container div#wrapper {
 }
 
-div#container div#leftblocks {
-    width: 180px;
+/* JavaScript Enabled* 1 Column ( Center Block) Wrapper */
+body.center div#container div#wrapper {
 }
 
+/* JavaScript Disenabled Wrapper */
+body.js_off div#container div#wrapper {
+}
+
+
+
+/*--------------------------------------
+   Left Block Container
+   display if Left Block is appeared.
+--------------------------------------*/
+
+div#container div#wrapper div#leftblocks {
+  overflow: auto;
+  float: left;
+  width: 180px;  /*  Left Block Width[L] */
+  margin: 0 780px 0 0;  /*  Right Margin =  Site All Width[W] -  Left Block Width[L] */
+  padding: 0;
+}
+
+/* JavaScript Disenabled  Left Block Container */
+body.js_off div#container div#wrapper div#leftblocks {
+  float: left;
+  margin: 0 -180px 0 0;  /*  Right Margin = -( Left Block Width[L]) */
+}
+
+
+
+/*--------------------------------------
+   Center Block Container
+    div#centerblocks is always display.
+--------------------------------------*/
+
+div#container div#wrapper div#centerblocks {
+  overflow: visible;
+}
+
+/* JavaScript Enabled* 3 Column ( Left Block*  Center Block*  Right Block)  Center Block Container */
+body.left-center-right div#container div#wrapper div#centerblocks {
+  float: left;
+  width: 580px;  /*  Center Block Width =  Site All Width[W] -  Left Block Width[L] -  Right Block Width[R] -  Right Padding -  Left Padding */
+  margin: 0 0 0 -780px;  /*  Left Margin = -( Site All Width[W] -  Left Block Width[L]) */
+  padding: 0 10px;
+}
+
+/* JavaScript Enabled* 2 Column ( Left Block*  Center Block)  Center Block Container */
+body.left-center div#container div#wrapper div#centerblocks {
+  float: left;
+  width: 770px;  /*  Center Block Width =  Site All Width[W] -  Left Block Width[L] -  Right Padding -  Left Padding */
+  margin: 0 0 0 -780px;  /*  Left Margin = -( Site All Width[W] -  Left Block Width[L]) */
+  padding: 0 0 0 10px;
+}
+
+/* JavaScript Enabled* 2 Column ( Center Block*  Right Block)  Center Block Container */
+body.center-right div#container div#wrapper div#centerblocks {
+  float: left;
+  width: 770px;  /*  Site All Width[W] -  Right Block Width[R] -  Right Padding -  Left Padding */
+  margin: 0 180px 0 0;  /*  Right Margin =  Right Block Width[R] */
+  padding: 0 10px 0 0;
+}
+
+/* JavaScript Enabled* 1 Column ( Center Block)  Center Block Container */
+body.center div#container div#wrapper div#centerblocks {
+  width: 960px;  /*  Center Block Width =  Site All Width[W] -  Right Padding -  Left Padding */
+  margin: 0;
+  padding: 0;
+}
+
+/* JavaScript Disenabled  Center Block Container */
+body.js_off div#container div#wrapper div#centerblocks {
+  display: inline;  /* Win IE 6(Float Left Right Margin is too wide) */
+  float: left;
+  width: 580px;  /*  Center Block Width =  Site All Width[W] -  Left Block Width[L] -  Right Block Width[R] -  Right Padding -  Left Padding */
+  margin: 0 0 0 180px;  /*  Left Margin =  Left Block Width[L] */
+  padding: 0 10px;
+}
+
+
+
+/*--------------------------------------
+   Right Block Container
+    div#rightblocks display if Right Block is appeared.
+--------------------------------------*/
+
+div#container div#wrapper div#rightblocks {
+  overflow: auto;
+  float: left;
+  width: 180px;  /*  Right Block Width[R] */
+  margin: 0 0 0 -180px;  /*  Left Margin = -( Right Block Width[R]) */
+}
+
+/* JavaScript Disenabled  Right Block Container */
+body.js_off div#container div#wrapper div#rightblocks {
+  float: right;
+  margin: 0;
+}
+
+
+
 /*--------------------------------------
    Footer Container
 --------------------------------------*/
diff -r 40693fcea086 -r 7701ab85f66c public_html/layout/newpro/footer.thtml
--- a/public_html/layout/newpro/footer.thtml	Sun Apr 15 14:19:51 2012 +0100
+++ b/public_html/layout/newpro/footer.thtml	Sun Apr 15 14:53:46 2012 +0100
@@ -1,13 +1,13 @@
 
 <!-- footer.thtml { -->
 
-            </div>
-          </td>
-          <td>
-           {right_blocks}
-          </td>
-        </tr>
-      </table>
+        </div>
+        <!--[if !IE]> Using conditional comments to avoid Win IE 6 bugs <![endif]-->
+        <!--[if !IE]> (When combined with multiple floating elements, floating bug duplicate last element content) <![endif]-->
+        <!--[if !IE]> } #centerblocks <![endif]-->
+
+        {right_blocks}
+      </div>
       <!-- } #wrapper -->
 
       <hr class="separator"{xhtml}>
@@ -32,6 +32,14 @@
     <!-- } #container -->
 
     {plg_footercode}
+    
+<!-- Depending on the situation, HTML body element's class attribute to specify a value by JavaScript
+     The argument from the left, the right block container, the middle block left the right block id attribute value -->
+<script type="text/javascript">
+<!--
+  FixHTML('leftblocks', 'centerblocks', 'rightblocks');
+-->
+</script>    
 
 <!-- } footer.thtml -->
 
diff -r 40693fcea086 -r 7701ab85f66c public_html/layout/newpro/functions.php
--- a/public_html/layout/newpro/functions.php	Sun Apr 15 14:19:51 2012 +0100
+++ b/public_html/layout/newpro/functions.php	Sun Apr 15 14:53:46 2012 +0100
@@ -79,7 +79,8 @@
     global $_CONF;
     return array(
         '/layout/' . $_CONF['theme'] . '/javascript/confirm.js',
-        '/layout/' . $_CONF['theme'] . '/javascript/search.js'
+        '/layout/' . $_CONF['theme'] . '/javascript/search.js',
+        '/layout/' . $_CONF['theme'] . '/javascript/fix_html.js'
     );
 }
 
diff -r 40693fcea086 -r 7701ab85f66c public_html/layout/newpro/header.thtml
--- a/public_html/layout/newpro/header.thtml	Sun Apr 15 14:19:51 2012 +0100
+++ b/public_html/layout/newpro/header.thtml	Sun Apr 15 14:53:46 2012 +0100
@@ -14,7 +14,7 @@
 {rel_links}
 {plg_headercode}
   </head>
-  <body dir="{direction}">
+  <body dir="{direction}" class="js_off">
 <!-- header.thtml { -->
 
 <!-- #container { -->
@@ -42,14 +42,15 @@
       <hr class="separator"{xhtml}>
 
       <!-- #wrapper { -->
-      <table id="wrapper">
-        <tr>
-          <td>
-            {left_blocks}
-          </td>
-          <td id="centerblocks-wrapper">
-            <!-- Center Block Container -->
-            <div id="centerblocks">
-              <p class="welcome_msg">{welcome_msg} {datetime}</p>
+      <div id="wrapper">
+
+        {left_blocks}
+
+        <!--[if !IE]> Using conditional comments to avoid Win IE 6 bugs. <![endif]-->
+        <!--[if !IE]> (When combined with multiple floating elements, floating bug duplicate last element content) <![endif]-->
+        <!--[if !IE]> #centerblocks { <![endif]-->
+        <!-- Center Block Container -->
+        <div id="centerblocks">
+          <p class="welcome_msg">{welcome_msg} {datetime}</p>
 
 <!-- } header.thtml -->
diff -r 40693fcea086 -r 7701ab85f66c public_html/layout/newpro/javascript/fix_html.js
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/public_html/layout/newpro/javascript/fix_html.js	Sun Apr 15 14:53:46 2012 +0100
@@ -0,0 +1,27 @@
+function FixHTML( leftblocksID, centerblocksID, rightblocksID ) {
+    var ua = navigator.userAgent.toLowerCase();
+    var is_old_ie = (ua.indexOf("msie") != -1) && (ua.indexOf("msie 8") == -1) && (ua.indexOf("msie 9") == -1) && (ua.indexOf("opera") == -1);
+    
+    var leftblocks = document.getElementById(leftblocksID);
+    var centerblocks = document.getElementById(centerblocksID);
+    var rightblocks = document.getElementById(rightblocksID);
+
+    if ( document.body.getAttribute('class') || document.body.getAttribute('className') ) {
+        var classValue = 'left-center-right';



More information about the geeklog-cvs mailing list