Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame^] | 1 | |
| 2 | |
| 3 | |
| 4 | <h2 id="introduction">Introduction</h2> |
| 5 | <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> |
| 6 | <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> |
| 7 | <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> |
| 8 | <h3 id="to-include-an-mdl-mega-footer-component-">To include an MDL <strong>mega-footer</strong> component:</h3> |
| 9 | <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> |
| 10 | <pre><code class="lang-html"><footer> |
| 11 | <div> |
| 12 | ... |
| 13 | </div> |
| 14 | <div> |
| 15 | ... |
| 16 | </div> |
| 17 | <div> |
| 18 | ... |
| 19 | </div> |
| 20 | </footer> |
| 21 | </code></pre> |
| 22 | <p> 1b. Add the appropriate MDL classes to the footer and divs using the <code>class</code> attribute.</p> |
| 23 | <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| 24 | <div class="mdl-mega-footer__top-section"> |
| 25 | ... |
| 26 | </div> |
| 27 | <div class="mdl-mega-footer__middle-section"> |
| 28 | ... |
| 29 | </div> |
| 30 | <div class="mdl-mega-footer__bottom-section"> |
| 31 | ... |
| 32 | </div> |
| 33 | </footer> |
| 34 | </code></pre> |
| 35 | <p> 2a. Inside the top section div, code two sibling "inner" divs for the <em>left</em> and <em>right</em> content sections.</p> |
| 36 | <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| 37 | <div class="mdl-mega-footer__top-section"> |
| 38 | <div> |
| 39 | ... |
| 40 | </div> |
| 41 | <div> |
| 42 | ... |
| 43 | </div> |
| 44 | </div> |
| 45 | <div class="mdl-mega-footer__middle-section"> |
| 46 | ... |
| 47 | </div> |
| 48 | <div class="mdl-mega-footer__bottom-section"> |
| 49 | ... |
| 50 | </div> |
| 51 | </footer> |
| 52 | </code></pre> |
| 53 | <p> 2b. Add the appropriate MDL classes to the two "inner" left and right divs using the <code>class</code> attribute.</p> |
| 54 | <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| 55 | <div class="mdl-mega-footer__top-section"> |
| 56 | <div class="mdl-mega-footer__left-section"> |
| 57 | ... |
| 58 | </div> |
| 59 | <div class="mdl-mega-footer__right-section"> |
| 60 | ... |
| 61 | </div> |
| 62 | </div> |
| 63 | <div class="mdl-mega-footer__middle-section"> |
| 64 | ... |
| 65 | </div> |
| 66 | <div class="mdl-mega-footer__bottom-section"> |
| 67 | ... |
| 68 | </div> |
| 69 | </footer> |
| 70 | </code></pre> |
| 71 | <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> |
| 72 | <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| 73 | <div class="mdl-mega-footer__top-section"> |
| 74 | <div class="mdl-mega-footer__left-section"> |
| 75 | ... |
| 76 | </div> |
| 77 | <div class="mdl-mega-footer__right-section"> |
| 78 | ... |
| 79 | </div> |
| 80 | </div> |
| 81 | <div class="mdl-mega-footer__middle-section"> |
| 82 | <div> |
| 83 | ... |
| 84 | </div> |
| 85 | <div> |
| 86 | ... |
| 87 | </div> |
| 88 | </div> |
| 89 | <div class="mdl-mega-footer__bottom-section"> |
| 90 | ... |
| 91 | </div> |
| 92 | </footer> |
| 93 | </code></pre> |
| 94 | <p> 3b. Add the appropriate MDL classes to the two "inner" drop-down divs using the <code>class</code> attribute.</p> |
| 95 | <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| 96 | <div class="mdl-mega-footer__top-section"> |
| 97 | <div class="mdl-mega-footer__left-section"> |
| 98 | ... |
| 99 | </div> |
| 100 | <div class="mdl-mega-footer__right-section"> |
| 101 | ... |
| 102 | </div> |
| 103 | </div> |
| 104 | <div class="mdl-mega-footer__middle-section"> |
| 105 | <div class="mdl-mega-footer__drop-down-section"> |
| 106 | ... |
| 107 | </div> |
| 108 | <div class="mdl-mega-footer__drop-down-section"> |
| 109 | ... |
| 110 | </div> |
| 111 | </div> |
| 112 | <div class="mdl-mega-footer__bottom-section"> |
| 113 | ... |
| 114 | </div> |
| 115 | </footer> |
| 116 | </code></pre> |
| 117 | <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> |
| 118 | <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| 119 | <div class="mdl-mega-footer__top-section"> |
| 120 | <div class="mdl-mega-footer__left-section"> |
| 121 | ... |
| 122 | </div> |
| 123 | <div class="mdl-mega-footer__right-section"> |
| 124 | ... |
| 125 | </div> |
| 126 | </div> |
| 127 | <div class="mdl-mega-footer__middle-section"> |
| 128 | <div class="mdl-mega-footer__drop-down-section"> |
| 129 | ... |
| 130 | </div> |
| 131 | <div class="mdl-mega-footer__drop-down-section"> |
| 132 | ... |
| 133 | </div> |
| 134 | </div> |
| 135 | <div class="mdl-mega-footer__bottom-section"> |
| 136 | <div> |
| 137 | ... |
| 138 | </div> |
| 139 | <ul> |
| 140 | ... |
| 141 | </ul> |
| 142 | </div> |
| 143 | </footer> |
| 144 | </code></pre> |
| 145 | <p> 4b. Add the appropriate MDL classes to the "inner" div heading and list using the <code>class</code> attribute.</p> |
| 146 | <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| 147 | <div class="mdl-mega-footer__top-section"> |
| 148 | <div class="mdl-mega-footer__left-section"> |
| 149 | ... |
| 150 | </div> |
| 151 | <div class="mdl-mega-footer__right-section"> |
| 152 | ... |
| 153 | </div> |
| 154 | </div> |
| 155 | <div class="mdl-mega-footer__middle-section"> |
| 156 | <div class="mdl-mega-footer__drop-down-section"> |
| 157 | ... |
| 158 | </div> |
| 159 | <div class="mdl-mega-footer__drop-down-section"> |
| 160 | ... |
| 161 | </div> |
| 162 | </div> |
| 163 | <div class="mdl-mega-footer__bottom-section"> |
| 164 | <div class="mdl-logo"> |
| 165 | </div> |
| 166 | <ul class="mdl-mega-footer__link-list"> |
| 167 | ... |
| 168 | </ul> |
| 169 | </div> |
| 170 | </footer> |
| 171 | </code></pre> |
| 172 | <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> |
| 173 | <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| 174 | <div class="mdl-mega-footer__top-section"> |
| 175 | <div class="mdl-mega-footer__left-section"> |
| 176 | <button class="mdl-mega-footer__social-btn"></button> |
| 177 | <button class="mdl-mega-footer__social-btn"></button> |
| 178 | <button class="mdl-mega-footer__social-btn"></button> |
| 179 | </div> |
| 180 | <div class="mdl-mega-footer__right-section"> |
| 181 | <a href="">Link 1</a> |
| 182 | <a href="">Link 2</a> |
| 183 | <a href="">Link 3</a> |
| 184 | </div> |
| 185 | </div> |
| 186 | <div class="mdl-mega-footer__middle-section"> |
| 187 | <div class="mdl-mega-footer__drop-down-section"> |
| 188 | <h1 class="mdl-mega-footer__heading">Drop-down 1 Heading</h1> |
| 189 | <ul class="mdl-mega-footer__link-list"> |
| 190 | <li><a href="">Link A</a></li> |
| 191 | <li><a href="">Link B</a></li> |
| 192 | <li><a href="">Link C</a></li> |
| 193 | <li><a href="">Link D</a></li> |
| 194 | </ul> |
| 195 | </div> |
| 196 | <div class="mdl-mega-footer__drop-down-section"> |
| 197 | <h1 class="mdl-mega-footer__heading">Drop-down 2 Heading</h1> |
| 198 | <ul class="mdl-mega-footer__link-list"> |
| 199 | <li><a href="">Link A</a></li> |
| 200 | <li><a href="">Link B</a></li> |
| 201 | <li><a href="">Link C</a></li> |
| 202 | </ul> |
| 203 | </div> |
| 204 | </div> |
| 205 | <div class="mdl-mega-footer__bottom-section"> |
| 206 | <div class="mdl-logo"> |
| 207 | Mega-Footer Bottom Section Heading |
| 208 | </div> |
| 209 | <ul class="mdl-mega-footer__link-list"> |
| 210 | <li><a href="">Link A</a></li> |
| 211 | <li><a href="">Link B</a></li> |
| 212 | </ul> |
| 213 | </div> |
| 214 | </footer> |
| 215 | </code></pre> |
| 216 | <p>The mega-footer component is ready for use.</p> |
| 217 | <h4 id="examples">Examples</h4> |
| 218 | <p>A mega-footer component with three sections and two drop-down sections in the middle section.</p> |
| 219 | <pre><code class="lang-html"><footer class="mdl-mega-footer"> |
| 220 | <div class="mdl-mega-footer__top-section"> |
| 221 | <div class="mdl-mega-footer__left-section"> |
| 222 | <button class="mdl-mega-footer__social-btn"></button> |
| 223 | <button class="mdl-mega-footer__social-btn"></button> |
| 224 | <button class="mdl-mega-footer__social-btn"></button> |
| 225 | </div> |
| 226 | <div class="mdl-mega-footer__right-section"> |
| 227 | <a href="#">Introduction</a> |
| 228 | <a href="#">App Status Dashboard</a> |
| 229 | <a href="#">Terms of Service</a> |
| 230 | </div> |
| 231 | </div> |
| 232 | <div class="mdl-mega-footer__middle-section"> |
| 233 | <div class="mdl-mega-footer__drop-down-section"> |
| 234 | <h1 class="mdl-mega-footer__heading">Learning and Support</h1> |
| 235 | <ul class="mdl-mega-footer__link-list"> |
| 236 | <li><a href="#">Resource Center</a></li> |
| 237 | <li><a href="#">Help Center</a></li> |
| 238 | <li><a href="#">Community</a></li> |
| 239 | <li><a href="#">Learn with Google</a></li> |
| 240 | <li><a href="#">Small Business Community</a></li> |
| 241 | <li><a href="#">Think Insights</a></li> |
| 242 | </ul> |
| 243 | </div> |
| 244 | <div class="mdl-mega-footer__drop-down-section"> |
| 245 | <h1 class="mdl-mega-footer__heading">Just for Developers</h1> |
| 246 | <ul class="mdl-mega-footer__link-list"> |
| 247 | <li><a href="#">Google Developers</a></li> |
| 248 | <li><a href="#">AdWords API</a></li> |
| 249 | <li><a href="#">AdWords Scipts</a></li> |
| 250 | <li><a href="#">AdWords Remarketing Tag</a></li> |
| 251 | </ul> |
| 252 | </div> |
| 253 | </div> |
| 254 | <div class="mdl-mega-footer__bottom-section"> |
| 255 | <div class="mdl-logo"> |
| 256 | More Information |
| 257 | </div> |
| 258 | <ul class="mdl-mega-footer__link-list"> |
| 259 | <li><a href="#">Help</a></li> |
| 260 | <li><a href="#">Privacy and Terms</a></li> |
| 261 | </ul> |
| 262 | </div> |
| 263 | </footer> |
| 264 | </code></pre> |
| 265 | <h3 id="to-include-an-mdl-mini-footer-component-">To include an MDL <strong>mini-footer</strong> component:</h3> |
| 266 | <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> |
| 267 | <pre><code class="lang-html"><footer> |
| 268 | <div> |
| 269 | ... |
| 270 | </div> |
| 271 | <div> |
| 272 | ... |
| 273 | </div> |
| 274 | </footer> |
| 275 | </code></pre> |
| 276 | <p> 1b. Add the appropriate MDL classes to the footer and divs using the <code>class</code> attribute.</p> |
| 277 | <pre><code class="lang-html"><footer class="mdl-mini-footer"> |
| 278 | <div class="mdl-mini-footer__left-section"> |
| 279 | ... |
| 280 | </div> |
| 281 | <div class="mdl-mini-footer__right-section"> |
| 282 | ... |
| 283 | </div> |
| 284 | </footer> |
| 285 | </code></pre> |
| 286 | <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> |
| 287 | <pre><code class="lang-html"><footer class="mdl-mini-footer"> |
| 288 | <div class="mdl-mini-footer__left-section"> |
| 289 | <div> |
| 290 | ... |
| 291 | </div> |
| 292 | <ul> |
| 293 | ... |
| 294 | </ul> |
| 295 | </div> |
| 296 | <div class="mdl-mini-footer__right-section"> |
| 297 | ... |
| 298 | </div> |
| 299 | </footer> |
| 300 | </code></pre> |
| 301 | <p> 2b. Add the appropriate MDL classes to the "inner" div and list using the <code>class</code> attribute.</p> |
| 302 | <pre><code class="lang-html"><footer class="mdl-mini-footer"> |
| 303 | <div class="mdl-mini-footer__left-section"> |
| 304 | <div class="mdl-logo"> |
| 305 | ... |
| 306 | </div> |
| 307 | <ul class="mdl-mini-footer__link-list"> |
| 308 | ... |
| 309 | </ul> |
| 310 | </div> |
| 311 | <div class="mdl-mini-footer__right-section"> |
| 312 | ... |
| 313 | </div> |
| 314 | </footer> |
| 315 | </code></pre> |
| 316 | <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> |
| 317 | <pre><code class="lang-html"><footer class="mdl-mini-footer"> |
| 318 | <div class="mdl-mini-footer__left-section"> |
| 319 | <div class="mdl-logo"> |
| 320 | Mini-footer Heading |
| 321 | </div> |
| 322 | <ul class="mdl-mini-footer__link-list"> |
| 323 | <li><a href="">Link 1</a></li> |
| 324 | <li><a href="">Link 2</a></li> |
| 325 | <li><a href="">Link 3</a></li> |
| 326 | </ul> |
| 327 | </div> |
| 328 | <div class="mdl-mini-footer__right-section"> |
| 329 | <button class="mdl-mini-footer__social-btn"></button> |
| 330 | <button class="mdl-mini-footer__social-btn"></button> |
| 331 | <button class="mdl-mini-footer__social-btn"></button> |
| 332 | </div> |
| 333 | </footer> |
| 334 | </code></pre> |
| 335 | <p>The mini-footer component is ready for use.</p> |
| 336 | <h4 id="examples">Examples</h4> |
| 337 | <p>A mini-footer with left and right sections.</p> |
| 338 | <pre><code class="lang-html"><footer class="mdl-mini-footer"> |
| 339 | <div class="mdl-mini-footer__left-section"> |
| 340 | <div class="mdl-logo"> |
| 341 | More Information |
| 342 | </div> |
| 343 | <ul class="mdl-mini-footer__link-list"> |
| 344 | <li><a href="#">Help</a></li> |
| 345 | <li><a href="#">Privacy and Terms</a></li> |
| 346 | <li><a href="#">User Agreement</a></li> |
| 347 | </ul> |
| 348 | </div> |
| 349 | <div class="mdl-mini-footer__right-section"> |
| 350 | <button class="mdl-mini-footer__social-btn"></button> |
| 351 | <button class="mdl-mini-footer__social-btn"></button> |
| 352 | <button class="mdl-mini-footer__social-btn"></button> |
| 353 | </div> |
| 354 | </footer> |
| 355 | </code></pre> |
| 356 | <h2 id="configuration-options">Configuration options</h2> |
| 357 | <p>The MDL CSS classes apply various predefined visual enhancements to the footer. The table below lists the available classes and their effects.</p> |
| 358 | <table> |
| 359 | <thead> |
| 360 | <tr> |
| 361 | <th>MDL class</th> |
| 362 | <th>Effect</th> |
| 363 | <th>Remarks</th> |
| 364 | </tr> |
| 365 | </thead> |
| 366 | <tbody> |
| 367 | <tr> |
| 368 | <td><code>mdl-mega-footer</code></td> |
| 369 | <td>Defines container as an MDL mega-footer component</td> |
| 370 | <td>Required on footer element</td> |
| 371 | </tr> |
| 372 | <tr> |
| 373 | <td><code>mdl-mega-footer__top-section</code></td> |
| 374 | <td>Defines container as a footer top section</td> |
| 375 | <td>Required on top section "outer" div element</td> |
| 376 | </tr> |
| 377 | <tr> |
| 378 | <td><code>mdl-mega-footer__left-section</code></td> |
| 379 | <td>Defines container as a left section</td> |
| 380 | <td>Required on left section "inner" div element</td> |
| 381 | </tr> |
| 382 | <tr> |
| 383 | <td><code>mdl-mega-footer__social-btn</code></td> |
| 384 | <td>Defines a decorative square within mega-footer</td> |
| 385 | <td>Required on button element (if used)</td> |
| 386 | </tr> |
| 387 | <tr> |
| 388 | <td><code>mdl-mega-footer__right-section</code></td> |
| 389 | <td>Defines container as a right section</td> |
| 390 | <td>Required on right section "inner" div element</td> |
| 391 | </tr> |
| 392 | <tr> |
| 393 | <td><code>mdl-mega-footer__middle-section</code></td> |
| 394 | <td>Defines container as a footer middle section</td> |
| 395 | <td>Required on middle section "outer" div element</td> |
| 396 | </tr> |
| 397 | <tr> |
| 398 | <td><code>mdl-mega-footer__drop-down-section</code></td> |
| 399 | <td>Defines container as a drop-down (vertical) content area</td> |
| 400 | <td>Required on drop-down "inner" div elements</td> |
| 401 | </tr> |
| 402 | <tr> |
| 403 | <td><code>mdl-mega-footer__heading</code></td> |
| 404 | <td>Defines a heading as a mega-footer heading</td> |
| 405 | <td>Required on h1 element inside drop-down section</td> |
| 406 | </tr> |
| 407 | <tr> |
| 408 | <td><code>mdl-mega-footer__link-list</code></td> |
| 409 | <td>Defines an unordered list as a drop-down (vertical) list</td> |
| 410 | <td>Required on ul element inside drop-down section</td> |
| 411 | </tr> |
| 412 | <tr> |
| 413 | <td><code>mdl-mega-footer__bottom-section</code></td> |
| 414 | <td>Defines container as a footer bottom section</td> |
| 415 | <td>Required on bottom section "outer" div element</td> |
| 416 | </tr> |
| 417 | <tr> |
| 418 | <td><code>mdl-logo</code></td> |
| 419 | <td>Defines a container as a styled section heading</td> |
| 420 | <td>Required on "inner" div element in mega-footer bottom-section or mini-footer left-section</td> |
| 421 | </tr> |
| 422 | <tr> |
| 423 | <td><code>mdl-mini-footer</code></td> |
| 424 | <td>Defines container as an MDL mini-footer component</td> |
| 425 | <td>Required on footer element</td> |
| 426 | </tr> |
| 427 | <tr> |
| 428 | <td><code>mdl-mini-footer__left-section</code></td> |
| 429 | <td>Defines container as a left section</td> |
| 430 | <td>Required on left section "inner" div element</td> |
| 431 | </tr> |
| 432 | <tr> |
| 433 | <td><code>mdl-mini-footer__link-list</code></td> |
| 434 | <td>Defines an unordered list as an inline (horizontal) list</td> |
| 435 | <td>Required on ul element sibling to "mdl-logo" div element</td> |
| 436 | </tr> |
| 437 | <tr> |
| 438 | <td><code>mdl-mini-footer__right-section</code></td> |
| 439 | <td>Defines container as a right section</td> |
| 440 | <td>Required on right section "inner" div element</td> |
| 441 | </tr> |
| 442 | <tr> |
| 443 | <td><code>mdl-mini-footer__social-btn</code></td> |
| 444 | <td>Defines a decorative square within mini-footer</td> |
| 445 | <td>Required on button element (if used)</td> |
| 446 | </tr> |
| 447 | </tbody> |
| 448 | </table> |
| 449 | |
| 450 | |