mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-17 06:20:26 +00:00
141 lines
No EOL
7.8 KiB
HTML
Executable file
141 lines
No EOL
7.8 KiB
HTML
Executable file
<!DOCTYPE html>
|
|
<html class="ui-mobile-rendering">
|
|
<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="../../css/themes/default/jquery.mobile.css" />
|
|
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
|
|
|
|
<script data-main="../../js/jquery.mobile.docs" src="../../external/requirejs/require.js"></script>
|
|
<script src="../../js/jquery.tag.inserter.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 The jQuery Project</p>
|
|
</div>
|
|
|
|
</div><!-- /page -->
|
|
|
|
</body>
|
|
</html> |