OLD | NEW |
1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-media-query/iron-m
edia-query.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-media-query/iron-m
edia-query.html"> |
3 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar_se
arch_field.html"> | 3 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar_se
arch_field.html"> |
4 | 4 |
5 <dom-module id="cr-toolbar"> | 5 <dom-module id="cr-toolbar"> |
6 <template> | 6 <template> |
7 <style> | 7 <style> |
8 :host { | 8 :host { |
9 color: #fff; | 9 color: #fff; |
10 display: flex; | 10 display: flex; |
11 height: 56px; | 11 height: 56px; |
12 } | 12 } |
13 | 13 |
| 14 #menuButton { |
| 15 height: 32px; |
| 16 margin: 6px 6px 6px 18px; |
| 17 min-width: 32px; |
| 18 padding: 6px; |
| 19 width: 32px; |
| 20 } |
| 21 |
14 h1 { | 22 h1 { |
15 @apply(--layout-flex); | 23 @apply(--layout-flex); |
16 -webkit-padding-start: 24px; | |
17 font-size: 123%; | 24 font-size: 123%; |
18 font-weight: 400; | 25 font-weight: 400; |
19 } | 26 } |
20 | 27 |
21 #leftContent { | 28 #leftContent { |
| 29 -webkit-padding-end: 24px; |
22 align-items: center; | 30 align-items: center; |
23 display: flex; | 31 display: flex; |
24 width: var(--side-bar-width, 0); | |
25 } | 32 } |
26 | 33 |
27 #centeredContent { | 34 #centeredContent { |
28 -webkit-padding-end: 12px; | 35 -webkit-padding-end: 12px; |
| 36 align-items: center; |
29 display: flex; | 37 display: flex; |
30 flex: 1 1 0; | 38 flex: 1 1 0; |
31 justify-content: center; | 39 height: 100%; |
| 40 position: relative; |
32 } | 41 } |
33 | 42 |
34 :host([narrow_]) #centeredContent { | 43 :host([narrow_]) #centeredContent { |
35 justify-content: flex-end; | 44 justify-content: flex-end; |
36 } | 45 } |
37 | 46 |
| 47 #search { |
| 48 position: absolute; |
| 49 } |
| 50 |
| 51 :host([narrow_]) #search { |
| 52 position: static; |
| 53 } |
| 54 |
38 :host([narrow_][showing-search_]) #leftContent { | 55 :host([narrow_][showing-search_]) #leftContent { |
39 display: none; | 56 display: none; |
40 } | 57 } |
| 58 |
| 59 :host([narrow_][showing-search_]) #centeredContent { |
| 60 -webkit-margin-start: 18px; |
| 61 } |
41 </style> | 62 </style> |
42 <div id="leftContent"> | 63 <div id="leftContent"> |
| 64 <paper-icon-button id="menuButton" icon="cr:menu" on-click="onMenuClick_"> |
| 65 </paper-icon-button> |
43 <h1>[[pageName]]</h1> | 66 <h1>[[pageName]]</h1> |
44 </div> | 67 </div> |
45 | 68 |
46 <div id="centeredContent"> | 69 <div id="centeredContent"> |
47 <cr-toolbar-search-field id="search" narrow="[[narrow_]]" | 70 <cr-toolbar-search-field id="search" narrow="[[narrow_]]" |
48 label="[[searchPrompt]]" clear-label="[[clearLabel]]" | 71 label="[[searchPrompt]]" clear-label="[[clearLabel]]" |
49 spinner-active="[[spinnerActive]]" | 72 spinner-active="[[spinnerActive]]" |
50 showing-search="{{showingSearch_}}"> | 73 showing-search="{{showingSearch_}}"> |
51 </cr-toolbar-search-field> | 74 </cr-toolbar-search-field> |
52 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}"> | 75 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}"> |
53 </iron-media-query> | 76 </iron-media-query> |
54 </div> | 77 </div> |
55 </template> | 78 </template> |
56 <script src="cr_toolbar.js"></script> | 79 <script src="cr_toolbar.js"></script> |
57 </dom-module> | 80 </dom-module> |
OLD | NEW |