Tizen 2.1 base
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.0.1pre / docs / pages / pages-themes.html
1 <!DOCTYPE html> 
2 <html> 
3         <head>
4         <meta charset="utf-8">
5         <meta name="viewport" content="width=device-width, initial-scale=1"> 
6         <title>jQuery Mobile Docs - Theming Pages</title> 
7         <link rel="stylesheet"  href="../../css/themes/default/" />  
8         <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9         <script src="../../js/jquery.js"></script>
10         <script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
11         <script src="../_assets/js/jqm-docs.js"></script>
12         <script src="../../js/"></script>
13 </head> 
14 <body> 
15
16         <div data-role="page" class="type-interior">
17
18                 <div data-role="header" data-theme="f">
19                 <h1>Theming pages</h1>
20                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
21         </div><!-- /header -->
22
23         <div data-role="content">
24                 <div class="content-primary">
25                         
26                         <ul data-role="controlgroup" data-type="horizontal" class="localnav">
27                                 <li><a href="pages-themes.html" data-role="button" data-transition="fade" class="ui-btn-active">Theme Overview</a></li>                         
28                                 
29                                 <li><a href="pages-themes/theme-a.html" data-role="button" data-transition="fade">A&nbsp;</a></li>
30                                 <li><a href="pages-themes/theme-b.html" data-role="button" data-transition="fade">B&nbsp;</a></li>
31                                 <li><a href="pages-themes/theme-c.html" data-role="button" data-transition="fade">C&nbsp;</a></li>
32                                 <li><a href="pages-themes/theme-d.html" data-role="button" data-transition="fade">D&nbsp;</a></li>
33                                 <li><a href="pages-themes/theme-e.html" data-role="button" data-transition="fade">E&nbsp;</a></li>
34                         </ul>
35                         
36                         <h2>Page Theming</h2>
37                         
38                         <p>jQuery Mobile has a rich <a href="../api/themes.html">theming system</a> that gives you full control of how pages are styled. There is detailed theming documentation within each page widget, but let's look at a few high-level examples of how theming is applied.</p>
39                         
40                         <p>The <code> data-theme</code> attribute can be applied to the header and footer containers to apply any of the lettered theme color swatches. While the <code>data-theme</code> attribute could be added to the content container, we recommend adding it instead to <code>div</code> or container that has been assigned the <code> data-role="page"</code> attribute to ensure that the background color is applied to the full page. When this is done, all widgets on the page will also inherit the theme specified in the page container. However, headers and footers will default to theme "a". If you want to have a page with, for example, only theme "b" for all its elements, including its header and footer, you will need to specify <code>data-theme="b"</code> to the page <code>div</code> as well as the header and footer <code>divs</code>. </p>
41                         
42                         <p>The default Theme mixes styles from multiple swatches to create visual texture and present the various elements in optimal contrast to one another:</p>
43                         
44                         <div data-role="header">
45                                 <h1>Default Theme</h1>
46                         </div>
47
48                         <div class="ui-body ui-body-c">
49                                 <h3>Default Theme Content Header</h3>
50                                 <p>This is the default content color swatch and a preview of a <a href="#" class="ui-link">link</a>.</p>
51                                 
52                                 <a href="#" data-role="button" data-inline="true">Button</a>
53                         </div>
54
55                         <p>And each of the five "swatches" applies its style consistently across all page elements, as shown below:</p>
56                                                 
57                         <h2>Swatch A</h2>
58                         <div data-role="header" data-position="inline">
59                                 <h1>Header A</h1>
60                         </div>
61                         
62                         
63                         <div class="ui-body ui-body-a">
64                                 <h3>Header</h3>
65                                 <p>This is content color swatch "A" and a preview of a <a href="#" class="ui-link">link</a>.</p>
66                                 <a href="#" data-role="button" data-inline="true">Button</a>
67                         </div>
68
69
70                         <h2>Swatch B</h2>
71                         <div data-role="header" data-theme="b">
72                                 <h1>Header B</h1>
73                         </div>
74                         <div class="ui-body ui-body-b">
75                                 <h3>Header</h3>
76                                 <p>This is content color swatch "B" and a preview of a <a href="#" class="ui-link">link</a>.</p>
77                                 <a href="#" data-role="button" data-inline="true">Button</a>
78                         </div>
79                         
80                         <h2>Swatch C</h2>
81                         <div data-role="header" data-theme="c">
82                                 <h1>Header C</h1>
83                         </div>
84                         <div class="ui-body ui-body-c">
85                                 <h3>Header</h3>
86                                 <p>This is content color swatch "C" and a preview of a <a href="#" class="ui-link">link</a>.</p>
87                                 <a href="#" data-role="button" data-inline="true">Button</a>
88                         </div>
89
90                         <h2>Swatch D</h2>
91                         <div data-role="header" data-theme="d">
92                                 <h1>Header D</h1>
93                         </div>
94                         <div class="ui-body ui-body-d">
95                                 <h3>Header</h3>
96                                 <p>This is content color swatch "D" and a preview of a <a href="#" class="ui-link">link</a>.</p>
97                                 <a href="#" data-role="button" data-inline="true">Button</a>
98                         </div>
99                         
100                         <h2>Swatch E</h2>
101                         <div data-role="header" data-theme="e">
102                                 <h1>Header E</h1>
103                         </div>
104                         <div class="ui-body ui-body-e">
105                                 <h3>Header</h3>
106                                 <p>This is content color swatch "E" and a preview of a <a href="#" class="ui-link">link</a>.</p>
107                                 <a href="#" data-role="button" data-inline="true">Button</a>
108                         </div>
109                         
110                                 </div><!--/content-primary -->          
111
112                                 <div class="content-secondary">
113
114                                         <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
115
116                                                         <h3>More in this section</h3>
117
118                                                         <ul data-role="listview" data-theme="c" data-dividertheme="d">
119
120                                                                 <li data-role="list-divider">Pages &amp; Dialogs</li>
121                                                                 <li><a href="page-anatomy.html">Anatomy of a page</a></li>
122                                                                 <li><a href="page-template.html" data-ajax="false">Single page template</a></li>
123                                                                 <li><a href="multipage-template.html" data-ajax="false">Multi-page template</a></li>
124                                                                 <li><a href="page-titles.html">Page titles</a></li>
125                                                                 <li><a href="page-links.html">Linking pages</a></li>
126                                                                 <li><a href="page-transitions.html" data-ajax="false">Page transitions</a></li>
127                                                                 <li><a href="page-dialogs.html">Dialogs</a></li>
128                                                                 <li><a href="page-cache.html">Prefetching &amp; caching pages</a></li>
129                                                                 <li><a href="page-navmodel.html">Ajax, hashes &amp; history</a></li>
130                                                                 <li><a href="page-dynamic.html">Dynamically injecting pages</a></li>
131                                                                 <li><a href="page-scripting.html">Scripting pages</a></li>
132                                                                 <li><a href="phonegap.html">PhoneGap apps</a></li>
133                                                                 <li><a href="touchoverflow.html">touchOverflow feature</a></li>
134                                                                 <li data-theme="a"><a href="pages-themes.html">Theming pages</a></li>
135                                                         </ul>
136                                         </div>
137                                 </div>          
138
139                         </div><!-- /content -->
140
141                         <div data-role="footer" class="footer-docs" data-theme="c">
142                                         <p>&copy; 2011 The jQuery Project</p>
143                         </div>
144
145                         </div><!-- /page -->
146
147                         </body>
148                         </html>