[geeklog-cvs] geeklog: Changed newpro layout to remove dependency on JS

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Mar 10 17:17:38 EST 2012


changeset 8514:115d146a5a5f
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/115d146a5a5f
user: Rouslan Placella <rouslan at placella.com>
date: Tue Mar 06 20:12:41 2012 +0000
description:
Changed newpro layout to remove dependency on JS

diffstat:

 public_html/layout/newpro/README                 |    2 -
 public_html/layout/newpro/css/layout.css         |  171 +---------------------
 public_html/layout/newpro/footer.thtml           |   22 +--
 public_html/layout/newpro/functions.php          |    1 -
 public_html/layout/newpro/header.thtml           |   24 +-
 public_html/layout/newpro/javascript/fix_html.js |   27 ---
 6 files changed, 31 insertions(+), 216 deletions(-)

diffs (truncated from 375 to 300 lines):

diff -r 5d7ad7ff798b -r 115d146a5a5f public_html/layout/newpro/README
--- a/public_html/layout/newpro/README	Tue Mar 06 14:56:06 2012 +0000
+++ b/public_html/layout/newpro/README	Tue Mar 06 20:12:41 2012 +0000
@@ -79,8 +79,6 @@
     | +css ----------------- Images for ProfessionalCSS_en
     |
     +javascript ------------ JavaScript
-    | |
-    | +fix_html.js --------- Geeklog body Class Attribute
     |
     +README ---------------- 'ProfessionalCSS_en' README(this file)
     |
diff -r 5d7ad7ff798b -r 115d146a5a5f public_html/layout/newpro/css/layout.css
--- a/public_html/layout/newpro/css/layout.css	Tue Mar 06 14:56:06 2012 +0000
+++ b/public_html/layout/newpro/css/layout.css	Tue Mar 06 20:12:41 2012 +0000
@@ -2,27 +2,9 @@
 
 /*==============================================================================
   Title       : Basic Layout Style
-  Author      : Fumito Arakawa as Phize (http://phize.net/) and Geeklog Japanese
+  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
@@ -37,10 +19,11 @@
 
 div#container {
   position: relative;
-  width: 100%;  /*  Container Width */
-  margin: 0;
-  padding: 0;
+  width: 960px;  /*  Site Width */
+  margin: 1em auto;
+  padding: 10px;
   text-align: left;
+  border: 1px solid #888;
 }
 
 
@@ -49,13 +32,11 @@
 --------------------------------------*/
 
 div#container div#header {
-  width: 100%;  /*  Container Width */
   height: 80px;
   background: transparent url(../images/css/bg_header.gif) repeat-x 0 0;
 }
 
 div#container div#header div#header-content {
-  width: 960px;  /*  Site Width[W] */
   margin: 0 auto;
   padding: 0;
 }
@@ -83,7 +64,6 @@
 --------------------------------------*/
 
 div#container div#navigation {
-  width: 100%;  /*  Container Width */
   background: #E7E7E7;
   text-align: left;
 }
@@ -94,7 +74,6 @@
 }
 
 div#container div#navigation div.navigation_content {
-  width: 944px;
   padding: 0.5em 8px;
 }
 
@@ -146,143 +125,22 @@
     Include contents Block level elements(div#leftblocks, div#centerblocks, div#rightblocks)
 --------------------------------------*/
 
-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 {
+    width: 100%;
 }
 
-/* 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 div#centerblocks {
+    width: 100%;
 }
 
-/* JavaScript Enabled* 2 Column ( Left Block*  Center Block) Wrapper */
-body.left-center div#container div#wrapper {
+div#container div#leftblocks {
+    width: 180px;
 }
 
-/* JavaScript Enabled* 2 Column ( Center Block*  Right Block) Wrapper */
-body.center-right div#container div#wrapper {
-}
-
-/* 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
 --------------------------------------*/
@@ -294,7 +152,6 @@
 }
 
 div#container div#footer-content {
-  width: 960px;  /*  Site Width[W] */
   margin: 0 auto;
 }
 
diff -r 5d7ad7ff798b -r 115d146a5a5f public_html/layout/newpro/footer.thtml
--- a/public_html/layout/newpro/footer.thtml	Tue Mar 06 14:56:06 2012 +0000
+++ b/public_html/layout/newpro/footer.thtml	Tue Mar 06 20:12:41 2012 +0000
@@ -1,13 +1,13 @@
 
 <!-- footer.thtml { -->
 
-        </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>
+            </div>
+          </td>
+          <td>
+           {right_blocks}
+          </td>
+        </tr>
+      </table>
       <!-- } #wrapper -->
 
       <hr class="separator"{xhtml}>
@@ -31,14 +31,6 @@
     <!-- } #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 5d7ad7ff798b -r 115d146a5a5f public_html/layout/newpro/functions.php
--- a/public_html/layout/newpro/functions.php	Tue Mar 06 14:56:06 2012 +0000
+++ b/public_html/layout/newpro/functions.php	Tue Mar 06 20:12:41 2012 +0000
@@ -11,7 +11,6 @@
 $_SCRIPTS->setCSSFile('theme', '/layout/' . $_CONF['theme'] . '/style.css');
 
 $_SCRIPTS->setJavaScriptFile('theme.confirm', '/layout/' . $_CONF['theme'] . '/javascript/confirm.js');
-$_SCRIPTS->setJavaScriptFile('theme.fix_html', '/layout/' . $_CONF['theme'] . '/javascript/fix_html.js');
 
 /*
  * For left/right block support there is no longer any need for the theme to



More information about the geeklog-cvs mailing list