Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: sky/examples/stocks/stocks.sky

Issue 953903004: Factor sky-toolbar into a componet and use a proper material shadow (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/examples/stocks/stock.sky ('k') | sky/framework/sky-toolbar.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 // Copyright 2015 The Chromium Authors. All rights reserved. 2 // Copyright 2015 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 --> 5 -->
6 <import src="/sky/framework/sky-drawer.sky" /> 6 <import src="/sky/framework/sky-drawer.sky" />
7 <import src="/sky/framework/sky-element.sky" /> 7 <import src="/sky/framework/sky-element.sky" />
8 <import src="/sky/framework/sky-icon.sky" /> 8 <import src="/sky/framework/sky-icon.sky" />
9 <import src="/sky/framework/sky-scrollable.sky" /> 9 <import src="/sky/framework/sky-scrollable.sky" />
10 <import src="/sky/framework/sky-toolbar.sky" />
10 <import src="stock.sky" as='view'/> 11 <import src="stock.sky" as='view'/>
11 <import src='companylist.sky' as='model'/> 12 <import src='companylist.sky' as='model'/>
12 13
13 <sky-element> 14 <sky-element>
14 <template> 15 <template>
15 <style> 16 <style>
16 :host { 17 :host {
17 display: flex; 18 display: flex;
18 flex-direction: column; 19 flex-direction: column;
19 height: -webkit-fill-available; 20 height: -webkit-fill-available;
20 font-family: 'Roboto Regular', 'Helvetica'; 21 font-family: 'Roboto Regular', 'Helvetica';
21 font-size: 16px; 22 font-size: 16px;
22 } 23 }
23 sky-drawer { 24 sky-drawer {
24 position: absolute; 25 position: absolute;
25 z-index: 1; 26 z-index: 2;
26 top: 0; 27 top: 0;
27 left: 0; 28 left: 0;
28 bottom: 0; 29 bottom: 0;
29 right: 0; 30 right: 0;
30 } 31 }
31 sky-toolbar { 32 sky-toolbar {
32 display: flex; 33 z-index: 1;
eseidel 2015/02/24 18:34:36 Should the level= stuff do this?
abarth-chromium 2015/02/24 18:45:20 That's an interesting question. I'm not sure.
33 align-items: center;
34 background-color: #3F51B5; 34 background-color: #3F51B5;
35 color: white; 35 color: white;
36 height: 56px;
37 box-shadow: 0px 4px 4px grey;
38 } 36 }
39 sky-icon { 37 sky-icon {
40 display: flex; 38 display: flex;
41 justify-content: center; 39 justify-content: center;
42 align-items: center; 40 align-items: center;
43 padding: 7px; 41 padding: 8px;
44 margin: 0 4px; 42 margin: 0 4px;
45 color: black; 43 color: black;
46 } 44 }
47 #title { 45 #title {
48 flex: 1; 46 flex: 1;
49 margin: 0 4px; 47 margin: 0 4px;
50 } 48 }
51 sky-scrollable { 49 sky-scrollable {
52 flex: 1; 50 flex: 1;
53 } 51 }
54 </style> 52 </style>
55 <sky-drawer id="drawer"> 53 <sky-drawer id="drawer">
56 I am drawer 54 I am drawer
57 </sky-drawer> 55 </sky-drawer>
58 <sky-toolbar> 56 <sky-toolbar level="2">
eseidel 2015/02/24 18:34:36 We might want to name the levels.
abarth-chromium 2015/02/24 18:45:20 Yeah... I think the spec uses numbers but names w
59 <sky-icon id="menu" type="navigation/menu_white" size="24" /> 57 <sky-icon id="menu" type="navigation/menu_white" size="24" />
60 <div id="title">I am a stocks app</div> 58 <div id="title">I am a stocks app</div>
61 <sky-icon type="action/search_white" size="24" /> 59 <sky-icon type="action/search_white" size="24" />
62 <sky-icon type="navigation/more_vert_white" size="24" /> 60 <sky-icon type="navigation/more_vert_white" size="24" />
63 </sky-toolbar> 61 </sky-toolbar>
64 <sky-scrollable id='stock_list'> 62 <sky-scrollable id='stock_list'>
65 </sky-scrollable> 63 </sky-scrollable>
66 </template> 64 </template>
67 <script> 65 <script>
68 import "dart:sky"; 66 import "dart:sky";
(...skipping 30 matching lines...) Expand all
99 } 97 }
100 98
101 void _handleMenuClick(_) { 99 void _handleMenuClick(_) {
102 _drawer.toggle(); 100 _drawer.toggle();
103 } 101 }
104 } 102 }
105 103
106 _init(script) => register(script, Stocks); 104 _init(script) => register(script, Stocks);
107 </script> 105 </script>
108 </sky-element> 106 </sky-element>
OLDNEW
« no previous file with comments | « sky/examples/stocks/stock.sky ('k') | sky/framework/sky-toolbar.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698