-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathgoogle-photos.vue
More file actions
356 lines (322 loc) · 9.2 KB
/
Copy pathgoogle-photos.vue
File metadata and controls
356 lines (322 loc) · 9.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<template>
<q-layout view="lHh Lpr fff" class="bg-grey-1">
<q-header elevated class="bg-white text-grey-8" height-hint="64">
<q-toolbar class="GPL__toolbar" style="height: 64px">
<q-btn
flat
dense
round
@click="toggleLeftDrawer"
aria-label="Menu"
icon="menu"
class="q-mx-md"
/>
<q-toolbar-title
v-if="$q.screen.gt.sm"
shrink
class="row items-center no-wrap"
>
<img
src="https://cdn.quasar.dev/img/layout-gallery/logo-google.svg"
/>
<span class="q-ml-sm">Photos</span>
</q-toolbar-title>
<q-space />
<q-input
class="GPL__toolbar-input"
dense
standout="bg-primary"
v-model="search"
placeholder="Search"
>
<template v-slot:prepend>
<q-icon v-if="search === ''" name="search" />
<q-icon
v-else
name="clear"
class="cursor-pointer"
@click="search = ''"
/>
</template>
</q-input>
<q-btn
v-if="$q.screen.gt.xs"
flat
dense
no-wrap
color="primary"
icon="add"
no-caps
label="Create"
class="q-ml-sm q-px-md"
>
<q-menu anchor="top end" self="top end">
<q-list class="text-grey-8" style="min-width: 100px">
<q-item aria-hidden="true">
<q-item-section
class="text-uppercase text-grey-7"
style="font-size: 0.7rem"
>Create New</q-item-section
>
</q-item>
<q-item
v-for="menu in createMenu"
:key="menu.text"
clickable
v-close-popup
aria-hidden="true"
>
<q-item-section avatar>
<q-icon :name="menu.icon" />
</q-item-section>
<q-item-section>{{ menu.text }}</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
<q-btn
v-if="$q.screen.gt.xs"
flat
dense
no-wrap
color="primary"
icon="cloud_upload"
no-caps
label="Upload"
class="q-ml-sm q-px-md"
/>
<q-space />
<div class="q-gutter-sm row items-center no-wrap">
<q-btn round dense flat color="text-grey-7" icon="apps">
<q-tooltip>Google Apps</q-tooltip>
</q-btn>
<q-btn round dense flat color="grey-8" icon="notifications">
<q-badge color="red" text-color="white" floating> 2 </q-badge>
<q-tooltip>Notifications</q-tooltip>
</q-btn>
<q-btn round flat>
<q-avatar size="26px">
<img src="https://cdn.quasar.dev/img/boy-avatar.png" />
</q-avatar>
<q-tooltip>Account</q-tooltip>
</q-btn>
</div>
</q-toolbar>
</q-header>
<q-drawer
v-model="leftDrawerOpen"
bordered
behavior="mobile"
@click="leftDrawerOpen = false"
>
<q-scroll-area class="fit">
<q-toolbar class="GPL__toolbar">
<q-toolbar-title class="row items-center text-grey-8">
<img
class="q-pl-md"
src="https://www.gstatic.com/images/branding/googlelogo/svg/googlelogo_clr_74x24px.svg"
/>
<span class="q-ml-sm">Photos</span>
</q-toolbar-title>
</q-toolbar>
<q-list padding>
<q-item
v-for="link in links1"
:key="link.text"
clickable
class="GPL__drawer-item"
>
<q-item-section avatar>
<q-icon :name="link.icon" />
</q-item-section>
<q-item-section>
<q-item-label>{{ link.text }}</q-item-label>
</q-item-section>
</q-item>
<q-separator class="q-my-md" />
<q-item
v-for="link in links2"
:key="link.text"
clickable
class="GPL__drawer-item"
>
<q-item-section avatar>
<q-icon :name="link.icon" />
</q-item-section>
<q-item-section>
<q-item-label>{{ link.text }}</q-item-label>
</q-item-section>
</q-item>
<q-separator class="q-my-md" />
<q-item
v-for="link in links3"
:key="link.text"
clickable
class="GPL__drawer-item"
>
<q-item-section avatar>
<q-icon :name="link.icon" />
</q-item-section>
<q-item-section>
<q-item-label>{{ link.text }}</q-item-label>
</q-item-section>
</q-item>
<q-separator class="q-my-md" />
<q-item clickable class="GPL__drawer-item GPL__drawer-item--storage">
<q-item-section avatar>
<q-icon name="cloud" />
</q-item-section>
<q-item-section top>
<q-item-label>Storage</q-item-label>
<q-linear-progress :value="storage" class="q-my-sm" />
<q-item-label caption>2.6 GB of 15 GB</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-scroll-area>
</q-drawer>
<q-page-container class="GPL__page-container">
<router-view />
<q-page-sticky v-if="$q.screen.gt.sm" expand position="left">
<div class="fit q-pt-xl q-px-sm column">
<q-btn
round
flat
color="grey-8"
stack
no-caps
size="26px"
class="GPL__side-btn"
>
<q-icon size="22px" name="photo" />
<div class="GPL__side-btn__label">Photos</div>
</q-btn>
<q-btn
round
flat
color="grey-8"
stack
no-caps
size="26px"
class="GPL__side-btn"
>
<q-icon size="22px" name="collections_bookmark" />
<div class="GPL__side-btn__label">Albums</div>
</q-btn>
<q-btn
round
flat
color="grey-8"
stack
no-caps
size="26px"
class="GPL__side-btn"
>
<q-icon size="22px" name="assistant" />
<div class="GPL__side-btn__label">Assistant</div>
<q-badge
floating
color="red"
text-color="white"
style="top: 8px; right: 16px"
>
1
</q-badge>
</q-btn>
<q-btn
round
flat
color="grey-8"
stack
no-caps
size="26px"
class="GPL__side-btn"
>
<q-icon size="22px" name="group" />
<div class="GPL__side-btn__label">Sharing</div>
</q-btn>
<q-btn
round
flat
color="grey-8"
stack
no-caps
size="26px"
class="GPL__side-btn"
>
<q-icon size="22px" name="import_contacts" />
<div class="GPL__side-btn__label">Photo books</div>
</q-btn>
</div>
</q-page-sticky>
</q-page-container>
</q-layout>
</template>
<script setup>
import { ref } from 'vue'
const leftDrawerOpen = ref(false)
const search = ref('')
const storage = ref(0.26)
const links1 = [
{ icon: 'photo', text: 'Photos' },
{ icon: 'photo_album', text: 'Albums' },
{ icon: 'assistant', text: 'Assistant' },
{ icon: 'people', text: 'Sharing' },
{ icon: 'book', text: 'Photo books' }
]
const links2 = [
{ icon: 'archive', text: 'Archive' },
{ icon: 'delete', text: 'Trash' }
]
const links3 = [
{ icon: 'settings', text: 'Settings' },
{ icon: 'help', text: 'Help & Feedback' },
{ icon: 'get_app', text: 'App Downloads' }
]
const createMenu = [
{ icon: 'photo_album', text: 'Album' },
{ icon: 'people', text: 'Shared Album' },
{ icon: 'movie', text: 'Movie' },
{ icon: 'library_books', text: 'Animation' },
{ icon: 'dashboard', text: 'Collage' },
{ icon: 'book', text: 'Photo book' }
]
function toggleLeftDrawer() {
leftDrawerOpen.value = !leftDrawerOpen.value
}
</script>
<style lang="sass">
.GPL
&__toolbar
height: 64px
&__toolbar-input
width: 35%
&__drawer-item
line-height: 24px
border-radius: 0 24px 24px 0
margin-right: 12px
.q-item__section--avatar
padding-left: 12px
.q-icon
color: #5f6368
.q-item__label:not(.q-item__label--caption)
color: #3c4043
letter-spacing: .01785714em
font-size: .875rem
font-weight: 500
line-height: 1.25rem
&--storage
border-radius: 0
margin-right: 0
padding-top: 24px
padding-bottom: 24px
&__side-btn
&__label
font-size: 12px
line-height: 24px
letter-spacing: .01785714em
font-weight: 500
@media (min-width: 1024px)
&__page-container
padding-left: 94px
</style>