Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / polymer / components-chromium / core-scaffold / core-scaffold.html
1 <!--
2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
5 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
6 Code distributed by Google as part of the polymer project is also
7 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
8 -->
9
10 <!--
11 `core-scaffold` provides general application layout, introducing a 
12 responsive scaffold containing a header, toolbar, menu, title and 
13 areas for application content.
14
15 Example:
16
17     <core-scaffold>
18       <core-header-panel navigation flex mode="seamed">
19         <core-toolbar>Application</core-toolbar>
20         <core-menu theme="core-light-theme">
21           <core-item icon="settings" label="item1"></core-item>
22           <core-item icon="settings" label="item2"></core-item>
23         </core-menu>
24       </core-header-panel>
25       <div tool>Title</div>
26       <div>Content goes here...</div>
27     </core-scaffold>
28
29 Use `mode` to control the header and scrolling behavior of `core-header-panel`
30 and `responsiveWidth` to change the layout of the scaffold.
31
32 To have the content fits to the main area, use `fit` attribute.
33
34     <core-scaffold>
35       <core-header-panel navigation flex mode="seamed">
36         ....
37       </core-header-panel>
38       <div tool>Title</div>
39       <div fit>Content fits to the main area</div>
40     </core-scaffold>
41
42 @group Polymer Core Elements
43 @element core-scaffold
44 @homepage github.io
45 -->
46
47 <link rel="import" href="../core-toolbar/core-toolbar.html">
48 <link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
49 <link rel="import" href="../core-header-panel/core-header-panel.html">
50 <link rel="import" href="../core-icon-button/core-icon-button.html">
51
52 <polymer-element name="core-scaffold" assetpath="">
53 <template>
54
55   <style>
56     
57     :host {
58       display: block;
59     }
60     
61     [drawer] {
62       background-color: #fff;
63       box-shadow: 1px 0 1px rgba(0, 0, 0, 0.1);
64     }
65     
66     [main] {
67       height: 100%;
68       background-color: #eee;
69     }
70     
71     core-toolbar {
72       background-color: #526E9C;
73       color: #fff;
74     }
75     
76     #drawerPanel:not([narrow]) #menuButton {
77       display: none;
78     }
79     
80   </style>
81
82   <core-drawer-panel id="drawerPanel" narrow="{{narrow}}" responsivewidth="{{responsiveWidth}}">
83
84     <div vertical="" layout="" drawer="">
85
86       <content select="[navigation], nav"></content>
87
88     </div>
89     
90     <core-header-panel main="" mode="{{mode}}">
91
92       <core-toolbar>
93         <core-icon-button id="menuButton" icon="menu" on-tap="{{togglePanel}}"></core-icon-button>
94         <content select="[tool]"></content>
95       </core-toolbar>
96       
97       <content select="*"></content>
98       
99     </core-header-panel>
100
101   </core-drawer-panel>
102
103 </template>
104
105 </polymer-element>
106 <script src="core-scaffold-extracted.js"></script>