Merge lp:~stephen-stewart/snapweb/repent-harlequin-said-the-ticktockman into lp:~snappy-dev/snapweb/trunk
- repent-harlequin-said-the-ticktockman
- Merge into trunk
Proposed by
Stephen Stewart
Status: | Superseded |
---|---|
Proposed branch: | lp:~stephen-stewart/snapweb/repent-harlequin-said-the-ticktockman |
Merge into: | lp:~snappy-dev/snapweb/trunk |
Diff against target: |
860 lines (+386/-142) 26 files modified
gulpfile.js (+16/-2) package.json (+2/-0) www/src/css/animations.css (+4/-0) www/src/css/banner.css (+5/-3) www/src/css/base.css (+1/-1) www/src/css/headline.css (+10/-0) www/src/css/icon.css (+23/-0) www/src/css/layout.css (+65/-4) www/src/css/snap.css (+13/-12) www/src/css/snaplist.css (+64/-15) www/src/images/cof.svg (+14/-25) www/src/images/default-package-icon.svg (+34/-12) www/src/js/models/snap.js (+31/-6) www/src/js/templates/home.hbs (+5/-1) www/src/js/templates/layout-banner.hbs (+34/-32) www/src/js/templates/snap-detail.hbs (+9/-3) www/src/js/templates/snap-layout.hbs (+15/-10) www/src/js/templates/snap-menu.hbs (+11/-9) www/src/js/templates/snaplist-item.hbs (+4/-3) www/src/js/templates/store.hbs (+0/-1) www/src/js/views/home.js (+2/-0) www/src/js/views/snap-detail.js (+1/-0) www/src/js/views/snap-reviews.js (+1/-1) www/src/js/views/snap-settings.js (+1/-0) www/src/js/views/snaplist-item.js (+8/-1) www/tests/snapItemViewSpec.js (+13/-1) |
To merge this branch: | bzr merge lp:~stephen-stewart/snapweb/repent-harlequin-said-the-ticktockman |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Snappy Developers | Pending | ||
Review via email: mp+260119@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 154. By Stephen Stewart
- 155. By Stephen Stewart
-
wrap snap tab content
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'gulpfile.js' | |||
2 | --- gulpfile.js 2015-05-09 09:33:57 +0000 | |||
3 | +++ gulpfile.js 2015-05-26 10:09:09 +0000 | |||
4 | @@ -6,6 +6,7 @@ | |||
5 | 6 | var buffer = require('vinyl-buffer'); | 6 | var buffer = require('vinyl-buffer'); |
6 | 7 | var concat = require('gulp-concat'); | 7 | var concat = require('gulp-concat'); |
7 | 8 | var csso = require('gulp-csso'); | 8 | var csso = require('gulp-csso'); |
8 | 9 | var customMedia = require("postcss-custom-media"); | ||
9 | 9 | var del = require('del'); | 10 | var del = require('del'); |
10 | 10 | var gulp = require('gulp'); | 11 | var gulp = require('gulp'); |
11 | 11 | var gutil = require('gulp-util'); | 12 | var gutil = require('gulp-util'); |
12 | @@ -47,7 +48,7 @@ | |||
13 | 47 | } | 48 | } |
14 | 48 | 49 | ||
15 | 49 | return bundleShared(bundler); | 50 | return bundleShared(bundler); |
17 | 50 | } | 51 | } |
18 | 51 | 52 | ||
19 | 52 | function bundleShared(bundler) { | 53 | function bundleShared(bundler) { |
20 | 53 | return bundler.bundle() | 54 | return bundler.bundle() |
21 | @@ -75,7 +76,20 @@ | |||
22 | 75 | gulp.task('styles', ['styles:clean'], function() { | 76 | gulp.task('styles', ['styles:clean'], function() { |
23 | 76 | var processors = [ | 77 | var processors = [ |
24 | 77 | autoprefixer({browsers: ['last 1 version']}), | 78 | autoprefixer({browsers: ['last 1 version']}), |
26 | 78 | bemlinter('bem') | 79 | bemlinter('bem'), |
27 | 80 | customMedia({ | ||
28 | 81 | extensions: { | ||
29 | 82 | /** multiples of icon width in grid form **/ | ||
30 | 83 | '--xxs': '(min-width: 424px)', | ||
31 | 84 | '--xs': '(min-width: 540px)', | ||
32 | 85 | '--s': '(min-width: 660px)', | ||
33 | 86 | '--m': '(min-width: 770px)', | ||
34 | 87 | '--l': '(min-width: 880px)', | ||
35 | 88 | '--xl': '(min-width: 1100px)', | ||
36 | 89 | '--xxl': '(min-width: 1430px)', | ||
37 | 90 | '--xxxl': '(min-width: 1870px)' | ||
38 | 91 | } | ||
39 | 92 | }) | ||
40 | 79 | ]; | 93 | ]; |
41 | 80 | return gulp.src([ | 94 | return gulp.src([ |
42 | 81 | 'node_modules/normalize.css/normalize.css', | 95 | 'node_modules/normalize.css/normalize.css', |
43 | 82 | 96 | ||
44 | === modified file 'package.json' | |||
45 | --- package.json 2015-05-08 22:41:11 +0000 | |||
46 | +++ package.json 2015-05-26 10:09:09 +0000 | |||
47 | @@ -37,6 +37,8 @@ | |||
48 | 37 | "lodash": "~3.3.1", | 37 | "lodash": "~3.3.1", |
49 | 38 | "normalize.css": "^3.0.3", | 38 | "normalize.css": "^3.0.3", |
50 | 39 | "postcss-bem-linter": "git://github.com/necolas/postcss-bem-linter", | 39 | "postcss-bem-linter": "git://github.com/necolas/postcss-bem-linter", |
51 | 40 | "postcss-custom-media": "^3.0.0", | ||
52 | 41 | "pretty-bytes": "^2.0.1", | ||
53 | 40 | "vinyl-buffer": "~1.0.0", | 42 | "vinyl-buffer": "~1.0.0", |
54 | 41 | "vinyl-source-stream": "~1.1.0", | 43 | "vinyl-source-stream": "~1.1.0", |
55 | 42 | "watchify": "~3.1.2" | 44 | "watchify": "~3.1.2" |
56 | 43 | 45 | ||
57 | === added file 'www/src/css/animations.css' | |||
58 | --- www/src/css/animations.css 1970-01-01 00:00:00 +0000 | |||
59 | +++ www/src/css/animations.css 2015-05-26 10:09:09 +0000 | |||
60 | @@ -0,0 +1,4 @@ | |||
61 | 1 | @keyframes rotate { | ||
62 | 2 | from { transform: rotate(0deg) } | ||
63 | 3 | to { transform: rotate(360deg) } | ||
64 | 4 | } | ||
65 | 0 | 5 | ||
66 | === modified file 'www/src/css/banner.css' | |||
67 | --- www/src/css/banner.css 2015-05-08 20:03:48 +0000 | |||
68 | +++ www/src/css/banner.css 2015-05-26 10:09:09 +0000 | |||
69 | @@ -1,12 +1,14 @@ | |||
70 | 1 | /** @define b-banner; weak */ | 1 | /** @define b-banner; weak */ |
71 | 2 | 2 | ||
72 | 3 | .b-banner { | 3 | .b-banner { |
76 | 4 | display:flex; | 4 | background-color:#2f2f2f; |
74 | 5 | align-items:center; | ||
75 | 6 | background-color:#202020; | ||
77 | 7 | color:#efefef; | 5 | color:#efefef; |
78 | 8 | line-height:20px; | 6 | line-height:20px; |
79 | 9 | } | 7 | } |
80 | 8 | .b-banner .b-layout__container { | ||
81 | 9 | display:flex; | ||
82 | 10 | align-items:center; | ||
83 | 11 | } | ||
84 | 10 | 12 | ||
85 | 11 | .b-banner img { | 13 | .b-banner img { |
86 | 12 | display:block; | 14 | display:block; |
87 | 13 | 15 | ||
88 | === modified file 'www/src/css/base.css' | |||
89 | --- www/src/css/base.css 2015-04-30 14:38:12 +0000 | |||
90 | +++ www/src/css/base.css 2015-05-26 10:09:09 +0000 | |||
91 | @@ -13,7 +13,7 @@ | |||
92 | 13 | } | 13 | } |
93 | 14 | 14 | ||
94 | 15 | body { | 15 | body { |
96 | 16 | background: url('../images/image-background-paper.png') repeat-y fixed 50% 0 #f7f7f7; | 16 | background-color:#f7f7f7; |
97 | 17 | } | 17 | } |
98 | 18 | 18 | ||
99 | 19 | a { | 19 | a { |
100 | 20 | 20 | ||
101 | === added file 'www/src/css/headline.css' | |||
102 | --- www/src/css/headline.css 1970-01-01 00:00:00 +0000 | |||
103 | +++ www/src/css/headline.css 2015-05-26 10:09:09 +0000 | |||
104 | @@ -0,0 +1,10 @@ | |||
105 | 1 | /** @define b-headline; weak */ | ||
106 | 2 | |||
107 | 3 | .b-headline { | ||
108 | 4 | } | ||
109 | 5 | |||
110 | 6 | .b-headline__h1 { | ||
111 | 7 | font-size:18px; | ||
112 | 8 | font-weight:400; | ||
113 | 9 | margin:20px 15px 5px 15px; | ||
114 | 10 | } | ||
115 | 0 | 11 | ||
116 | === added file 'www/src/css/icon.css' | |||
117 | --- www/src/css/icon.css 1970-01-01 00:00:00 +0000 | |||
118 | +++ www/src/css/icon.css 2015-05-26 10:09:09 +0000 | |||
119 | @@ -0,0 +1,23 @@ | |||
120 | 1 | .b-icon { | ||
121 | 2 | position:relative; | ||
122 | 3 | display:inline-block; | ||
123 | 4 | } | ||
124 | 5 | |||
125 | 6 | .b-icon::before { | ||
126 | 7 | content: ""; | ||
127 | 8 | position:absolute; | ||
128 | 9 | top:0; | ||
129 | 10 | left:0; | ||
130 | 11 | right:0; | ||
131 | 12 | bottom:0; | ||
132 | 13 | background-color:transparent; | ||
133 | 14 | background-image:url(/public/images/icon-mask.png); | ||
134 | 15 | background-repeat:no-repeat; | ||
135 | 16 | background-position:50% 50%; | ||
136 | 17 | background-size:100% 100%; | ||
137 | 18 | z-index:10; | ||
138 | 19 | } | ||
139 | 20 | |||
140 | 21 | .b-icon img { | ||
141 | 22 | display:block; | ||
142 | 23 | } | ||
143 | 0 | 24 | ||
144 | === modified file 'www/src/css/layout.css' | |||
145 | --- www/src/css/layout.css 2015-05-08 20:03:48 +0000 | |||
146 | +++ www/src/css/layout.css 2015-05-26 10:09:09 +0000 | |||
147 | @@ -11,12 +11,20 @@ | |||
148 | 11 | 11 | ||
149 | 12 | .b-layout__main { | 12 | .b-layout__main { |
150 | 13 | flex: 1; | 13 | flex: 1; |
152 | 14 | padding:0 3em; | 14 | position:relative; |
153 | 15 | } | 15 | } |
154 | 16 | 16 | ||
158 | 17 | .b-layout__main:empty { | 17 | .b-layout__main:empty::before { |
159 | 18 | opacity:0.5; | 18 | content:""; |
160 | 19 | background:transparent url("/public/images/default-package-icon.svg") 50% 50% no-repeat; | 19 | position:absolute; |
161 | 20 | top:50%; | ||
162 | 21 | left:50%; | ||
163 | 22 | width:128px; | ||
164 | 23 | height:128px; | ||
165 | 24 | margin:-64px 0 0 -64px; | ||
166 | 25 | background:transparent url("/public/images/cof.svg") 50% 50% no-repeat; | ||
167 | 26 | background-size: 100% 100%; | ||
168 | 27 | animation: rotate 3s linear infinite; | ||
169 | 20 | } | 28 | } |
170 | 21 | 29 | ||
171 | 22 | .b-layout__main:empty + .b-layout__footer { | 30 | .b-layout__main:empty + .b-layout__footer { |
172 | @@ -36,3 +44,56 @@ | |||
173 | 36 | width: 100%; | 44 | width: 100%; |
174 | 37 | z-index: 10000; | 45 | z-index: 10000; |
175 | 38 | } | 46 | } |
176 | 47 | |||
177 | 48 | .b-layout__container { | ||
178 | 49 | width:312px; | ||
179 | 50 | margin:0 auto; | ||
180 | 51 | } | ||
181 | 52 | |||
182 | 53 | @media (--xxs) { | ||
183 | 54 | .b-layout__container { | ||
184 | 55 | width: 424px; | ||
185 | 56 | } | ||
186 | 57 | } | ||
187 | 58 | |||
188 | 59 | @media (--xs) { | ||
189 | 60 | .b-layout__container { | ||
190 | 61 | width: 540px; | ||
191 | 62 | } | ||
192 | 63 | } | ||
193 | 64 | |||
194 | 65 | @media (--s) { | ||
195 | 66 | .b-layout__container { | ||
196 | 67 | width: 660px; | ||
197 | 68 | } | ||
198 | 69 | } | ||
199 | 70 | |||
200 | 71 | @media (--m) { | ||
201 | 72 | .b-layout__container { | ||
202 | 73 | width: 770px; | ||
203 | 74 | } | ||
204 | 75 | } | ||
205 | 76 | |||
206 | 77 | @media (--l) { | ||
207 | 78 | .b-layout__container { | ||
208 | 79 | width: 880px; | ||
209 | 80 | } | ||
210 | 81 | } | ||
211 | 82 | |||
212 | 83 | @media (--xl) { | ||
213 | 84 | .b-layout__container { | ||
214 | 85 | width: 1100px; | ||
215 | 86 | } | ||
216 | 87 | } | ||
217 | 88 | |||
218 | 89 | @media (--xxl) { | ||
219 | 90 | .b-layout__container { | ||
220 | 91 | width: 1430px; | ||
221 | 92 | } | ||
222 | 93 | } | ||
223 | 94 | |||
224 | 95 | @media (--xxxl) { | ||
225 | 96 | .b-layout__container { | ||
226 | 97 | width: 1870px; | ||
227 | 98 | } | ||
228 | 99 | } | ||
229 | 39 | 100 | ||
230 | === modified file 'www/src/css/snap.css' | |||
231 | --- www/src/css/snap.css 2015-05-08 20:03:48 +0000 | |||
232 | +++ www/src/css/snap.css 2015-05-26 10:09:09 +0000 | |||
233 | @@ -3,23 +3,19 @@ | |||
234 | 3 | .b-snap { | 3 | .b-snap { |
235 | 4 | } | 4 | } |
236 | 5 | 5 | ||
241 | 6 | .b-snap__icon { | 6 | .b-snap .b-icon { |
238 | 7 | } | ||
239 | 8 | .b-snap__icon img { | ||
240 | 9 | display:block; | ||
242 | 10 | } | 7 | } |
243 | 11 | 8 | ||
244 | 12 | .b-snap__banner { | 9 | .b-snap__banner { |
245 | 13 | display: flex; | 10 | display: flex; |
246 | 14 | line-height:1.3; | 11 | line-height:1.3; |
249 | 15 | margin:0 -3em; | 12 | padding:1.3em 0; |
248 | 16 | padding:1.3em 3em 1.3em; | ||
250 | 17 | align-items: flex-start; | 13 | align-items: flex-start; |
251 | 18 | background-color:rgba(255,255,255,0.7); | ||
252 | 19 | } | 14 | } |
253 | 20 | 15 | ||
254 | 21 | .b-snap__meta { | 16 | .b-snap__meta { |
255 | 22 | flex: 2; | 17 | flex: 2; |
256 | 18 | margin-left:15px; | ||
257 | 23 | } | 19 | } |
258 | 24 | 20 | ||
259 | 25 | .b-snap__meta > * { | 21 | .b-snap__meta > * { |
260 | @@ -36,13 +32,14 @@ | |||
261 | 36 | 32 | ||
262 | 37 | .b-snap__navigation { | 33 | .b-snap__navigation { |
263 | 38 | background-color:rgba(255,255,255,0.5); | 34 | background-color:rgba(255,255,255,0.5); |
264 | 39 | display: flex; | ||
265 | 40 | align-items: center; | ||
266 | 41 | margin:0 0 1em 0; | ||
267 | 42 | border-top:1px solid #efefef; | 35 | border-top:1px solid #efefef; |
268 | 43 | border-bottom:1px solid #ddd; | 36 | border-bottom:1px solid #ddd; |
271 | 44 | margin:0 -3em 1em -3em; | 37 | margin:0 0 1em 0; |
272 | 45 | padding:0 3em; | 38 | } |
273 | 39 | |||
274 | 40 | .b-snap__navigation .b-layout__container { | ||
275 | 41 | display: flex; | ||
276 | 42 | align-items: center; | ||
277 | 46 | } | 43 | } |
278 | 47 | 44 | ||
279 | 48 | .b-snap__nav-item { | 45 | .b-snap__nav-item { |
280 | @@ -64,3 +61,7 @@ | |||
281 | 64 | right:0; | 61 | right:0; |
282 | 65 | height:3px; | 62 | height:3px; |
283 | 66 | } | 63 | } |
284 | 64 | |||
285 | 65 | .b-snap__tab-content { | ||
286 | 66 | padding:1.3em 3em 1.3em; | ||
287 | 67 | } | ||
288 | 67 | 68 | ||
289 | === modified file 'www/src/css/snaplist.css' | |||
290 | --- www/src/css/snaplist.css 2015-05-08 20:03:48 +0000 | |||
291 | +++ www/src/css/snaplist.css 2015-05-26 10:09:09 +0000 | |||
292 | @@ -15,16 +15,15 @@ | |||
293 | 15 | } | 15 | } |
294 | 16 | 16 | ||
295 | 17 | .b-snaplist_grid .b-snaplist__item { | 17 | .b-snaplist_grid .b-snaplist__item { |
306 | 18 | flex: 0 1 20%; | 18 | flex: 0 1 auto; |
307 | 19 | padding:10px; | 19 | padding:7px; |
308 | 20 | } | 20 | font-size:0; |
309 | 21 | 21 | } | |
310 | 22 | .b-snaplist_grid .b-snaplist__icon { | 22 | |
311 | 23 | } | 23 | .b-snaplist_grid .b-snaplist__item * { |
312 | 24 | 24 | font-size: 12px; | |
313 | 25 | .b-snaplist_grid .b-snaplist__icon img { | 25 | color:#999; |
314 | 26 | border-radius:15%; | 26 | text-align: center; |
305 | 27 | width:100%; | ||
315 | 28 | } | 27 | } |
316 | 29 | 28 | ||
317 | 30 | .b-snaplist_grid .b-snaplist__name { | 29 | .b-snaplist_grid .b-snaplist__name { |
318 | @@ -32,14 +31,57 @@ | |||
319 | 32 | white-space: nowrap; | 31 | white-space: nowrap; |
320 | 33 | overflow: hidden; | 32 | overflow: hidden; |
321 | 34 | text-overflow: ellipsis; | 33 | text-overflow: ellipsis; |
325 | 35 | } | 34 | margin-top:4px; |
326 | 36 | 35 | } | |
327 | 37 | .b-snaplist_grid .b-snaplist__name ~ * { | 36 | |
328 | 37 | .b-snaplist_grid .b-snaplist__name, | ||
329 | 38 | .b-snaplist_grid .b-icon img { | ||
330 | 39 | width:90px; | ||
331 | 40 | } | ||
332 | 41 | |||
333 | 42 | .b-snaplist_grid :not(.b-snaplist__item-app) .b-icon::after { | ||
334 | 43 | content: attr(data-type); | ||
335 | 44 | position:absolute; | ||
336 | 45 | width:100%; | ||
337 | 46 | bottom:0; | ||
338 | 47 | left:0; | ||
339 | 48 | right:0; | ||
340 | 49 | background: rgba(221,72,20,0.8); | ||
341 | 50 | color:#fff; | ||
342 | 51 | z-index:0; | ||
343 | 52 | padding:3px 0 5px; | ||
344 | 53 | text-transform:uppercase; | ||
345 | 54 | font-size:10px; | ||
346 | 55 | } | ||
347 | 56 | |||
348 | 57 | .b-snaplist_grid .b-snaplist__size ~ * { | ||
349 | 38 | display:none; | 58 | display:none; |
350 | 39 | } | 59 | } |
351 | 40 | 60 | ||
352 | 61 | @media (--xxs) { | ||
353 | 62 | .b-snaplist_grid .b-snaplist__item { | ||
354 | 63 | padding:8px; | ||
355 | 64 | } | ||
356 | 65 | } | ||
357 | 66 | |||
358 | 67 | @media (--xs) { | ||
359 | 68 | .b-snaplist_grid .b-snaplist__item { | ||
360 | 69 | padding:9px; | ||
361 | 70 | } | ||
362 | 71 | } | ||
363 | 72 | |||
364 | 73 | @media (--s) { | ||
365 | 74 | .b-snaplist_grid .b-snaplist__item { | ||
366 | 75 | padding:10px; | ||
367 | 76 | } | ||
368 | 77 | } | ||
369 | 78 | |||
370 | 41 | /** row style **/ | 79 | /** row style **/ |
371 | 42 | 80 | ||
372 | 81 | .b-snaplist_row { | ||
373 | 82 | margin:3em; | ||
374 | 83 | } | ||
375 | 84 | |||
376 | 43 | .b-snaplist_row .b-snaplist__item { | 85 | .b-snaplist_row .b-snaplist__item { |
377 | 44 | width:100%; | 86 | width:100%; |
378 | 45 | display:flex; | 87 | display:flex; |
379 | @@ -48,17 +90,24 @@ | |||
380 | 48 | border-radius:4px; | 90 | border-radius:4px; |
381 | 49 | margin-bottom:0.6em; | 91 | margin-bottom:0.6em; |
382 | 50 | background-color:#fff; | 92 | background-color:#fff; |
383 | 93 | font-size:13px; | ||
384 | 51 | } | 94 | } |
385 | 52 | 95 | ||
386 | 53 | .b-snaplist_row .b-snaplist__item:last-child { | 96 | .b-snaplist_row .b-snaplist__item:last-child { |
387 | 54 | margin-bottom:0; | 97 | margin-bottom:0; |
388 | 55 | } | 98 | } |
389 | 56 | 99 | ||
391 | 57 | .b-snaplist_row .b-snaplist__icon { | 100 | |
392 | 101 | .b-snaplist_row .b-icon { | ||
393 | 58 | flex:0 0 40px; | 102 | flex:0 0 40px; |
394 | 59 | } | 103 | } |
395 | 60 | 104 | ||
397 | 61 | .b-snaplist_row .b-snaplist__icon img { | 105 | .b-snaplist_row .b-icon::before { |
398 | 106 | background-image: url(/public/images/icon-mask-on-white.png); | ||
399 | 107 | } | ||
400 | 108 | |||
401 | 109 | |||
402 | 110 | .b-snaplist_row .b-icon img { | ||
403 | 62 | display:block; | 111 | display:block; |
404 | 63 | width: 40px; | 112 | width: 40px; |
405 | 64 | height: 40px; | 113 | height: 40px; |
406 | 65 | 114 | ||
407 | === modified file 'www/src/images/cof.svg' | |||
408 | --- www/src/images/cof.svg 2015-04-24 23:05:53 +0000 | |||
409 | +++ www/src/images/cof.svg 2015-05-26 10:09:09 +0000 | |||
410 | @@ -1,27 +1,16 @@ | |||
411 | 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
437 | 2 | <!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In --> | 2 | <!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
438 | 3 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [ | 3 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
439 | 4 | <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/"> | 4 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
440 | 5 | ]> | 5 | width="256px" height="256px" viewBox="0 0 256 256" enable-background="new 0 0 256 256" xml:space="preserve"> |
441 | 6 | <svg version="1.1" | 6 | <path fill="#FFFFFF" d="M128,0C57.4,0,0,57.4,0,128s57.4,128,128,128s128-57.4,128-128S198.6,0,128,0z M152.4,52.4 |
442 | 7 | xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" | 7 | C156.6,45,166,42.6,173.4,46.8s9.799,13.601,5.6,21c-4.199,7.4-13.6,9.8-21,5.601C150.6,69.2,148,59.8,152.4,52.4z M48.2,143.4 |
443 | 8 | x="0px" y="0px" width="285px" height="285px" viewBox="-0.866 -0.866 285 285" enable-background="new -0.866 -0.866 285 285" | 8 | c-8.4,0-15.4-7-15.4-15.4s6.8-15.4,15.4-15.4c8.6,0,15.399,6.801,15.399,15.4C63.6,136.4,56.6,143.4,48.2,143.4z M61.8,144.801 |
444 | 9 | xml:space="preserve"> | 9 | c4.8-4,8-10,8-16.801c0-6.8-3-12.8-8-16.8C66,95,76,81.4,89.4,72.4L100.6,91.2c-11.6,8.2-19,21.6-19,36.8 |
445 | 10 | <defs> | 10 | c0,15.199,7.601,28.6,19,36.801L89.4,183.6C76,174.6,66,160.801,61.8,144.801z M173.4,209.199c-7.4,4.201-16.801,1.801-21-5.6 |
446 | 11 | </defs> | 11 | c-4.201-7.4-1.801-16.799,5.6-21c7.4-4.199,16.801-1.799,21,5.6C183.199,195.6,180.801,205,173.4,209.199z M173.4,175.6 |
447 | 12 | <path fill="#FFFFFF" d="M283.465,141.734c0,78.273-63.457,141.73-141.734,141.73S0,220.008,0,141.734C0,63.455,63.453,0,141.73,0 | 12 | c-5.801-2.199-12.6-2-18.4,1.4s-9.6,9-10.4,15.199c-5.6,1.602-11.6,2.4-17.8,2.4c-10.6,0-20.6-2.4-29.6-7l10.6-19.199 |
448 | 13 | S283.465,63.455,283.465,141.734z"/> | 13 | c5.8,2.799,12.2,4.199,19,4.199c23.399,0,42.8-18,44.8-40.799l22,0.398C192,149.199,184.6,164.4,173.4,175.6z M171.199,124 |
449 | 14 | <path d="M45.356,122.812c-10.453,0-18.923,8.47-18.923,18.923c0,10.449,8.47,18.92,18.923,18.92c10.449,0,18.92-8.471,18.92-18.92 | 14 | c-2-23-21.199-41-44.799-41c-6.801,0-13.2,1.4-19,4.2L96.8,68c9-4.4,19-7,29.601-7c6.199,0,12.199,0.8,17.799,2.4 |
450 | 15 | C64.276,131.281,55.806,122.812,45.356,122.812z M180.463,208.814c-9.051,5.225-12.149,16.793-6.926,25.84 | 15 | c1,6.199,4.602,11.8,10.4,15.199C160.4,82,167.199,82.4,173,80c11.4,11.2,18.801,26.4,19.801,43.4L171.199,124z"/> |
426 | 16 | c5.226,9.051,16.793,12.151,25.844,6.926c9.048-5.224,12.148-16.792,6.923-25.842C201.08,206.691,189.511,203.59,180.463,208.814z | ||
427 | 17 | M86.458,141.732c0-18.701,9.293-35.219,23.504-45.221L96.128,73.338c-16.56,11.064-28.878,27.978-33.995,47.788 | ||
428 | 18 | c5.977,4.872,9.796,12.291,9.796,20.608c0,8.315-3.819,15.734-9.797,20.605c5.116,19.812,17.435,36.726,33.995,47.789l13.835-23.175 | ||
429 | 19 | C95.751,176.953,86.458,160.436,86.458,141.732z M141.733,86.457c28.877,0,52.564,22.141,55.047,50.373l26.968-0.394 | ||
430 | 20 | c-1.327-20.844-10.432-39.562-24.425-53.319c-7.194,2.718-15.505,2.306-22.688-1.842c-7.192-4.152-11.705-11.156-12.941-18.757 | ||
431 | 21 | c-6.992-1.935-14.351-2.99-21.96-2.99c-13.086,0-25.449,3.072-36.431,8.512l13.146,23.56 | ||
432 | 22 | C125.526,88.307,133.412,86.457,141.733,86.457z M141.733,197.008c-8.322,0-16.207-1.85-23.285-5.143L105.3,215.427 | ||
433 | 23 | c10.983,5.438,23.347,8.511,36.433,8.511c7.609,0,14.968-1.055,21.961-2.99c1.236-7.601,5.75-14.605,12.943-18.76 | ||
434 | 24 | c7.183-4.146,15.494-4.558,22.688-1.839c13.992-13.758,23.097-32.476,24.422-53.32l-26.968-0.394 | ||
435 | 25 | C194.298,174.871,170.61,197.008,141.733,197.008z M180.46,74.649c9.05,5.227,20.619,2.126,25.842-6.921 | ||
436 | 26 | c5.226-9.051,2.128-20.619-6.923-25.845c-9.049-5.224-20.617-2.124-25.843,6.927C168.312,57.857,171.412,69.426,180.46,74.649z"/> | ||
451 | 27 | </svg> | 16 | </svg> |
452 | 28 | 17 | ||
453 | === modified file 'www/src/images/default-package-icon.svg' | |||
454 | --- www/src/images/default-package-icon.svg 2015-04-30 13:42:46 +0000 | |||
455 | +++ www/src/images/default-package-icon.svg 2015-05-26 10:09:09 +0000 | |||
456 | @@ -1,16 +1,38 @@ | |||
457 | 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
458 | 2 | <!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | 2 | <!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
459 | 3 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | 3 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
472 | 4 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | 4 | <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="256px" |
473 | 5 | width="256px" height="256px" viewBox="0 0 256 256" enable-background="new 0 0 256 256" xml:space="preserve"> | 5 | height="256px" viewBox="0 0 256 256" enable-background="new 0 0 256 256" xml:space="preserve"> |
474 | 6 | <path fill="#FFFFFF" d="M128,64c-35.3,0-64,28.7-64,64c0,35.3,28.7,64,64,64c35.3,0,64-28.7,64-64C192,92.7,163.3,64,128,64z | 6 | <g id="Layer_1"> |
475 | 7 | M140.2,90.2c2.1-3.7,6.8-4.9,10.5-2.8c3.7,2.1,4.9,6.8,2.8,10.5c-2.1,3.7-6.8,4.9-10.5,2.8C139.3,98.6,138,93.9,140.2,90.2z | 7 | <rect fill="#EFEFEF" width="256" height="256"/> |
476 | 8 | M88.1,135.7c-4.2,0-7.7-3.5-7.7-7.7c0-4.2,3.4-7.7,7.7-7.7c4.3,0,7.7,3.4,7.7,7.7C95.8,132.2,92.3,135.7,88.1,135.7z M94.9,136.4 | 8 | </g> |
477 | 9 | c2.4-2,4-5,4-8.4c0-3.4-1.5-6.4-4-8.4c2.1-8.1,7.1-14.9,13.8-19.4l5.6,9.4c-5.8,4.1-9.5,10.8-9.5,18.4c0,7.6,3.8,14.3,9.5,18.4 | 9 | <g id="Layer_2"> |
478 | 10 | l-5.6,9.4C102,151.3,97,144.4,94.9,136.4z M150.7,168.6c-3.7,2.1-8.4,0.9-10.5-2.8c-2.1-3.7-0.9-8.4,2.8-10.5 | 10 | <line fill="none" stroke="#DBDBDB" stroke-miterlimit="10" x1="32" y1="0" x2="32" y2="256"/> |
479 | 11 | c3.7-2.1,8.4-0.9,10.5,2.8C155.6,161.8,154.4,166.5,150.7,168.6z M150.7,151.8c-2.9-1.1-6.3-1-9.2,0.7c-2.9,1.7-4.8,4.5-5.2,7.6 | 11 | <line fill="none" stroke="#DBDBDB" stroke-miterlimit="10" x1="96" y1="0" x2="96" y2="256"/> |
480 | 12 | c-2.8,0.8-5.8,1.2-8.9,1.2c-5.3,0-10.3-1.2-14.8-3.5l5.3-9.6c2.9,1.4,6.1,2.1,9.5,2.1c11.7,0,21.4-9,22.4-20.4l11,0.2 | 12 | <line fill="none" stroke="#C1C1C1" stroke-miterlimit="10" x1="64" y1="0" x2="64" y2="256"/> |
481 | 13 | C160,138.6,156.3,146.2,150.7,151.8z M149.6,126c-1-11.5-10.6-20.5-22.4-20.5c-3.4,0-6.6,0.7-9.5,2.1l-5.3-9.6 | 13 | <line fill="#EFEFEF" stroke="#AAAAAA" stroke-miterlimit="10" x1="128" y1="0" x2="128" y2="256"/> |
482 | 14 | c4.5-2.2,9.5-3.5,14.8-3.5c3.1,0,6.1,0.4,8.9,1.2c0.5,3.1,2.3,5.9,5.2,7.6c2.9,1.7,6.3,1.9,9.2,0.7c5.7,5.6,9.4,13.2,9.9,21.7 | 14 | <line fill="none" stroke="#DBDBDB" stroke-miterlimit="10" x1="160" y1="0" x2="160" y2="256"/> |
483 | 15 | L149.6,126z"/> | 15 | <line fill="none" stroke="#C1C1C1" stroke-miterlimit="10" x1="192" y1="0" x2="192" y2="256"/> |
484 | 16 | <line fill="none" stroke="#DBDBDB" stroke-miterlimit="10" x1="224" y1="0" x2="224" y2="256"/> | ||
485 | 17 | <line fill="none" stroke="#DBDBDB" stroke-miterlimit="10" x1="0" y1="224" x2="256" y2="224"/> | ||
486 | 18 | <line fill="none" stroke="#DBDBDB" stroke-miterlimit="10" x1="0" y1="160" x2="256" y2="160"/> | ||
487 | 19 | <line fill="none" stroke="#C1C1C1" stroke-miterlimit="10" x1="0" y1="192" x2="256" y2="192"/> | ||
488 | 20 | <line fill="#EFEFEF" stroke="#AAAAAA" stroke-miterlimit="10" x1="0" y1="128" x2="256" y2="128"/> | ||
489 | 21 | <line fill="none" stroke="#DBDBDB" stroke-miterlimit="10" x1="0" y1="96" x2="256" y2="96"/> | ||
490 | 22 | <line fill="none" stroke="#C1C1C1" stroke-miterlimit="10" x1="0" y1="64" x2="256" y2="64"/> | ||
491 | 23 | <line fill="none" stroke="#DBDBDB" stroke-miterlimit="10" x1="0" y1="32" x2="256" y2="32"/> | ||
492 | 24 | </g> | ||
493 | 25 | <g id="Layer_3"> | ||
494 | 26 | <circle fill="#EFEFEF" cx="128" cy="128" r="64"/> | ||
495 | 27 | <path fill="#EFEFEF" stroke="#AAAAAA" stroke-miterlimit="10" d="M128,64c-35.3,0-64,28.7-64,64s28.7,64,64,64s64-28.7,64-64 | ||
496 | 28 | S163.3,64,128,64z M140.2,90.2c2.1-3.7,6.8-4.9,10.5-2.8s4.899,6.8,2.8,10.5c-2.1,3.7-6.8,4.9-10.5,2.8 | ||
497 | 29 | C139.3,98.6,138,93.9,140.2,90.2z M88.1,135.7c-4.2,0-7.7-3.5-7.7-7.7s3.4-7.7,7.7-7.7c4.3,0,7.7,3.4,7.7,7.7 | ||
498 | 30 | C95.8,132.2,92.3,135.7,88.1,135.7z M94.9,136.4c2.4-2,4-5,4-8.4c0-3.4-1.5-6.4-4-8.4c2.1-8.1,7.1-14.9,13.8-19.4l5.6,9.4 | ||
499 | 31 | c-5.8,4.1-9.5,10.8-9.5,18.4c0,7.6,3.8,14.3,9.5,18.4l-5.6,9.399C102,151.3,97,144.4,94.9,136.4z M150.7,168.6 | ||
500 | 32 | c-3.7,2.101-8.4,0.9-10.5-2.8c-2.101-3.7-0.9-8.399,2.8-10.5c3.7-2.1,8.4-0.899,10.5,2.8C155.6,161.8,154.4,166.5,150.7,168.6z | ||
501 | 33 | M150.7,151.8c-2.9-1.1-6.3-1-9.2,0.7s-4.8,4.5-5.2,7.6c-2.8,0.801-5.8,1.2-8.9,1.2c-5.3,0-10.3-1.2-14.8-3.5l5.3-9.6 | ||
502 | 34 | c2.9,1.399,6.1,2.1,9.5,2.1c11.7,0,21.4-9,22.4-20.399l11,0.199C160,138.6,156.3,146.2,150.7,151.8z M149.6,126 | ||
503 | 35 | c-1-11.5-10.6-20.5-22.399-20.5c-3.4,0-6.6,0.7-9.5,2.1l-5.3-9.6c4.5-2.2,9.5-3.5,14.8-3.5c3.1,0,6.1,0.4,8.899,1.2 | ||
504 | 36 | c0.5,3.1,2.301,5.9,5.2,7.6c2.9,1.7,6.3,1.9,9.2,0.7c5.7,5.6,9.4,13.2,9.9,21.7L149.6,126z"/> | ||
505 | 37 | </g> | ||
506 | 16 | </svg> | 38 | </svg> |
507 | 17 | 39 | ||
508 | === added file 'www/src/images/icon-mask-on-white.png' | |||
509 | 18 | Binary files www/src/images/icon-mask-on-white.png 1970-01-01 00:00:00 +0000 and www/src/images/icon-mask-on-white.png 2015-05-26 10:09:09 +0000 differ | 40 | Binary files www/src/images/icon-mask-on-white.png 1970-01-01 00:00:00 +0000 and www/src/images/icon-mask-on-white.png 2015-05-26 10:09:09 +0000 differ |
510 | === added file 'www/src/images/icon-mask.png' | |||
511 | 19 | Binary files www/src/images/icon-mask.png 1970-01-01 00:00:00 +0000 and www/src/images/icon-mask.png 2015-05-26 10:09:09 +0000 differ | 41 | Binary files www/src/images/icon-mask.png 1970-01-01 00:00:00 +0000 and www/src/images/icon-mask.png 2015-05-26 10:09:09 +0000 differ |
512 | === modified file 'www/src/js/models/snap.js' | |||
513 | --- www/src/js/models/snap.js 2015-05-11 10:30:57 +0000 | |||
514 | +++ www/src/js/models/snap.js 2015-05-26 10:09:09 +0000 | |||
515 | @@ -3,6 +3,7 @@ | |||
516 | 3 | var _ = require('lodash'); | 3 | var _ = require('lodash'); |
517 | 4 | var Backbone = require('backbone'); | 4 | var Backbone = require('backbone'); |
518 | 5 | var Radio = require('backbone.radio'); | 5 | var Radio = require('backbone.radio'); |
519 | 6 | var prettyBytes = require('pretty-bytes'); | ||
520 | 6 | var CONF = require('../config.js'); | 7 | var CONF = require('../config.js'); |
521 | 7 | var chan = Radio.channel('root'); | 8 | var chan = Radio.channel('root'); |
522 | 8 | 9 | ||
523 | @@ -57,12 +58,34 @@ | |||
524 | 57 | chan.command('alert:error', model); | 58 | chan.command('alert:error', model); |
525 | 58 | }); | 59 | }); |
526 | 59 | 60 | ||
533 | 60 | this.on('add change:message', this.onMessageChange); | 61 | this.on('add change:status', this.onStatusChange); |
534 | 61 | 62 | this.on('add change:installed_size', this.onInstalledSizeChange); | |
535 | 62 | this.on('add change:status', this.handleStatusChange); | 63 | this.on('add change:download_size', this.onDownloadSizeChange); |
536 | 63 | }, | 64 | }, |
537 | 64 | 65 | ||
538 | 65 | handleStatusChange: function(model) { | 66 | onDownloadSizeChange: function(model) { |
539 | 67 | var bytes = model.get('download_size'); | ||
540 | 68 | model.set( | ||
541 | 69 | 'prettyDownloadSize', this._prettyBytes(model.get('download_size')) | ||
542 | 70 | ); | ||
543 | 71 | }, | ||
544 | 72 | |||
545 | 73 | onInstalledSizeChange: function(model) { | ||
546 | 74 | var bytes = model.get('installed_size'); | ||
547 | 75 | model.set( | ||
548 | 76 | 'prettyInstalledSize', this._prettyBytes(model.get('installed_size')) | ||
549 | 77 | ); | ||
550 | 78 | }, | ||
551 | 79 | |||
552 | 80 | _prettyBytes: function(bytes) { | ||
553 | 81 | if (_.isNumber(bytes) && bytes >= 0) { | ||
554 | 82 | return prettyBytes(bytes); | ||
555 | 83 | } else { | ||
556 | 84 | return false; | ||
557 | 85 | } | ||
558 | 86 | }, | ||
559 | 87 | |||
560 | 88 | onStatusChange: function(model) { | ||
561 | 66 | this.setInstallActionString(model); | 89 | this.setInstallActionString(model); |
562 | 67 | this.setInstallHTMLClass(model); | 90 | this.setInstallHTMLClass(model); |
563 | 68 | }, | 91 | }, |
564 | @@ -164,6 +187,8 @@ | |||
565 | 164 | icon: '/public/images/default-package-icon.svg', | 187 | icon: '/public/images/default-package-icon.svg', |
566 | 165 | installActionString: false, | 188 | installActionString: false, |
567 | 166 | origin: '-', | 189 | origin: '-', |
568 | 190 | installed_size: 'n/a', | ||
569 | 191 | download_size: 'n/a', | ||
570 | 167 | isInstallable: true | 192 | isInstallable: true |
571 | 168 | } | 193 | } |
572 | 169 | 194 | ||
573 | 170 | 195 | ||
574 | === modified file 'www/src/js/templates/home.hbs' | |||
575 | --- www/src/js/templates/home.hbs 2015-05-02 19:00:37 +0000 | |||
576 | +++ www/src/js/templates/home.hbs 2015-05-26 10:09:09 +0000 | |||
577 | @@ -1,2 +1,6 @@ | |||
579 | 1 | <h1>Installed apps</h1> | 1 | <div class="b-headline"> |
580 | 2 | <div class="b-layout__container"> | ||
581 | 3 | <h1 class="b-headline__h1">Installed snaps</h1> | ||
582 | 4 | </div> | ||
583 | 5 | </div> | ||
584 | 2 | <div class="region-installed"></div> | 6 | <div class="region-installed"></div> |
585 | 3 | 7 | ||
586 | === modified file 'www/src/js/templates/layout-banner.hbs' | |||
587 | --- www/src/js/templates/layout-banner.hbs 2015-05-08 20:03:48 +0000 | |||
588 | +++ www/src/js/templates/layout-banner.hbs 2015-05-26 10:09:09 +0000 | |||
589 | @@ -1,32 +1,34 @@ | |||
622 | 1 | <div class="b-banner__brand"> | 1 | <div class="b-layout__container"> |
623 | 2 | <div class="b-banner__nav-item{{#if isHomeActive }} b-banner__nav-item_active{{/if}}"> | 2 | <div class="b-banner__brand"> |
624 | 3 | <a href="/"> | 3 | <div class="b-banner__nav-item{{#if isHomeActive }} b-banner__nav-item_active{{/if}}"> |
625 | 4 | <img src="/public/images/cof.svg" height="30" width="30"> | 4 | <a href="/"> |
626 | 5 | <span>{{ name }} {{ subname }}</span> | 5 | <img src="/public/images/cof.svg" height="30" width="30"> |
627 | 6 | </a> | 6 | <span>{{ name }} {{ subname }}</span> |
628 | 7 | </div> | 7 | </a> |
629 | 8 | </div> | 8 | </div> |
630 | 9 | <div class="b-banner__primary-nav"> | 9 | </div> |
631 | 10 | <div class="b-banner__nav-item{{#if isStoreActive }} b-banner__nav-item_active{{/if}}"> | 10 | <div class="b-banner__primary-nav"> |
632 | 11 | <a href="/store"> | 11 | <div class="b-banner__nav-item{{#if isStoreActive }} b-banner__nav-item_active{{/if}}"> |
633 | 12 | Snappy store | 12 | <a href="/store"> |
634 | 13 | </a> | 13 | Snappy store |
635 | 14 | </div> | 14 | </a> |
636 | 15 | </div> | 15 | </div> |
637 | 16 | <!-- | 16 | </div> |
638 | 17 | <div class="b-banner__search"> | 17 | <!-- |
639 | 18 | <form class="b-banner__form" action="/search" method="GET"> | 18 | <div class="b-banner__search"> |
640 | 19 | <input class="b-banner__input" type="search" name="q" placeholder="Search for snaps" value="{{ query }}"> | 19 | <form class="b-banner__form" action="/search" method="GET"> |
641 | 20 | <div class="b-banner__nav-item{{#if isSearchActive }} b-banner__nav-item_active{{/if}}"> | 20 | <input class="b-banner__input" type="search" name="q" placeholder="Search for snaps" value="{{ query }}"> |
642 | 21 | <button type="submit" class="b-banner__submit"></button> | 21 | <div class="b-banner__nav-item{{#if isSearchActive }} b-banner__nav-item_active{{/if}}"> |
643 | 22 | </div> | 22 | <button type="submit" class="b-banner__submit"></button> |
644 | 23 | </form> | 23 | </div> |
645 | 24 | </div> | 24 | </form> |
646 | 25 | <div class="b-banner__secondary-nav"> | 25 | </div> |
647 | 26 | <div class="b-banner__nav-item{{#if isSystemActive }} b-banner__nav-item_active{{/if}}"> | 26 | <div class="b-banner__secondary-nav"> |
648 | 27 | <a href="/system-settings"> | 27 | <div class="b-banner__nav-item{{#if isSystemActive }} b-banner__nav-item_active{{/if}}"> |
649 | 28 | <img src="/public/images/settings.svg" height="30" width="30"> | 28 | <a href="/system-settings"> |
650 | 29 | </a> | 29 | <img src="/public/images/settings.svg" height="30" width="30"> |
651 | 30 | </div> | 30 | </a> |
652 | 31 | </div> | 31 | </div> |
653 | 32 | --> | 32 | </div> |
654 | 33 | --> | ||
655 | 34 | </div> | ||
656 | 33 | 35 | ||
657 | === modified file 'www/src/js/templates/snap-detail.hbs' | |||
658 | --- www/src/js/templates/snap-detail.hbs 2015-05-04 16:44:28 +0000 | |||
659 | +++ www/src/js/templates/snap-detail.hbs 2015-05-26 10:09:09 +0000 | |||
660 | @@ -1,3 +1,9 @@ | |||
664 | 1 | <div class="b-snap__icon"> | 1 | {{#if description}} |
665 | 2 | <img src="{{ icon }}" width="256" height="256"> | 2 | <p>{{ description }}</p> |
666 | 3 | </div> | 3 | {{/if}} |
667 | 4 | {{#if prettyInstalledSize}} | ||
668 | 5 | <p>Installed size: {{prettyInstalledSize}}</p> | ||
669 | 6 | {{/if}} | ||
670 | 7 | {{#if prettyDownloadSize}} | ||
671 | 8 | <p>Download size: {{prettyDownloadSize}}</p> | ||
672 | 9 | {{/if}} | ||
673 | 4 | 10 | ||
674 | === modified file 'www/src/js/templates/snap-layout.hbs' | |||
675 | --- www/src/js/templates/snap-layout.hbs 2015-05-08 13:11:16 +0000 | |||
676 | +++ www/src/js/templates/snap-layout.hbs 2015-05-26 10:09:09 +0000 | |||
677 | @@ -1,13 +1,18 @@ | |||
688 | 1 | <div class="b-snap__banner"> | 1 | <div class="b-layout__container"> |
689 | 2 | <div class="b-snap__meta"> | 2 | <div class="b-snap__banner"> |
690 | 3 | <h1 class="b-snap__title">{{ name }} {{ version }} {{ binary_filesize }}</h1> | 3 | <div class="b-icon"> |
691 | 4 | <p> | 4 | <img src="{{ icon }}" width="70" height="70"> |
692 | 5 | <span class="b-snap__origin" title="Origin">{{ origin }}</span> | 5 | </div> |
693 | 6 | <span class="b-snap__filesize" title="Package filesize">{{ binary_filesize}}</span> | 6 | <div class="b-snap__meta"> |
694 | 7 | </p> | 7 | <h1 class="b-snap__title">{{ name }} {{ version }} {{ binary_filesize }}</h1> |
695 | 8 | </div> | 8 | <p> |
696 | 9 | <div class="b-snap__actions"> | 9 | <span title="Vendor">{{ vendor }}</span> |
697 | 10 | {{> installer}} | 10 | <span>{{ binary_filesize}}</span> |
698 | 11 | </p> | ||
699 | 12 | </div> | ||
700 | 13 | <div class="b-snap__actions"> | ||
701 | 14 | {{> installer}} | ||
702 | 15 | </div> | ||
703 | 11 | </div> | 16 | </div> |
704 | 12 | </div> | 17 | </div> |
705 | 13 | <div class="region-menu"></div> | 18 | <div class="region-menu"></div> |
706 | 14 | 19 | ||
707 | === modified file 'www/src/js/templates/snap-menu.hbs' | |||
708 | --- www/src/js/templates/snap-menu.hbs 2015-05-02 09:56:14 +0000 | |||
709 | +++ www/src/js/templates/snap-menu.hbs 2015-05-26 10:09:09 +0000 | |||
710 | @@ -1,9 +1,11 @@ | |||
720 | 1 | <a class="b-snap__nav-item" href="details"> | 1 | <div class="b-layout__container"> |
721 | 2 | Details | 2 | <a class="b-snap__nav-item" href="details"> |
722 | 3 | </a> | 3 | Details |
723 | 4 | <a class="b-snap__nav-item" href="reviews"> | 4 | </a> |
724 | 5 | Reviews | 5 | <a class="b-snap__nav-item" href="reviews"> |
725 | 6 | </a> | 6 | Reviews |
726 | 7 | <a class="b-snap__nav-item" href="settings"> | 7 | </a> |
727 | 8 | Settings | 8 | <a class="b-snap__nav-item" href="settings"> |
728 | 9 | </a> | 9 | Settings |
729 | 10 | </a> | ||
730 | 11 | </div> | ||
731 | 10 | 12 | ||
732 | === modified file 'www/src/js/templates/snaplist-item.hbs' | |||
733 | --- www/src/js/templates/snaplist-item.hbs 2015-05-08 13:11:16 +0000 | |||
734 | +++ www/src/js/templates/snaplist-item.hbs 2015-05-26 10:09:09 +0000 | |||
735 | @@ -1,11 +1,12 @@ | |||
738 | 1 | <div class="b-snaplist__icon"> | 1 | <div class="b-icon" data-type="{{type}}"> |
739 | 2 | <img src="{{ icon }}" alt="{{ name }} icon"> | 2 | <img src="{{ icon }}" width="90" height="90"> |
740 | 3 | </div> | 3 | </div> |
741 | 4 | <div class="b-snaplist__name">{{ name }}</div> | 4 | <div class="b-snaplist__name">{{ name }}</div> |
742 | 5 | {{!-- only name is shown in grid view, everything after is hidden --}} | 5 | {{!-- only name is shown in grid view, everything after is hidden --}} |
743 | 6 | <div class="b-snaplist__size" title="Installed file size">{{ prettyInstalledSize }}</div> | ||
744 | 6 | <div class="b-snaplist__version">{{ version }}</div> | 7 | <div class="b-snaplist__version">{{ version }}</div> |
745 | 8 | <div class="b-snaplist__type">{{ type }}</div> | ||
746 | 7 | <div class="b-snaplist__origin">{{ origin }}</div> | 9 | <div class="b-snaplist__origin">{{ origin }}</div> |
747 | 8 | <div class="b-snaplist__type">{{ type }}</div> | ||
748 | 9 | <div class="b-snaplist__actions"> | 10 | <div class="b-snaplist__actions"> |
749 | 10 | {{> installer}} | 11 | {{> installer}} |
750 | 11 | </div> | 12 | </div> |
751 | 12 | 13 | ||
752 | === modified file 'www/src/js/templates/store.hbs' | |||
753 | --- www/src/js/templates/store.hbs 2015-05-02 19:00:37 +0000 | |||
754 | +++ www/src/js/templates/store.hbs 2015-05-26 10:09:09 +0000 | |||
755 | @@ -1,2 +1,1 @@ | |||
756 | 1 | <h1>Store Snaps</h1> | ||
757 | 2 | <div class="region-product"></div> | 1 | <div class="region-product"></div> |
758 | 3 | 2 | ||
759 | === modified file 'www/src/js/views/home.js' | |||
760 | --- www/src/js/views/home.js 2015-04-24 20:47:44 +0000 | |||
761 | +++ www/src/js/views/home.js 2015-05-26 10:09:09 +0000 | |||
762 | @@ -6,6 +6,8 @@ | |||
763 | 6 | 6 | ||
764 | 7 | module.exports = Backbone.Marionette.LayoutView.extend({ | 7 | module.exports = Backbone.Marionette.LayoutView.extend({ |
765 | 8 | 8 | ||
766 | 9 | className: 'b-layout__container', | ||
767 | 10 | |||
768 | 9 | template : function() { | 11 | template : function() { |
769 | 10 | return template(); | 12 | return template(); |
770 | 11 | }, | 13 | }, |
771 | 12 | 14 | ||
772 | === modified file 'www/src/js/views/snap-detail.js' | |||
773 | --- www/src/js/views/snap-detail.js 2015-04-11 15:14:07 +0000 | |||
774 | +++ www/src/js/views/snap-detail.js 2015-05-26 10:09:09 +0000 | |||
775 | @@ -4,6 +4,7 @@ | |||
776 | 4 | var template = require('../templates/snap-detail.hbs'); | 4 | var template = require('../templates/snap-detail.hbs'); |
777 | 5 | 5 | ||
778 | 6 | module.exports = Backbone.Marionette.ItemView.extend({ | 6 | module.exports = Backbone.Marionette.ItemView.extend({ |
779 | 7 | className: 'b-snap__tab-content', | ||
780 | 7 | template: function(model) { | 8 | template: function(model) { |
781 | 8 | return template(model); | 9 | return template(model); |
782 | 9 | }, | 10 | }, |
783 | 10 | 11 | ||
784 | === modified file 'www/src/js/views/snap-reviews.js' | |||
785 | --- www/src/js/views/snap-reviews.js 2015-04-24 23:05:53 +0000 | |||
786 | +++ www/src/js/views/snap-reviews.js 2015-05-26 10:09:09 +0000 | |||
787 | @@ -4,7 +4,7 @@ | |||
788 | 4 | var template = require('../templates/snap-reviews.hbs'); | 4 | var template = require('../templates/snap-reviews.hbs'); |
789 | 5 | 5 | ||
790 | 6 | module.exports = Backbone.Marionette.ItemView.extend({ | 6 | module.exports = Backbone.Marionette.ItemView.extend({ |
792 | 7 | 7 | className: 'b-snap__tab-content', | |
793 | 8 | template: function() { | 8 | template: function() { |
794 | 9 | return template(); | 9 | return template(); |
795 | 10 | } | 10 | } |
796 | 11 | 11 | ||
797 | === modified file 'www/src/js/views/snap-settings.js' | |||
798 | --- www/src/js/views/snap-settings.js 2015-04-11 15:14:07 +0000 | |||
799 | +++ www/src/js/views/snap-settings.js 2015-05-26 10:09:09 +0000 | |||
800 | @@ -4,6 +4,7 @@ | |||
801 | 4 | var template = require('../templates/snap-settings.hbs'); | 4 | var template = require('../templates/snap-settings.hbs'); |
802 | 5 | 5 | ||
803 | 6 | module.exports = Backbone.Marionette.ItemView.extend({ | 6 | module.exports = Backbone.Marionette.ItemView.extend({ |
804 | 7 | className: 'b-snap__tab-content', | ||
805 | 7 | template: function() { | 8 | template: function() { |
806 | 8 | return template(); | 9 | return template(); |
807 | 9 | }, | 10 | }, |
808 | 10 | 11 | ||
809 | === modified file 'www/src/js/views/snaplist-item.js' | |||
810 | --- www/src/js/views/snaplist-item.js 2015-05-08 14:53:07 +0000 | |||
811 | +++ www/src/js/views/snaplist-item.js 2015-05-26 10:09:09 +0000 | |||
812 | @@ -13,7 +13,14 @@ | |||
813 | 13 | 13 | ||
814 | 14 | module.exports = Marionette.ItemView.extend({ | 14 | module.exports = Marionette.ItemView.extend({ |
815 | 15 | 15 | ||
817 | 16 | className: 'b-snaplist__item', | 16 | className: function() { |
818 | 17 | var type = this.model.get('type'); | ||
819 | 18 | var className = 'b-snaplist__item'; | ||
820 | 19 | if (type) { | ||
821 | 20 | className += ' b-snaplist__item-' + type; | ||
822 | 21 | } | ||
823 | 22 | return className; | ||
824 | 23 | }, | ||
825 | 17 | 24 | ||
826 | 18 | template: function(model) { | 25 | template: function(model) { |
827 | 19 | return template(model); | 26 | return template(model); |
828 | 20 | 27 | ||
829 | === modified file 'www/tests/snapItemViewSpec.js' | |||
830 | --- www/tests/snapItemViewSpec.js 2015-05-05 14:40:14 +0000 | |||
831 | +++ www/tests/snapItemViewSpec.js 2015-05-26 10:09:09 +0000 | |||
832 | @@ -1,10 +1,15 @@ | |||
833 | 1 | var Backbone = require('backbone'); | 1 | var Backbone = require('backbone'); |
834 | 2 | var Snap = require('../src/js/models/snap.js'); | ||
835 | 2 | var SnapItemView = require('../src/js/views/snaplist-item.js'); | 3 | var SnapItemView = require('../src/js/views/snaplist-item.js'); |
836 | 3 | 4 | ||
837 | 4 | describe('SnapItemView', function() { | 5 | describe('SnapItemView', function() { |
838 | 5 | 6 | ||
839 | 6 | beforeEach(function() { | 7 | beforeEach(function() { |
841 | 7 | this.view = new SnapItemView(); | 8 | this.view = new SnapItemView({ |
842 | 9 | model: new Snap({ | ||
843 | 10 | id: 'foo' | ||
844 | 11 | }) | ||
845 | 12 | }); | ||
846 | 8 | }); | 13 | }); |
847 | 9 | 14 | ||
848 | 10 | afterEach(function() { | 15 | afterEach(function() { |
849 | @@ -16,4 +21,11 @@ | |||
850 | 16 | expect(this.view).toEqual(jasmine.any(Backbone.View)); | 21 | expect(this.view).toEqual(jasmine.any(Backbone.View)); |
851 | 17 | }); | 22 | }); |
852 | 18 | 23 | ||
853 | 24 | it('should have a b-snaplist className with type modifier when present in model', function() { | ||
854 | 25 | this.view.model.unset('type'); | ||
855 | 26 | expect(this.view.className()).toBe('b-snaplist__item'); | ||
856 | 27 | this.view.model.set('type', 'foo'); | ||
857 | 28 | expect(this.view.className()).toBe('b-snaplist__item b-snaplist__item-foo'); | ||
858 | 29 | }); | ||
859 | 30 | |||
860 | 19 | }); | 31 | }); |