Tokentextarea: Fix issues
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.1.0 / docs / toolbars / bars-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 Framework - Theming Toolbars</title> 
7         <link rel="stylesheet"  href="../../css/themes/default/jquery.mobile.css" />  
8         <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9
10         <script src="../../js/jquery.js"></script>
11         <script src="../../docs/_assets/js/jqm-docs.js"></script>
12         <script src="../../js/"></script>
13
14 </head> 
15 <body> 
16
17         <div data-role="page" class="type-interior">
18
19                 <div data-role="header" data-theme="f">
20                 <h1>Bar theming </h1>
21                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
22                 <a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
23         </div>
24         
25
26         <div data-role="content">
27                 <div class="content-primary">   
28                 <p>Both the header and footer bars will be styled by default with the theme's "a" color swatch (black in the default theme) because these bars are typically primary in the visual hierarchy of a page. </p>
29                 
30                         
31                 <h2>Theming headers and footers</h2>
32                 <p>To set the header or footer bars to a different color in your theme, add the <code> data-theme</code> attribute and specify the letter of the theme swatch (a, b, c, etc.). For example, this will set the bar to swatch "b" (blue in the default theme):</p> 
33
34 <div class="highlight"> 
35 <pre>
36 <span class="nt">&lt;div</span> <span class="na">data-role=</span><span class="s">"header"</span> <strong><span class="na">data-theme=</span><span class="s">"b"</span></strong><span class="nt">&gt;</span> 
37         <span class="nt">&lt;h1&gt;</span>Page Title<span class="nt">&lt;/h1&gt;</span> 
38 <span class="nt">&lt;/div&gt;</span> 
39 </pre> 
40 </div>
41
42                 
43                 <h2>Theming buttons in toolbars</h2>
44
45                 <p>Any link added inside the header block will be automatically styled as a button that matches the color of the bar's theme swatch. To make a button stand out as a primary call to action, the <code> data-theme</code> attribute can be used to specify a contrasting button color from a different theme swatch. For example, if we set the header to theme "c" (light gray), both buttons would be styled as the "c" button by default. If we wanted the Save button to visually pop, we can override the color by setting the <code> data-theme</code> attribute to "b" (blue in our default theme) on the Save button's anchor.</p> 
46
47 <div class="highlight"> 
48 <pre>
49 <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"add-user.php"</span> <strong><span class="na">data-theme=</span><span class="s">"b"</span></strong><span class="nt">&gt;</span>Save<span class="nt">&lt;/a&gt;</span> 
50 </pre> 
51 </div> 
52                         
53
54                 
55                 <h2>Theme variations</h2>
56                 <p>This is a demo of the variation that can be achieved by tweaking the theme swatches and buttons inside the headers and footers.</p>
57                 <h3>Headers</h3>
58
59                 
60                 <div data-role="header">
61                         <h1>Bar theme "a"</h1>
62                         <a href="index.html" data-icon="plus" data-theme="c">New</a>
63                 </div>
64                 
65                 <div data-role="header">
66                         <a href="index.html" data-icon="delete" iconpos="notext">Cancel</a>
67                         <h1>Bar theme "a"</h1>
68                         <a href="index.html" data-icon="arrow-r" data-iconpos="right" data-theme="b">Save</a>
69                 </div>
70
71                 <div data-role="header" data-theme="b">
72                         <h1>Bar theme "b"</h1>
73                         <a href="index.html" data-icon="plus" data-theme="a">New</a>
74                 </div>
75
76                 <div data-role="header" data-theme="b">
77                         <a href="index.html" data-icon="delete" iconpos="notext">Cancel</a>
78                         <h1>Bar theme "b"</h1>
79                         <a href="index.html" data-icon="arrow-r" data-iconpos="right" data-theme="d">Save</a>
80                 </div>
81
82                 <div data-role="header" data-theme="c">
83                         <h1>Bar theme "c"</h1>
84                         <a href="index.html" data-icon="plus" data-theme="a">New</a>
85                 </div>
86
87                 <div data-role="header" data-theme="c">
88                         <a href="index.html" data-icon="delete" iconpos="notext">Cancel</a>
89                         <h1>Bar theme "c"</h1>
90                         <a href="index.html" data-icon="arrow-r" data-iconpos="right" data-theme="b">Save</a>
91                 </div>
92
93                 <div data-role="header" data-theme="d">
94                         <h1>Bar theme "d"</h1>
95                         <a href="index.html" data-icon="plus" data-theme="a">New</a>
96                 </div>
97
98                 <div data-role="header" data-theme="d">
99                         <a href="index.html" data-icon="delete" iconpos="notext">Cancel</a>
100                         <h1>Bar theme "d"</h1>
101                         <a href="index.html" data-icon="arrow-r" data-iconpos="right" data-theme="b">Save</a>
102                 </div>
103
104     <h3>Footers</h3>
105         <p>These are examples of a footer with link buttons inside. Note that footers do not have the same prescriptive markup conventions as headers with button slots so use <a href="../content/content-grids.html">layout grids</a> or custom styles to achieve the design you want.</p>
106         
107
108         
109         <div data-role="footer" data-theme="a">
110             <a href="index.html" data-role="button" data-icon="arrow-l" data-iconpos="right">left</a>
111             <a href="index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">right</a>
112             <a href="index.html" data-role="button" data-icon="arrow-u" data-iconpos="right">up</a>
113             <a href="index.html" data-role="button" data-icon="arrow-d" data-iconpos="right">down</a>
114         </div>
115     
116         <div data-role="footer" data-theme="b">
117             <a href="index.html" data-role="button" data-icon="arrow-l" data-iconpos="right">left</a>
118             <a href="index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">right</a>
119             <a href="index.html" data-role="button" data-icon="arrow-u" data-iconpos="right">up</a>
120             <a href="index.html" data-role="button" data-icon="arrow-d" data-iconpos="right">down</a>
121         </div>
122     
123     <div data-role="footer" data-theme="c">
124             <a href="index.html" data-role="button" data-icon="arrow-l" data-iconpos="right">left</a>
125             <a href="index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">right</a>
126             <a href="index.html" data-role="button" data-icon="arrow-u" data-iconpos="right">up</a>
127             <a href="index.html" data-role="button" data-icon="arrow-d" data-iconpos="right">down</a>
128         </div>
129     
130         <div data-role="footer" data-theme="d">
131             <a href="index.html" data-role="button" data-icon="arrow-l" data-iconpos="right">left</a>
132             <a href="index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">right</a>
133             <a href="index.html" data-role="button" data-icon="arrow-u" data-iconpos="right">up</a>
134             <a href="index.html" data-role="button" data-icon="arrow-d" data-iconpos="right">down</a>
135                 </div>
136     
137         <div data-role="footer" data-theme="e">
138             <a href="index.html" data-role="button" data-icon="arrow-l" data-iconpos="right">left</a>
139             <a href="index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">right</a>
140             <a href="index.html" data-role="button" data-icon="arrow-u" data-iconpos="right">up</a>
141             <a href="index.html" data-role="button" data-icon="arrow-d" data-iconpos="right">down</a>
142                 </div>
143
144
145                                 </div><!--/content-primary -->          
146
147                                 <div class="content-secondary">
148
149                                         <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
150
151                                                         <h3>More in this section</h3>
152
153                                                         <ul data-role="listview" data-theme="c" data-dividertheme="d">
154
155                                                                 <li data-role="list-divider">Toolbars</li>
156                                                                 <li><a href="docs-bars.html">Toolbar basics</a></li>
157                                                                 <li><a href="docs-headers.html">Header bars</a></li>
158                                                                 <li><a href="docs-footers.html">Footer bars</a></li>
159                                                                 <li><a href="docs-navbar.html">Navbars</a></li>
160                                                                 <li><a href="bars-fixed.html">Fixed positioning</a></li>
161                                                                 <li><a href="footer-persist-a.html">Persistent toolbars</a></li>
162                                                                 <li data-theme="a"><a href="bars-themes.html">Theming toolbars</a></li>
163
164                                                         </ul>
165                                         </div>
166                                 </div>          
167
168                         </div><!-- /content -->
169
170                         <div data-role="footer" class="footer-docs" data-theme="c">
171                                         <p>&copy; 2011-12 The jQuery Foundation</p>
172                         </div>
173
174                         </div><!-- /page -->
175
176                         </body>
177                         </html>