]> git.ipfire.org Git - thirdparty/foundation/foundation-emails.git/commitdiff
Add more panel examples to docs, including example with nested sub-grid
authorEric Morris <eric@zurb.com>
Fri, 3 Jan 2014 21:15:55 +0000 (13:15 -0800)
committerEric Morris <eric@zurb.com>
Fri, 3 Jan 2014 21:15:55 +0000 (13:15 -0800)
docs/components/panels.php
docs/docs.php
docs/examples/panel-sidebar.html [new file with mode: 0644]
docs/examples/panel-sub-grid.html [new file with mode: 0644]
docs/examples/panels.html

index 660d7a7acf68586d931ae63609bc1c121bcd3f86..4a72f02396e354186e591ec4c7fbacefb81a094c 100644 (file)
@@ -3,7 +3,28 @@
 <hr />
 
 <p>Add a class of <code>panel</code> to a <kbd>&lt;td&gt;</kbd> in a <code>.columns</code> table in order to give it a default border and background color. Great for offsetting important content or for quickly prototyping a layout.</p>
-<h6>Example Panel Markup</h6>
+<h6>Panel Markup</h6>
+<?php code_example(
+'<table class="twelve columns">
+  <tr>
+    <td class="panel">
+
+      Panel content
+
+    </td>
+    <td class="expander"></td>
+  </tr>
+</table>',
+'html') ?>
+<br>
+<h6>Panel Example</h6>
+<iframe id="if-panels" src="docs/examples/panels.html"></iframe>
+<br>
+<hr>
+<h2 class="light">Examples</h2>
+<h4 class="normal">Sidebar Panel</h4>
+<p>A common patten is to have a panel section serve as a sidebar to offset it from the primary content.</p>
+<h6>Sidebar Panel Markup</h6>
 <?php code_example(
 '<table class="row">
   <tr>
 'html') ?>
 <br>
 <h6>Sidebar Panel</h6>
-<iframe id="if-panels" src="docs/examples/panels.html"></iframe>
+<iframe id="if-panelSidebar" src="docs/examples/panel-sidebar.html"></iframe>
+<br>
+<br>
+<h4 class="normal">Panels With Sub-grids</h4>
+<p>Nesting a sub-grid under a panel is non-intuitive, since the sub-grid columns would normally be applied to the <kbd>&lt;td&gt;</kbd> elements directly under the <code>.columns</code> table. To get around this, give the <kbd>&lt;td&gt;</kbd> a class of <code>.panel</code> and a class of <code>.sub-grid</code>. You can then put a <kbd>&lt;table&gt;</kbd> inside the <kbd>&lt;td&gt;</kbd> and create the sub-columns using the <kbd>&lt;td&gt;</kbd> elements of the inner table, as shown below.</p>
+<h6>Panel Sub-grid Markup</h6>
+<?php code_example(
+'<table class="twelve columns">
+  <tr>
+    <td class="panel sub-grid">
+
+      <table>
+        <tr>
+          <td class="six sub-columns">
+            
+            Left Sub-Column
+
+          </td>
+          <td class="six sub-columns">
+            
+            Right Sub-Column
+
+          </td>
+        </tr>
+      </table>
+
+    </td>
+    <td class="expander"></td>
+  </tr>
+</table>',
+'html') ?>
+<br>
+<h6>Sidebar Panel</h6>
+<iframe id="if-panelSubGrid" src="docs/examples/panel-sub-grid.html"></iframe>
 <br>
 <hr />
 <h2 class="light">Compatibility</h2>
index 0773ec3829b693ebb1f66950dae8521b169c022e..7c67d76f1858f31eb7e5e433284700329a804b53 100644 (file)
@@ -10,7 +10,9 @@
     #if-subGrid {height: 140px;}
     #if-blockGrid {height: 540px;}
     #if-visibilityClasses {height: 110px;}
-    #if-panels {height: 420px;}
+    #if-panels {height: 110px;}
+    #if-panelSubGrid {height: 110px;}
+    #if-panelSidebar {height: 420px;}
     #if-buttons{height: 325px;}
     #if-images{height: 250px;}
 
@@ -23,7 +25,9 @@
     #if-subGrid {height: 210px;}
     #if-blockGrid {height: 1000px;}
     #if-visibilityClasses {height: 110px;}   
-    #if-panels {height: 400px;}   
+    #if-panels {height: 110px;}   
+    #if-panelSubGrid {height: 110px;}   
+    #if-panelSidebar {height: 400px;}   
     #if-buttons{height: 650px;}
     #if-images{height: 800px;}
   } 
diff --git a/docs/examples/panel-sidebar.html b/docs/examples/panel-sidebar.html
new file mode 100644 (file)
index 0000000..af118c3
--- /dev/null
@@ -0,0 +1,81 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <meta name="viewport" content="width=device-width"/>
+  <style>
+  
+    /* Include ink.css */
+
+    /* Custom styles go here */
+
+    body {
+      padding-top: 25px;
+      padding-bottom: 25px;
+    }
+  </style>
+</head>
+<body>
+  <table class="body">
+    <tr>
+      <td class="center" align="center" valign="top">
+        <center>
+
+
+          <!-- EXAMPLE CODE -->
+
+          <table class="container">
+            <tr>
+              <td>
+
+                <table class="row">
+                  <tr>
+                    <td class="wrapper">
+
+                      <table class="eight columns">
+                        <tr>
+                          <td>
+                            <h6>Main content</h6>
+                            <p>
+                              Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto, recusandae natus temporibus quas at ea doloremque illo. Explicabo, accusantium, eius. Nihil quia dignissimos minus nisi similique sapiente culpa totam molestiae.
+                            </p>
+                            <p>
+                              Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto, recusandae natus temporibus quas at ea doloremque illo. Explicabo, accusantium, eius. Nihil quia dignissimos minus nisi similique sapiente culpa totam molestiae.
+                            </p>
+                            <p>
+                              Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto, recusandae natus temporibus quas at ea doloremque illo. Explicabo, accusantium, eius. Nihil quia dignissimos minus nisi similique sapiente culpa totam molestiae.
+                            </p>
+                          </td>
+                          <td class="expander"></td>
+                        </tr>
+                      </table>
+
+                    </td>
+                    <td class="wrapper last">
+
+                      <table class="four columns">
+                        <tr>
+                          <td class="panel">
+                            <h6>Panel content</h6>
+                            Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto, recusandae natus temporibus quas at ea doloremque illo. 
+                          </td>
+                          <td class="expander"></td>
+                        </tr>
+                      </table>
+
+                    </td>
+                  </tr>
+                </table>
+
+              </td>
+            </tr>
+          </table>
+
+          <!-- END EXAMPLE CODE -->
+        
+        </center>
+      </td>
+    </tr>
+  </table>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/examples/panel-sub-grid.html b/docs/examples/panel-sub-grid.html
new file mode 100644 (file)
index 0000000..233fa96
--- /dev/null
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <meta name="viewport" content="width=device-width"/>
+  <style>
+  
+    /* Include ink.css */
+
+    /* Custom styles go here */
+
+    body {
+      padding-top: 25px;
+      padding-bottom: 25px;
+    }
+  </style>
+</head>
+<body>
+  <table class="body">
+    <tr>
+      <td class="center" align="center" valign="top">
+        <center>
+
+
+          <!-- EXAMPLE CODE -->
+
+          <table class="container">
+            <tr>
+              <td>
+
+                <table class="row">
+                  <tr>
+                    <td class="wrapper last">
+
+                      <table class="twelve columns">
+                        <tr>
+                          <td class="panel sub-grid">
+
+                            <table>
+                              <tr>
+                                <td class="six sub-columns">
+                                  
+                                  Left Sub-Column
+
+                                </td>
+                                <td class="six sub-columns">
+                                  
+                                  Right Sub-Column
+
+                                </td>
+                              </tr>
+                            </table>
+
+                          </td>
+                          <td class="expander"></td>
+                        </tr>
+                      </table>
+
+                    </td>
+                  </tr>
+                </table>
+
+              </td>
+            </tr>
+          </table>
+
+          <!-- END EXAMPLE CODE -->
+        
+        </center>
+      </td>
+    </tr>
+  </table>
+</body>
+</html>
\ No newline at end of file
index af118c37e990be22206a8081c8e1f96c9ba4c1fc..6a921d34a0740ba47ac82c0caa46b98623e8da66 100644 (file)
 
                 <table class="row">
                   <tr>
-                    <td class="wrapper">
-
-                      <table class="eight columns">
-                        <tr>
-                          <td>
-                            <h6>Main content</h6>
-                            <p>
-                              Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto, recusandae natus temporibus quas at ea doloremque illo. Explicabo, accusantium, eius. Nihil quia dignissimos minus nisi similique sapiente culpa totam molestiae.
-                            </p>
-                            <p>
-                              Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto, recusandae natus temporibus quas at ea doloremque illo. Explicabo, accusantium, eius. Nihil quia dignissimos minus nisi similique sapiente culpa totam molestiae.
-                            </p>
-                            <p>
-                              Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto, recusandae natus temporibus quas at ea doloremque illo. Explicabo, accusantium, eius. Nihil quia dignissimos minus nisi similique sapiente culpa totam molestiae.
-                            </p>
-                          </td>
-                          <td class="expander"></td>
-                        </tr>
-                      </table>
-
-                    </td>
                     <td class="wrapper last">
 
-                      <table class="four columns">
+                      <table class="twelve columns">
                         <tr>
                           <td class="panel">
-                            <h6>Panel content</h6>
-                            Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto, recusandae natus temporibus quas at ea doloremque illo. 
+                            td.panel
                           </td>
                           <td class="expander"></td>
                         </tr>