Repository navigation
Expand file tree
/
Copy pathyoutube.vue
More file actions
268 lines (243 loc) · 7.07 KB
/
Copy pathyoutube.vue
File metadata and controls
268 lines (243 loc) · 7.07 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
<template>
<q-layout view="hHh lpR fFf" class="bg-grey-1">
<q-header elevated class="bg-white text-grey-8 q-py-xs" height-hint="58">
<q-toolbar>
<q-btn
flat
dense
round
@click="toggleLeftDrawer"
aria-label="Menu"
icon="menu"
/>
<q-btn flat no-caps no-wrap class="q-ml-xs" v-if="$q.screen.gt.xs">
<q-icon :name="fabYoutube" color="red" size="28px" />
<q-toolbar-title shrink class="text-weight-bold">
YouTube
</q-toolbar-title>
</q-btn>
<q-space />
<div class="YL__toolbar-input-container row no-wrap">
<q-input
dense
outlined
square
v-model="search"
placeholder="Search"
aria-label="Search"
class="bg-white col"
/>
<q-btn
class="YL__toolbar-input-btn"
color="grey-3"
text-color="grey-8"
icon="search"
unelevated
aria-label="Search"
/>
</div>
<q-space />
<div class="q-gutter-sm row items-center no-wrap">
<q-btn
round
dense
flat
color="grey-8"
icon="video_call"
v-if="$q.screen.gt.sm"
aria-label="Create a video or post"
>
<q-tooltip>Create a video or post</q-tooltip>
</q-btn>
<q-btn
round
dense
flat
color="grey-8"
icon="apps"
v-if="$q.screen.gt.sm"
aria-label="Apps"
>
<q-tooltip>Apps</q-tooltip>
</q-btn>
<q-btn
round
dense
flat
color="grey-8"
icon="message"
v-if="$q.screen.gt.sm"
aria-label="Messages"
>
<q-tooltip>Messages</q-tooltip>
</q-btn>
<q-btn
round
dense
flat
color="grey-8"
icon="notifications"
aria-label="Notifications"
>
<q-badge color="red" text-color="white" floating> 2 </q-badge>
<q-tooltip>Notifications</q-tooltip>
</q-btn>
<q-btn round flat aria-label="Account">
<q-avatar size="26px">
<img
src="https://cdn.quasar.dev/img/boy-avatar.png"
alt="User avatar"
/>
</q-avatar>
<q-tooltip>Account</q-tooltip>
</q-btn>
</div>
</q-toolbar>
</q-header>
<q-drawer
v-model="leftDrawerOpen"
show-if-above
bordered
class="bg-grey-2"
:width="240"
>
<q-scroll-area class="fit">
<q-list padding>
<q-item v-for="link in links1" :key="link.text" v-ripple clickable>
<q-item-section avatar>
<q-icon color="grey" :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" v-ripple clickable>
<q-item-section avatar>
<q-icon color="grey" :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-mt-md q-mb-xs" />
<q-item-label header class="text-weight-bold text-uppercase">
More from Youtube
</q-item-label>
<q-item v-for="link in links3" :key="link.text" v-ripple clickable>
<q-item-section avatar>
<q-icon color="grey" :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 links4" :key="link.text" v-ripple clickable>
<q-item-section avatar>
<q-icon color="grey" :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-mt-md q-mb-lg" />
<div class="q-px-md text-grey-9">
<div class="row items-center q-gutter-x-sm q-gutter-y-xs">
<a
v-for="button in buttons1"
:key="button.text"
class="YL__drawer-footer-link"
href="javascript:void(0)"
>
{{ button.text }}
</a>
</div>
</div>
<div class="q-py-md q-px-md text-grey-9">
<div class="row items-center q-gutter-x-sm q-gutter-y-xs">
<a
v-for="button in buttons2"
:key="button.text"
class="YL__drawer-footer-link"
href="javascript:void(0)"
>
{{ button.text }}
</a>
</div>
</div>
</q-list>
</q-scroll-area>
</q-drawer>
<q-page-container>
<router-view />
</q-page-container>
</q-layout>
</template>
<script setup>
import { ref } from 'vue'
import { fabYoutube } from '@quasar/extras/fontawesome-v7'
const leftDrawerOpen = ref(false)
const search = ref('')
const links1 = [
{ icon: 'home', text: 'Home' },
{ icon: 'whatshot', text: 'Trending' },
{ icon: 'subscriptions', text: 'Subscriptions' }
]
const links2 = [
{ icon: 'folder', text: 'Library' },
{ icon: 'restore', text: 'History' },
{ icon: 'watch_later', text: 'Watch later' },
{ icon: 'thumb_up_alt', text: 'Liked videos' }
]
const links3 = [
{ icon: fabYoutube, text: 'YouTube Premium' },
{ icon: 'local_movies', text: 'Movies & Shows' },
{ icon: 'videogame_asset', text: 'Gaming' },
{ icon: 'live_tv', text: 'Live' }
]
const links4 = [
{ icon: 'settings', text: 'Settings' },
{ icon: 'flag', text: 'Report history' },
{ icon: 'help', text: 'Help' },
{ icon: 'feedback', text: 'Send feedback' }
]
const buttons1 = [
{ text: 'About' },
{ text: 'Press' },
{ text: 'Copyright' },
{ text: 'Contact us' },
{ text: 'Creators' },
{ text: 'Advertise' },
{ text: 'Developers' }
]
const buttons2 = [
{ text: 'Terms' },
{ text: 'Privacy' },
{ text: 'Policy & Safety' },
{ text: 'Test new features' }
]
function toggleLeftDrawer() {
leftDrawerOpen.value = !leftDrawerOpen.value
}
</script>
<style lang="sass">
.YL
&__toolbar-input-container
min-width: 100px
width: 55%
&__toolbar-input-btn
border-radius: 0
border-style: solid
border-width: 1px 1px 1px 0
border-color: rgba(0,0,0,.24)
max-width: 60px
width: 100%
&__drawer-footer-link
color: inherit
text-decoration: none
font-weight: 500
font-size: .75rem
&:hover
color: #000
</style>