OLD | NEW |
| (Empty) |
1 <import src="../../framework/sky-element/sky-element.sky" as="SkyElement" /> | |
2 <import src="app-header.sky" /> | |
3 <import src="app-title.sky" /> | |
4 <import src="app-menu-button.sky" /> | |
5 <import src="app-panel.sky" /> | |
6 <import src="app-panel-header.sky" /> | |
7 <import src="app-panel-content.sky" /> | |
8 <import src="app-toolbar.sky" /> | |
9 <import src="app-search-input.sky" /> | |
10 <import src="app-scrollable.sky" /> | |
11 <import src="app-toast.sky" /> | |
12 | |
13 <sky-element name="flights-app"> | |
14 <template> | |
15 <style> | |
16 * { box-sizing: border-box; } | |
17 | |
18 t, span { | |
19 display: inline; | |
20 } | |
21 | |
22 :host { | |
23 display: flex; | |
24 flex-direction: column; | |
25 height: 100%; | |
26 background-color: #494949; | |
27 font-family: "Helvetica", sans-serif; | |
28 font-size: 16px; | |
29 color: #2B2B2B; | |
30 } | |
31 | |
32 .toast-icon { | |
33 font-weight: bold; | |
34 font-size: 24px; | |
35 border-radius: 16px; | |
36 width: 32px; | |
37 height: 32px; | |
38 border: 2px solid black; | |
39 line-height: 30px; | |
40 text-align: center; | |
41 } | |
42 | |
43 .tip-price { | |
44 font-weight: bold; | |
45 } | |
46 | |
47 .route-result { | |
48 margin: 16px 16px 0 16px; | |
49 outline: 1px solid black; | |
50 } | |
51 | |
52 .route-title { | |
53 flex: 1; | |
54 } | |
55 | |
56 .airline { | |
57 border-radius: 2px; | |
58 align-items: center; | |
59 padding: 8px; | |
60 } | |
61 | |
62 .airline-name { | |
63 flex: 1; | |
64 } | |
65 | |
66 .airline-logo-image { | |
67 width: 50px; | |
68 flex-shrink: 0; | |
69 } | |
70 | |
71 .airline-best-price { | |
72 color: #ABB4B6; | |
73 } | |
74 | |
75 .airline-name, | |
76 .airline-best-price { | |
77 padding: 8px; | |
78 } | |
79 | |
80 a { | |
81 text-decoration: none; | |
82 color: #1155CC; | |
83 } | |
84 </style> | |
85 <app-header> | |
86 <app-title> | |
87 <t>Search</t> | |
88 </app-title> | |
89 <app-menu-button> | |
90 <img src="/sky/examples/flights/images/menu-white.png" style="width: 18px"
/> | |
91 </app-menu-button> | |
92 </app-header> | |
93 <app-toolbar> | |
94 <app-search-input /> | |
95 </app-toolbar> | |
96 <app-scrollable> | |
97 <app-panel class="route-result"> | |
98 <app-panel-header> | |
99 <div class="route-title"> | |
100 <t>SFO to DCA</t> | |
101 </div> | |
102 <app-menu-button> | |
103 <img src="/sky/examples/flights/images/menu-enabled.png" style="width:
14px" /> | |
104 </app-menu-button> | |
105 </app-panel-header> | |
106 <app-panel-content class="airline"> | |
107 <div class="airline-logo"> | |
108 <img class="airline-logo-image" src="/sky/examples/flights/images/virg
in-america.jpg" /> | |
109 </div> | |
110 <div class="airline-name"> | |
111 <t>Virgin America</t> | |
112 </div> | |
113 <div class="airline-best-price"> | |
114 <t><a>$800</a></t> | |
115 </div> | |
116 </app-panel-content> | |
117 <app-panel-content class="airline"> | |
118 <div class="airline-logo"> | |
119 <img class="airline-logo-image" src="/sky/examples/flights/images/ba.j
pg" /> | |
120 </div> | |
121 <div class="airline-name"> | |
122 <t>British Airways</t> | |
123 </div> | |
124 <div class="airline-best-price"> | |
125 <t><a>$700</a></t> | |
126 </div> | |
127 </app-panel-content> | |
128 <app-panel-content class="airline"> | |
129 <div class="airline-logo"> | |
130 <img class="airline-logo-image" src="/sky/examples/flights/images/unit
ed.jpg" /> | |
131 </div> | |
132 <div class="airline-name"> | |
133 <t>United</t> | |
134 </div> | |
135 <div class="airline-best-price"> | |
136 <t><a>$667</a></t> | |
137 </div> | |
138 </app-panel-content> | |
139 <app-panel-content class="airline"> | |
140 <div class="airline-logo"> | |
141 <img class="airline-logo-image" src="/sky/examples/flights/images/delt
a.jpg" /> | |
142 </div> | |
143 <div class="airline-name"> | |
144 <t>Delta</t> | |
145 </div> | |
146 <div class="airline-best-price"> | |
147 <t><a>$450</a></t> | |
148 </div> | |
149 </app-panel-content> | |
150 </app-panel> | |
151 <app-panel class="route-result"> | |
152 <app-panel-header> | |
153 <div class="route-title"> | |
154 <t>SJC to DCA</t> | |
155 </div> | |
156 <app-menu-button> | |
157 <img src="/sky/examples/flights/images/menu-enabled.png" style="width:
14px" /> | |
158 </app-menu-button> | |
159 </app-panel-header> | |
160 <app-panel-content class="airline"> | |
161 <div class="airline-logo"> | |
162 <img class="airline-logo-image" src="/sky/examples/flights/images/virg
in-america.jpg" /> | |
163 </div> | |
164 <div class="airline-name"> | |
165 <t>Virgin America</t> | |
166 </div> | |
167 <div class="airline-best-price"> | |
168 <t><a>$1500</a></t> | |
169 </div> | |
170 </app-panel-content> | |
171 <app-panel-content class="airline"> | |
172 <div class="airline-logo"> | |
173 <img class="airline-logo-image" src="/sky/examples/flights/images/jetb
lue.jpg" /> | |
174 </div> | |
175 <div class="airline-name"> | |
176 <t>jetBlue</t> | |
177 </div> | |
178 <div class="airline-best-price"> | |
179 <t><a>$650</a></t> | |
180 </div> | |
181 </app-panel-content> | |
182 <app-panel-content class="airline"> | |
183 <div class="airline-logo"> | |
184 <img class="airline-logo-image" src="/sky/examples/flights/images/unit
ed.jpg" /> | |
185 </div> | |
186 <div class="airline-name"> | |
187 <t>United</t> | |
188 </div> | |
189 <div class="airline-best-price"> | |
190 <t><a>$367</a></t> | |
191 </div> | |
192 </app-panel-content> | |
193 </app-panel> | |
194 </app-scrollable> | |
195 <app-toast> | |
196 <div class="toast-icon"> | |
197 <t>?</t> | |
198 </div> | |
199 <div class="toast-content"> | |
200 <t>Flights are <span class="tip-price">$200</span> cheaper tomorrow.</t> | |
201 </div> | |
202 </app-toast> | |
203 </template> | |
204 <script> | |
205 module.exports = class extends SkyElement { | |
206 }.register(); | |
207 </script> | |
208 </sky-element> | |
OLD | NEW |