| |
| |
| |
| <h2 id="introduction">Introduction</h2> |
| <p>The Material Design Lite (MDL) <strong>footer</strong> component is a comprehensive container intended to present a substantial amount of related content in a visually attractive and logically intuitive area. Although it is called "footer", it may be placed at any appropriate location on a device screen, either before or after other content.</p> |
| <p>An MDL footer component takes two basic forms: <em>mega-footer</em> and <em>mini-footer</em>. As the names imply, mega-footers contain more (and more complex) content than mini-footers. A mega-footer presents multiple sections of content separated by horizontal rules, while a mini-footer presents a single section of content. Both footer forms have their own internal structures, including required and optional elements, and typically include both informational and clickable content, such as links.</p> |
| <p>Footers, as represented by this component, are a fairly new feature in user interfaces, and allow users to view discrete blocks of content in a coherent and consistently organized way. Their design and use is an important factor in the overall user experience.</p> |
| <h3 id="to-include-an-mdl-mega-footer-component-">To include an MDL <strong>mega-footer</strong> component:</h3> |
| <p> 1a. Code a <code><footer></code> element. Inside the footer, include one <code><div></code> element for each content section, typically three: <em>top</em>, <em>middle</em>, and <em>bottom</em>.</p> |
| <pre><code class="lang-html"><footer> |
| <div> |
| ... |
| </div> |
| <div> |
| ... |
| </div> |
| <div> |
| ... |
| </div> |
| </footer> |
| </code></pre> |
| <p> 1b. Add the appropriate MDL classes to the footer and divs using the <code>class</code> attribute.</p> |
| <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| <div class="mdl-mega-footer__top-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__middle-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__bottom-section"> |
| ... |
| </div> |
| </footer> |
| </code></pre> |
| <p> 2a. Inside the top section div, code two sibling "inner" divs for the <em>left</em> and <em>right</em> content sections.</p> |
| <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| <div class="mdl-mega-footer__top-section"> |
| <div> |
| ... |
| </div> |
| <div> |
| ... |
| </div> |
| </div> |
| <div class="mdl-mega-footer__middle-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__bottom-section"> |
| ... |
| </div> |
| </footer> |
| </code></pre> |
| <p> 2b. Add the appropriate MDL classes to the two "inner" left and right divs using the <code>class</code> attribute.</p> |
| <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| <div class="mdl-mega-footer__top-section"> |
| <div class="mdl-mega-footer__left-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__right-section"> |
| ... |
| </div> |
| </div> |
| <div class="mdl-mega-footer__middle-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__bottom-section"> |
| ... |
| </div> |
| </footer> |
| </code></pre> |
| <p> 3a. Inside the middle section div, code one or more sibling "inner" divs for the <em>drop-down</em> content sections. That is, for two drop-down sections, you would code two divs.</p> |
| <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| <div class="mdl-mega-footer__top-section"> |
| <div class="mdl-mega-footer__left-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__right-section"> |
| ... |
| </div> |
| </div> |
| <div class="mdl-mega-footer__middle-section"> |
| <div> |
| ... |
| </div> |
| <div> |
| ... |
| </div> |
| </div> |
| <div class="mdl-mega-footer__bottom-section"> |
| ... |
| </div> |
| </footer> |
| </code></pre> |
| <p> 3b. Add the appropriate MDL classes to the two "inner" drop-down divs using the <code>class</code> attribute.</p> |
| <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| <div class="mdl-mega-footer__top-section"> |
| <div class="mdl-mega-footer__left-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__right-section"> |
| ... |
| </div> |
| </div> |
| <div class="mdl-mega-footer__middle-section"> |
| <div class="mdl-mega-footer__drop-down-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__drop-down-section"> |
| ... |
| </div> |
| </div> |
| <div class="mdl-mega-footer__bottom-section"> |
| ... |
| </div> |
| </footer> |
| </code></pre> |
| <p> 4a. Inside the bottom section div, code an "inner" div for the section heading and a sibling unordered list for the bottom section links.</p> |
| <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| <div class="mdl-mega-footer__top-section"> |
| <div class="mdl-mega-footer__left-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__right-section"> |
| ... |
| </div> |
| </div> |
| <div class="mdl-mega-footer__middle-section"> |
| <div class="mdl-mega-footer__drop-down-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__drop-down-section"> |
| ... |
| </div> |
| </div> |
| <div class="mdl-mega-footer__bottom-section"> |
| <div> |
| ... |
| </div> |
| <ul> |
| ... |
| </ul> |
| </div> |
| </footer> |
| </code></pre> |
| <p> 4b. Add the appropriate MDL classes to the "inner" div heading and list using the <code>class</code> attribute.</p> |
| <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| <div class="mdl-mega-footer__top-section"> |
| <div class="mdl-mega-footer__left-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__right-section"> |
| ... |
| </div> |
| </div> |
| <div class="mdl-mega-footer__middle-section"> |
| <div class="mdl-mega-footer__drop-down-section"> |
| ... |
| </div> |
| <div class="mdl-mega-footer__drop-down-section"> |
| ... |
| </div> |
| </div> |
| <div class="mdl-mega-footer__bottom-section"> |
| <div class="mdl-logo"> |
| </div> |
| <ul class="mdl-mega-footer__link-list"> |
| ... |
| </ul> |
| </div> |
| </footer> |
| </code></pre> |
| <p> 5. Add content to the top (left and right), middle (drop-downs), and bottom (text and links) sections of the footer; include any appropriate MDL classes using the <code>class</code> attribute.</p> |
| <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| <div class="mdl-mega-footer__top-section"> |
| <div class="mdl-mega-footer__left-section"> |
| <button class="mdl-mega-footer__social-btn"></button> |
| <button class="mdl-mega-footer__social-btn"></button> |
| <button class="mdl-mega-footer__social-btn"></button> |
| </div> |
| <div class="mdl-mega-footer__right-section"> |
| <a href="">Link 1</a> |
| <a href="">Link 2</a> |
| <a href="">Link 3</a> |
| </div> |
| </div> |
| <div class="mdl-mega-footer__middle-section"> |
| <div class="mdl-mega-footer__drop-down-section"> |
| <h1 class="mdl-mega-footer__heading">Drop-down 1 Heading</h1> |
| <ul class="mdl-mega-footer__link-list"> |
| <li><a href="">Link A</a></li> |
| <li><a href="">Link B</a></li> |
| <li><a href="">Link C</a></li> |
| <li><a href="">Link D</a></li> |
| </ul> |
| </div> |
| <div class="mdl-mega-footer__drop-down-section"> |
| <h1 class="mdl-mega-footer__heading">Drop-down 2 Heading</h1> |
| <ul class="mdl-mega-footer__link-list"> |
| <li><a href="">Link A</a></li> |
| <li><a href="">Link B</a></li> |
| <li><a href="">Link C</a></li> |
| </ul> |
| </div> |
| </div> |
| <div class="mdl-mega-footer__bottom-section"> |
| <div class="mdl-logo"> |
| Mega-Footer Bottom Section Heading |
| </div> |
| <ul class="mdl-mega-footer__link-list"> |
| <li><a href="">Link A</a></li> |
| <li><a href="">Link B</a></li> |
| </ul> |
| </div> |
| </footer> |
| </code></pre> |
| <p>The mega-footer component is ready for use.</p> |
| <h4 id="examples">Examples</h4> |
| <p>A mega-footer component with three sections and two drop-down sections in the middle section.</p> |
| <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| <div class="mdl-mega-footer__top-section"> |
| <div class="mdl-mega-footer__left-section"> |
| <button class="mdl-mega-footer__social-btn"></button> |
| <button class="mdl-mega-footer__social-btn"></button> |
| <button class="mdl-mega-footer__social-btn"></button> |
| </div> |
| <div class="mdl-mega-footer__right-section"> |
| <a href="#">Introduction</a> |
| <a href="#">App Status Dashboard</a> |
| <a href="#">Terms of Service</a> |
| </div> |
| </div> |
| <div class="mdl-mega-footer__middle-section"> |
| <div class="mdl-mega-footer__drop-down-section"> |
| <h1 class="mdl-mega-footer__heading">Learning and Support</h1> |
| <ul class="mdl-mega-footer__link-list"> |
| <li><a href="#">Resource Center</a></li> |
| <li><a href="#">Help Center</a></li> |
| <li><a href="#">Community</a></li> |
| <li><a href="#">Learn with Google</a></li> |
| <li><a href="#">Small Business Community</a></li> |
| <li><a href="#">Think Insights</a></li> |
| </ul> |
| </div> |
| <div class="mdl-mega-footer__drop-down-section"> |
| <h1 class="mdl-mega-footer__heading">Just for Developers</h1> |
| <ul class="mdl-mega-footer__link-list"> |
| <li><a href="#">Google Developers</a></li> |
| <li><a href="#">AdWords API</a></li> |
| <li><a href="#">AdWords Scipts</a></li> |
| <li><a href="#">AdWords Remarketing Tag</a></li> |
| </ul> |
| </div> |
| </div> |
| <div class="mdl-mega-footer__bottom-section"> |
| <div class="mdl-logo"> |
| More Information |
| </div> |
| <ul class="mdl-mega-footer__link-list"> |
| <li><a href="#">Help</a></li> |
| <li><a href="#">Privacy and Terms</a></li> |
| </ul> |
| </div> |
| </footer> |
| </code></pre> |
| <h3 id="to-include-an-mdl-mini-footer-component-">To include an MDL <strong>mini-footer</strong> component:</h3> |
| <p> 1a. Code a <code><footer></code> element. Inside the footer, code two <code><div></code> elements, one for the <em>left</em> section and one for the <em>right</em> section.</p> |
| <pre><code class="lang-html"><footer> |
| <div> |
| ... |
| </div> |
| <div> |
| ... |
| </div> |
| </footer> |
| </code></pre> |
| <p> 1b. Add the appropriate MDL classes to the footer and divs using the <code>class</code> attribute.</p> |
| <pre><code class="lang-html"><footer class="mdl-mini-footer"> |
| <div class="mdl-mini-footer__left-section"> |
| ... |
| </div> |
| <div class="mdl-mini-footer__right-section"> |
| ... |
| </div> |
| </footer> |
| </code></pre> |
| <p> 2a. Inside the left section div, code an "inner" div for the section heading and a sibling unordered list for the left section links.</p> |
| <pre><code class="lang-html"><footer class="mdl-mini-footer"> |
| <div class="mdl-mini-footer__left-section"> |
| <div> |
| ... |
| </div> |
| <ul> |
| ... |
| </ul> |
| </div> |
| <div class="mdl-mini-footer__right-section"> |
| ... |
| </div> |
| </footer> |
| </code></pre> |
| <p> 2b. Add the appropriate MDL classes to the "inner" div and list using the <code>class</code> attribute.</p> |
| <pre><code class="lang-html"><footer class="mdl-mini-footer"> |
| <div class="mdl-mini-footer__left-section"> |
| <div class="mdl-logo"> |
| ... |
| </div> |
| <ul class="mdl-mini-footer__link-list"> |
| ... |
| </ul> |
| </div> |
| <div class="mdl-mini-footer__right-section"> |
| ... |
| </div> |
| </footer> |
| </code></pre> |
| <p> 3. Add content to the left (text and links) and right (text or decoration) sections of the footer; include any appropriate MDL classes using the <code>class</code> attribute.</p> |
| <pre><code class="lang-html"><footer class="mdl-mini-footer"> |
| <div class="mdl-mini-footer__left-section"> |
| <div class="mdl-logo"> |
| Mini-footer Heading |
| </div> |
| <ul class="mdl-mini-footer__link-list"> |
| <li><a href="">Link 1</a></li> |
| <li><a href="">Link 2</a></li> |
| <li><a href="">Link 3</a></li> |
| </ul> |
| </div> |
| <div class="mdl-mini-footer__right-section"> |
| <button class="mdl-mini-footer__social-btn"></button> |
| <button class="mdl-mini-footer__social-btn"></button> |
| <button class="mdl-mini-footer__social-btn"></button> |
| </div> |
| </footer> |
| </code></pre> |
| <p>The mini-footer component is ready for use.</p> |
| <h4 id="examples">Examples</h4> |
| <p>A mini-footer with left and right sections.</p> |
| <pre><code class="lang-html"><footer class="mdl-mini-footer"> |
| <div class="mdl-mini-footer__left-section"> |
| <div class="mdl-logo"> |
| More Information |
| </div> |
| <ul class="mdl-mini-footer__link-list"> |
| <li><a href="#">Help</a></li> |
| <li><a href="#">Privacy and Terms</a></li> |
| <li><a href="#">User Agreement</a></li> |
| </ul> |
| </div> |
| <div class="mdl-mini-footer__right-section"> |
| <button class="mdl-mini-footer__social-btn"></button> |
| <button class="mdl-mini-footer__social-btn"></button> |
| <button class="mdl-mini-footer__social-btn"></button> |
| </div> |
| </footer> |
| </code></pre> |
| <h2 id="configuration-options">Configuration options</h2> |
| <p>The MDL CSS classes apply various predefined visual enhancements to the footer. The table below lists the available classes and their effects.</p> |
| <table> |
| <thead> |
| <tr> |
| <th>MDL class</th> |
| <th>Effect</th> |
| <th>Remarks</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>mdl-mega-footer</code></td> |
| <td>Defines container as an MDL mega-footer component</td> |
| <td>Required on footer element</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mega-footer__top-section</code></td> |
| <td>Defines container as a footer top section</td> |
| <td>Required on top section "outer" div element</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mega-footer__left-section</code></td> |
| <td>Defines container as a left section</td> |
| <td>Required on left section "inner" div element</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mega-footer__social-btn</code></td> |
| <td>Defines a decorative square within mega-footer</td> |
| <td>Required on button element (if used)</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mega-footer__right-section</code></td> |
| <td>Defines container as a right section</td> |
| <td>Required on right section "inner" div element</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mega-footer__middle-section</code></td> |
| <td>Defines container as a footer middle section</td> |
| <td>Required on middle section "outer" div element</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mega-footer__drop-down-section</code></td> |
| <td>Defines container as a drop-down (vertical) content area</td> |
| <td>Required on drop-down "inner" div elements</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mega-footer__heading</code></td> |
| <td>Defines a heading as a mega-footer heading</td> |
| <td>Required on h1 element inside drop-down section</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mega-footer__link-list</code></td> |
| <td>Defines an unordered list as a drop-down (vertical) list</td> |
| <td>Required on ul element inside drop-down section</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mega-footer__bottom-section</code></td> |
| <td>Defines container as a footer bottom section</td> |
| <td>Required on bottom section "outer" div element</td> |
| </tr> |
| <tr> |
| <td><code>mdl-logo</code></td> |
| <td>Defines a container as a styled section heading</td> |
| <td>Required on "inner" div element in mega-footer bottom-section or mini-footer left-section</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mini-footer</code></td> |
| <td>Defines container as an MDL mini-footer component</td> |
| <td>Required on footer element</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mini-footer__left-section</code></td> |
| <td>Defines container as a left section</td> |
| <td>Required on left section "inner" div element</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mini-footer__link-list</code></td> |
| <td>Defines an unordered list as an inline (horizontal) list</td> |
| <td>Required on ul element sibling to "mdl-logo" div element</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mini-footer__right-section</code></td> |
| <td>Defines container as a right section</td> |
| <td>Required on right section "inner" div element</td> |
| </tr> |
| <tr> |
| <td><code>mdl-mini-footer__social-btn</code></td> |
| <td>Defines a decorative square within mini-footer</td> |
| <td>Required on button element (if used)</td> |
| </tr> |
| </tbody> |
| </table> |
| |
| |