123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>jQuery Mobile Docs - Content Themes</title>
- <link rel="stylesheet" href="../../jquery.mobile-1.0.1.min.css" />
- <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
- <script src="../../jquery.js"></script>
- <script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
- <script src="../_assets/js/jqm-docs.js"></script>
- <script src="../../jquery.mobile-1.0.1.min.js"></script>
- </head>
- <body>
- <div data-role="page" class="type-interior">
- <div data-role="header" data-theme="f">
- <h1>Theming content</h1>
- <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
- </div><!-- /header -->
- <div data-role="content">
- <div class="content-primary">
- <h2>Theming the content area</h2>
- <p>The main content area of a page (container with the <code> data-role="content"</code> attribute) should be themed by adding the <code> data-theme</code> attribute to the <code> data-role="page"</code> container to ensure that the background colors are applied to the full page, regardless of the content length. (If you add the <code> data-theme</code> attribute to the content container, the background color will stop after the content. So there may be a gap in color between the content and fixed footer.)</p>
- <p>Additionally, the content area of a collapsible can be themed to match the theme of the collapsible header using the <code>data-content-theme</code> attribute.</p>
- <code>
- <div data-role="page" <strong> data-theme="a"</strong> <strong>data-content-theme="a"</strong>>
- </code>
- <h2>Theming collapsible blocks</h2>
- <p>To set the color of the collapsible header, add the <code> data-theme</code> attribute to the collapsible container. The icon and body are not currently themable through data attributes, but can be styled directly with custom css.</p>
- <code>
- <div data-role="collapsible" data-collapsed="true" <strong> data-theme="a"></strong>
- </code>
- <h2>Themed examples</h2>
-
- <p><strong>A</strong> theme swatch on content & collapsible</p>
- <div class="ui-body ui-body-a">
- <h1>H1 Heading</h1>
- <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
- <div data-role="collapsible" data-collapsed="true" data-theme="a">
- <h3>I'm a themed collapsible</h3>
- <p>I have <code> data-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
- </div><!-- /collapsible -->
- <div data-role="collapsible" data-theme="a" data-content-theme="a">
- <h3>I'm a themed collapsible with a themed content</h3>
- <p>I have <code> data-content-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
- </div>
- </div><!-- /themed container -->
-
- <p><strong>B</strong> theme swatch on content & collapsible</p>
- <div class="ui-body ui-body-b">
- <h1>H1 Heading</h1>
- <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
- <div data-role="collapsible" data-collapsed="true" data-theme="b">
- <h3>I'm a themed collapsible</h3>
- <p>I have <code> data-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
- </div><!-- /collapsible -->
- <div data-role="collapsible" data-theme="b" data-content-theme="b">
- <h3>I'm a themed collapsible with a themed content</h3>
- <p>I have <code> data-content-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
- </div>
- </div><!-- /themed container -->
-
- <p><strong>C</strong> theme swatch on content & collapsible</p>
- <div class="ui-body ui-body-c">
- <h1>H1 Heading</h1>
- <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
- <div data-role="collapsible" data-collapsed="true" data-theme="c">
- <h3>I'm a themed collapsible</h3>
- <p>I have <code> data-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
- </div><!-- /collapsible -->
- <div data-role="collapsible" data-theme="c" data-content-theme="c">
- <h3>I'm a themed collapsible with a themed content</h3>
- <p>I have <code> data-content-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
- </div>
- </div><!-- /themed container -->
-
- <p><strong>D</strong> theme swatch on content & collapsible</p>
- <div class="ui-body ui-body-d">
- <h1>H1 Heading</h1>
- <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
- <div data-role="collapsible" data-collapsed="true" data-theme="d">
- <h3>I'm a themed collapsible</h3>
- <p>I have <code> data-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
- </div><!-- /collapsible -->
- <div data-role="collapsible" data-theme="d" data-content-theme="d">
- <h3>I'm a themed collapsible with a themed content</h3>
- <p>I have <code> data-content-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
- </div>
- </div><!-- /themed container -->
-
- <p><strong>E</strong> theme swatch on content & collapsible</p>
- <div class="ui-body ui-body-e">
- <h1>H1 Heading</h1>
- <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
- <div data-role="collapsible" data-collapsed="true" data-theme="e">
- <h3>I'm a themed collapsible</h3>
- <p>I have <code> data-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
- </div><!-- /collapsible -->
- <div data-role="collapsible" data-theme="e" data-content-theme="e">
- <h3>I'm a themed collapsible with a themed content</h3>
- <p>I have <code> data-content-theme</code> attribute set manually on my container to set the color to match the content block I'm in. </p>
- </div>
- </div><!-- /themed container -->
-
-
- </div><!--/content-primary -->
-
- <div class="content-secondary">
-
- <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
-
- <h3>More in this section</h3>
-
- <ul data-role="listview" data-theme="c" data-dividertheme="d">
-
- <li data-role="list-divider">Content Formatting</li>
- <li><a href="content-html.html">Basic HTML styles</a></li>
- <li><a href="content-grids.html">Layout grids (columns)</a></li>
- <li><a href="content-collapsible.html">Collapsible content blocks</a></li>
- <li><a href="content-collapsible-set.html">Collapsible sets (accordions)</a></li>
- <li data-theme="a"><a href="content-themes.html">Theming content</a></li>
-
- </ul>
- </div>
- </div>
- </div><!-- /content -->
- <div data-role="footer" class="footer-docs" data-theme="c">
- <p>© 2011-2012 The jQuery Project</p>
- </div>
-
- </div><!-- /page -->
- </body>
- </html>
|