@myissue/vue-website-page-builder 3.2.86 → 3.2.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -3
- package/dist/vue-website-page-builder.css +1 -1
- package/dist/vue-website-page-builder.js +9217 -9022
- package/dist/vue-website-page-builder.umd.cjs +38 -38
- package/package.json +2 -2
- package/src/Components/Homepage/Footer.vue +9 -7
- package/src/Components/Homepage/Navbar.vue +6 -4
- package/src/Components/Layouts/FullWidthElement.vue +6 -6
- package/src/Components/Modals/BuilderComponents.vue +12 -6
- package/src/Components/Modals/DynamicModalBuilder.vue +39 -47
- package/src/Components/Modals/MediaLibraryModal.vue +2 -2
- package/src/Components/Modals/ModalBuilder.vue +23 -19
- package/src/Components/PageBuilder/DefaultComponents/DefaultBuilderComponents.vue +29 -17
- package/src/Components/PageBuilder/DefaultComponents/DefaultMediaLibraryComponent.vue +2 -2
- package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +22 -20
- package/src/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue +17 -17
- package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +28 -26
- package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +13 -11
- package/src/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue +5 -5
- package/src/Components/PageBuilder/EditorMenu/Editables/DeleteElement.vue +4 -4
- package/src/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue +22 -19
- package/src/Components/PageBuilder/EditorMenu/Editables/ElementEditor.vue +11 -11
- package/src/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue +4 -4
- package/src/Components/PageBuilder/EditorMenu/Editables/LinkEditor.vue +74 -66
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue +26 -21
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue +26 -21
- package/src/Components/PageBuilder/EditorMenu/Editables/Margin.vue +101 -0
- package/src/Components/PageBuilder/EditorMenu/Editables/OpacityEditor.vue +2 -3
- package/src/Components/PageBuilder/EditorMenu/Editables/{PaddingPlusMargin.vue → Padding.vue} +8 -41
- package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +22 -20
- package/src/Components/PageBuilder/EditorMenu/Editables/Typography.vue +63 -58
- package/src/Components/PageBuilder/EditorMenu/EditorAccordion.vue +7 -4
- package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +24 -19
- package/src/Components/PageBuilder/Settings/AdvancedPageBuilderSettings.vue +132 -98
- package/src/Components/PageBuilder/Settings/PageBuilderSettings.vue +216 -146
- package/src/Components/PageBuilder/ToolbarOption/ToolbarOption.vue +14 -14
- package/src/Components/TipTap/TipTap.vue +4 -4
- package/src/Components/TipTap/TipTapInput.vue +39 -33
- package/src/DemoComponents/DemoBuilderComponents.vue +1 -1
- package/src/DemoComponents/DemoUnsplash.vue +79 -56
- package/src/DemoComponents/HomeSection.vue +20 -16
- package/src/PageBuilder/PageBuilder.vue +62 -57
- package/src/PageBuilder/Preview.vue +4 -20
- package/src/composables/PageBuilderClass.ts +66 -120
- package/src/css/app.css +161 -448
- package/src/css/dev-global.css +137 -0
- package/src/main.ts +1 -0
- package/src/tailwind-safelist.html +1 -1
- package/src/utils/builder/tailwaind-colors.ts +488 -488
- package/src/utils/builder/tailwind-border-radius.ts +40 -40
- package/src/utils/builder/tailwind-border-style-width-color.ts +231 -231
- package/src/utils/builder/tailwind-font-sizes.ts +56 -57
- package/src/utils/builder/tailwind-font-styles.ts +44 -11
- package/src/utils/builder/tailwind-opacities.ts +30 -30
- package/src/utils/builder/tailwind-padding-margin.ts +136 -136
- package/dist/components.json +0 -36
- package/src/Components/Loaders/FullScreenSpinner.vue +0 -9
- package/src/Components/Loaders/SmallUniversalSpinner.vue +0 -26
|
@@ -100,11 +100,11 @@ const openHTMLSettings = function () {
|
|
|
100
100
|
<template>
|
|
101
101
|
<div>
|
|
102
102
|
<div
|
|
103
|
-
class="flex gap-2 items-center myPrimaryParagraph font-medium text-xs py-1 px-2 rounded-full lg:border lg:border-gray-200 lg:shadow-sm lg:mr-10"
|
|
103
|
+
class="pbx-flex pbx-gap-2 pbx-items-center pbx-myPrimaryParagraph pbx-font-medium pbx-text-xs pbx-py-1 pbx-px-2 pbx-rounded-full lg:pbx-border lg:pbx-border-gray-200 lg:pbx-shadow-sm lg:pbx-mr-10"
|
|
104
104
|
>
|
|
105
105
|
<!-- User No image Start-->
|
|
106
106
|
<div
|
|
107
|
-
class="flex items-center myPrimaryTag py-0"
|
|
107
|
+
class="pbx-flex pbx-items-center pbx-myPrimaryTag pbx-py-0"
|
|
108
108
|
v-if="
|
|
109
109
|
getConfigPageBuilder &&
|
|
110
110
|
getConfigPageBuilder.userForPageBuilder &&
|
|
@@ -115,14 +115,14 @@ const openHTMLSettings = function () {
|
|
|
115
115
|
"
|
|
116
116
|
>
|
|
117
117
|
<div
|
|
118
|
-
class="text-white rounded-full bg-myPrimaryBrandColor flex justify-center items-center text-xs h-8 min-h-8 max-h-8 w-8 min-w-8 max-w-8 font-normal"
|
|
118
|
+
class="pbx-text-white pbx-rounded-full pbx-bg-myPrimaryBrandColor pbx-flex pbx-justify-center pbx-items-center pbx-text-xs pbx-h-8 pbx-min-h-8 pbx-max-h-8 pbx-w-8 pbx-min-w-8 pbx-max-w-8 pbx-font-normal"
|
|
119
119
|
>
|
|
120
120
|
{{
|
|
121
121
|
typeof getConfigPageBuilder.userForPageBuilder.name === 'string' &&
|
|
122
122
|
getConfigPageBuilder.userForPageBuilder.name[0]
|
|
123
123
|
}}
|
|
124
124
|
</div>
|
|
125
|
-
<div class="hidden text-xs h-8 lg:flex items-center font-normal">
|
|
125
|
+
<div class="pbx-hidden pbx-text-xs pbx-h-8 lg:pbx-flex pbx-items-center pbx-font-normal">
|
|
126
126
|
{{ getConfigPageBuilder.userForPageBuilder.name }}
|
|
127
127
|
</div>
|
|
128
128
|
</div>
|
|
@@ -131,7 +131,7 @@ const openHTMLSettings = function () {
|
|
|
131
131
|
|
|
132
132
|
<!-- User With image Start-->
|
|
133
133
|
<div
|
|
134
|
-
class="flex items-center lg:myPrimaryTag py-0 gap-4 w-max"
|
|
134
|
+
class="pbx-flex pbx-items-center lg:pbx-myPrimaryTag pbx-py-0 pbx-gap-4 pbx-w-max"
|
|
135
135
|
v-if="
|
|
136
136
|
getConfigPageBuilder &&
|
|
137
137
|
getConfigPageBuilder.userForPageBuilder &&
|
|
@@ -142,15 +142,15 @@ const openHTMLSettings = function () {
|
|
|
142
142
|
"
|
|
143
143
|
>
|
|
144
144
|
<div
|
|
145
|
-
class="text-white flex-shrink-0 h-8 w-8 rounded-full flex justify-center items-center text-xs rounded-l-full"
|
|
145
|
+
class="pbx-text-white pbx-flex-shrink-0 pbx-h-8 pbx-w-8 pbx-rounded-full pbx-flex pbx-justify-center pbx-items-center pbx-text-xs pbx-rounded-l-full"
|
|
146
146
|
>
|
|
147
147
|
<img
|
|
148
148
|
alt="avatar"
|
|
149
149
|
:src="`${getConfigPageBuilder.userForPageBuilder.image}`"
|
|
150
|
-
class="block inset-0 object-top h-8 min-h-8 max-h-8 w-8 min-w-8 max-w-8 object-cover rounded-full"
|
|
150
|
+
class="pbx-block pbx-inset-0 pbx-object-top pbx-h-8 pbx-min-h-8 pbx-max-h-8 pbx-w-8 pbx-min-w-8 pbx-max-w-8 pbx-object-cover pbx-rounded-full"
|
|
151
151
|
/>
|
|
152
152
|
</div>
|
|
153
|
-
<div class="hidden text-xs h-8 lg:flex items-center font-normal">
|
|
153
|
+
<div class="pbx-hidden pbx-text-xs pbx-h-8 lg:pbx-flex pbx-items-center pbx-font-normal">
|
|
154
154
|
{{ getConfigPageBuilder.userForPageBuilder.name }}
|
|
155
155
|
</div>
|
|
156
156
|
</div>
|
|
@@ -159,15 +159,15 @@ const openHTMLSettings = function () {
|
|
|
159
159
|
|
|
160
160
|
<div>
|
|
161
161
|
<!-- Component Start -->
|
|
162
|
-
<div class="relative group">
|
|
162
|
+
<div class="pbx-relative pbx-group">
|
|
163
163
|
<button
|
|
164
164
|
type="button"
|
|
165
|
-
class="cursor-pointer lg:flex myPrimaryTag font-normal w-max text-xs"
|
|
165
|
+
class="pbx-cursor-pointer lg:pbx-flex pbx-myPrimaryTag pbx-font-normal pbx-w-max pbx-text-xs"
|
|
166
166
|
>
|
|
167
167
|
<span> Options </span>
|
|
168
168
|
</button>
|
|
169
169
|
<div
|
|
170
|
-
class="absolute left-0 -ml-16 -mt-2 flex flex-col gap-3 shadow-lg bg-white w-max border border-gray-100 rounded-2xl transition-all duration-200 ease-out pt-4 pr-4 pb-4 pl-2 z-30 opacity-0 pointer-events-none -translate-y-2 group-hover:opacity-100 group-hover:pointer-events-auto group-hover:translate-y-0"
|
|
170
|
+
class="pbx-absolute pbx-left-0 -pbx-ml-16 -pbx-mt-2 pbx-flex pbx-flex-col pbx-gap-3 pbx-shadow-lg pbx-bg-white pbx-w-max pbx-border pbx-border-gray-100 pbx-rounded-2xl pbx-transition-all pbx-duration-200 pbx-ease-out pbx-pt-4 pbx-pr-4 pbx-pb-4 pbx-pl-2 pbx-z-30 pbx-opacity-0 pbx-pointer-events-none pbx-translate-y-2 group-hover:pbx-opacity-100 group-hover:pbx-pointer-events-auto group-hover:pbx-translate-y-0"
|
|
171
171
|
>
|
|
172
172
|
<!-- Main Settings Start -->
|
|
173
173
|
<button
|
|
@@ -177,7 +177,7 @@ const openHTMLSettings = function () {
|
|
|
177
177
|
openMainSettings()
|
|
178
178
|
}
|
|
179
179
|
"
|
|
180
|
-
class="cursor-pointer lg:flex myPrimaryTag font-normal w-max border-none m-0"
|
|
180
|
+
class="pbx-cursor-pointer lg:pbx-flex pbx-myPrimaryTag pbx-font-normal pbx-w-max pbx-border-none pbx-m-0"
|
|
181
181
|
type="button"
|
|
182
182
|
>
|
|
183
183
|
Config Overview
|
|
@@ -187,7 +187,7 @@ const openHTMLSettings = function () {
|
|
|
187
187
|
<!-- HTML Settings Start -->
|
|
188
188
|
<button
|
|
189
189
|
@click="openHTMLSettings"
|
|
190
|
-
class="cursor-pointer lg:flex myPrimaryTag font-normal w-max border-none m-0"
|
|
190
|
+
class="pbx-cursor-pointer lg:pbx-flex pbx-myPrimaryTag pbx-font-normal pbx-w-max pbx-border-none pbx-m-0"
|
|
191
191
|
type="button"
|
|
192
192
|
>
|
|
193
193
|
HTML Overview
|
|
@@ -202,7 +202,7 @@ const openHTMLSettings = function () {
|
|
|
202
202
|
deleteAllComponents()
|
|
203
203
|
}
|
|
204
204
|
"
|
|
205
|
-
class="cursor-pointer lg:flex myPrimaryTag font-normal w-max border-none m-0 bg-myPrimaryErrorColor text-white"
|
|
205
|
+
class="pbx-cursor-pointer lg:pbx-flex pbx-myPrimaryTag pbx-font-normal pbx-w-max pbx-border-none pbx-m-0 pbx-bg-myPrimaryErrorColor pbx-text-white"
|
|
206
206
|
type="button"
|
|
207
207
|
>
|
|
208
208
|
Delete Layout
|
|
@@ -10,14 +10,14 @@ const pageBuilderClass = new PageBuilderClass(pageBuilderStateStore)
|
|
|
10
10
|
|
|
11
11
|
<template>
|
|
12
12
|
<div>
|
|
13
|
-
<div class="blockease-linear duration-200 block ease-linear">
|
|
13
|
+
<div class="pbx-blockease-linear pbx-duration-200 pbx-block pbx-ease-linear">
|
|
14
14
|
<template v-if="pageBuilderClass.isSelectedElementValidText()">
|
|
15
|
-
<div class="flex items-center justify-center mb-6">
|
|
16
|
-
<div class="px-2 flex items-center justify-start gap-2 w-max">
|
|
15
|
+
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-mb-6">
|
|
16
|
+
<div class="pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
17
17
|
<button
|
|
18
18
|
@click="pageBuilderClass.toggleTipTapModal(true)"
|
|
19
19
|
type="button"
|
|
20
|
-
class="myPrimaryTag"
|
|
20
|
+
class="pbx-myPrimaryTag"
|
|
21
21
|
>
|
|
22
22
|
<span class="material-symbols-outlined"> edit </span>
|
|
23
23
|
<span>Edit text and links</span>
|
|
@@ -195,11 +195,19 @@ onMounted(() => {
|
|
|
195
195
|
>
|
|
196
196
|
<header></header>
|
|
197
197
|
<main>
|
|
198
|
-
<div class="myInputGroup">
|
|
199
|
-
<label class="myPrimaryInputLabel" for="roles"><span>Enter URL</span></label
|
|
200
|
-
><input
|
|
201
|
-
|
|
202
|
-
|
|
198
|
+
<div class="pbx-myInputGroup">
|
|
199
|
+
<label class="pbx-myPrimaryInputLabel" for="roles"><span>Enter URL</span></label
|
|
200
|
+
><input
|
|
201
|
+
v-model="urlEnteret"
|
|
202
|
+
class="pbx-myPrimaryInput pbx-mt-1"
|
|
203
|
+
type="url"
|
|
204
|
+
placeholder="url"
|
|
205
|
+
/>
|
|
206
|
+
<div
|
|
207
|
+
v-if="urlError"
|
|
208
|
+
class="pbx-min-h-[2.5rem] pbx-flex pbx-items-center pbx-justify-start"
|
|
209
|
+
>
|
|
210
|
+
<p class="pbx-myPrimaryInputError pbx-mt-2 pbx-mb-0 pbx-py-0 pbx-self-start">
|
|
203
211
|
{{ urlError }}
|
|
204
212
|
</p>
|
|
205
213
|
</div>
|
|
@@ -207,21 +215,21 @@ onMounted(() => {
|
|
|
207
215
|
</main>
|
|
208
216
|
</DynamicModalBuilder>
|
|
209
217
|
|
|
210
|
-
<div class="blockease-linear duration-200 block ease-linear">
|
|
218
|
+
<div class="pbx-blockease-linear pbx-duration-200 pbx-block pbx-ease-linear">
|
|
211
219
|
<div v-if="pageBuilderClass.isSelectedElementValidText() && editor">
|
|
212
|
-
<div class="relative rounded-lg">
|
|
220
|
+
<div class="pbx-relative pbx-rounded-lg">
|
|
213
221
|
<div
|
|
214
|
-
class="flex justify-between myPrimaryGap items-center py-4 px-4 overflow-x-auto border-b border-gray-200"
|
|
222
|
+
class="pbx-flex pbx-justify-between pbx-myPrimaryGap pbx-items-center pbx-py-4 pbx-px-4 pbx-overflow-x-auto pbx-border-b pbx-border-gray-200"
|
|
215
223
|
>
|
|
216
224
|
<div>
|
|
217
225
|
<div>
|
|
218
226
|
<div
|
|
219
|
-
class="px-2 flex items-center justify-start gap-2 w-max p-1 rounded-full border border-gray-200 shadow-sm"
|
|
227
|
+
class="pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max pbx-p-1 pbx-rounded-full pbx-border pbx-border-gray-200 pbx-shadow-sm"
|
|
220
228
|
>
|
|
221
229
|
<button
|
|
222
230
|
@click="pageBuilderClass.toggleTipTapModal(false)"
|
|
223
231
|
type="button"
|
|
224
|
-
class="myPrimaryTag"
|
|
232
|
+
class="pbx-myPrimaryTag"
|
|
225
233
|
>
|
|
226
234
|
<span class="material-symbols-outlined"> Save </span>
|
|
227
235
|
<span>Save</span>
|
|
@@ -229,53 +237,51 @@ onMounted(() => {
|
|
|
229
237
|
</div>
|
|
230
238
|
</div>
|
|
231
239
|
</div>
|
|
232
|
-
<div
|
|
233
|
-
|
|
240
|
+
<div
|
|
241
|
+
class="pbx-flex pbx-items-center pbx-p-1 pbx-rounded-full pbx-border pbx-border-gray-200 pbx-shadow-sm"
|
|
242
|
+
>
|
|
243
|
+
<div class="pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
234
244
|
<button
|
|
235
245
|
@click="editor.chain().focus().setHardBreak().run()"
|
|
236
246
|
type="button"
|
|
237
|
-
class="myPrimaryTag"
|
|
247
|
+
class="pbx-myPrimaryTag"
|
|
238
248
|
>
|
|
239
249
|
<span class="material-symbols-outlined"> keyboard_return </span>
|
|
240
250
|
<span>Line break</span>
|
|
241
251
|
</button>
|
|
242
252
|
</div>
|
|
243
253
|
|
|
244
|
-
<div class="px-2 flex items-center justify-start gap-2 w-max">
|
|
254
|
+
<div class="pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
245
255
|
<button
|
|
246
256
|
@click="editor.chain().focus().toggleBold().run()"
|
|
247
257
|
type="button"
|
|
248
|
-
class="myPrimaryTag"
|
|
249
|
-
:class="{
|
|
250
|
-
'bg-myPrimaryLinkColor text-white': editor.isActive('bold'),
|
|
251
|
-
}"
|
|
258
|
+
class="pbx-myPrimaryTag"
|
|
259
|
+
:class="{ 'pbx-bg-myPrimaryLinkColor pbx-text-white': editor.isActive('bold') }"
|
|
252
260
|
>
|
|
253
261
|
<span class="material-symbols-outlined"> format_bold </span>
|
|
254
262
|
<span>Bold</span>
|
|
255
263
|
</button>
|
|
256
264
|
</div>
|
|
257
265
|
|
|
258
|
-
<div class="px-2 flex items-center justify-start gap-2 w-max">
|
|
266
|
+
<div class="pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
259
267
|
<button
|
|
260
268
|
@click="handleURL"
|
|
261
269
|
type="button"
|
|
262
|
-
class="myPrimaryTag"
|
|
263
|
-
:class="{
|
|
264
|
-
'bg-myPrimaryLinkColor text-white': editor.isActive('link'),
|
|
265
|
-
}"
|
|
270
|
+
class="pbx-myPrimaryTag"
|
|
271
|
+
:class="{ 'pbx-bg-myPrimaryLinkColor pbx-text-white': editor.isActive('link') }"
|
|
266
272
|
>
|
|
267
273
|
<span class="material-symbols-outlined"> link </span>
|
|
268
274
|
<span>Link</span>
|
|
269
275
|
</button>
|
|
270
276
|
</div>
|
|
271
277
|
|
|
272
|
-
<div class="px-2 flex items-center justify-start gap-2 w-max">
|
|
278
|
+
<div class="pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
273
279
|
<button
|
|
274
280
|
@click="editor.chain().focus().toggleHeading({ level: 2 }).run()"
|
|
275
281
|
type="button"
|
|
276
|
-
class="myPrimaryTag"
|
|
282
|
+
class="pbx-myPrimaryTag"
|
|
277
283
|
:class="{
|
|
278
|
-
'bg-myPrimaryLinkColor text-white': editor.isActive('heading', {
|
|
284
|
+
'pbx-bg-myPrimaryLinkColor pbx-text-white': editor.isActive('heading', {
|
|
279
285
|
level: 2,
|
|
280
286
|
}),
|
|
281
287
|
}"
|
|
@@ -285,13 +291,13 @@ onMounted(() => {
|
|
|
285
291
|
</button>
|
|
286
292
|
</div>
|
|
287
293
|
|
|
288
|
-
<div class="px-2 flex items-center justify-start gap-2 w-max">
|
|
294
|
+
<div class="pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
289
295
|
<button
|
|
290
296
|
@click="editor.chain().focus().toggleHeading({ level: 3 }).run()"
|
|
291
297
|
type="button"
|
|
292
|
-
class="myPrimaryTag"
|
|
298
|
+
class="pbx-myPrimaryTag"
|
|
293
299
|
:class="{
|
|
294
|
-
'bg-myPrimaryLinkColor text-white': editor.isActive('heading', {
|
|
300
|
+
'pbx-bg-myPrimaryLinkColor pbx-text-white': editor.isActive('heading', {
|
|
295
301
|
level: 3,
|
|
296
302
|
}),
|
|
297
303
|
}"
|
|
@@ -301,13 +307,13 @@ onMounted(() => {
|
|
|
301
307
|
</button>
|
|
302
308
|
</div>
|
|
303
309
|
|
|
304
|
-
<div class="px-2 flex items-center justify-start gap-2 w-max">
|
|
310
|
+
<div class="pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max">
|
|
305
311
|
<button
|
|
306
312
|
@click="editor.chain().focus().toggleBulletList().run()"
|
|
307
313
|
type="button"
|
|
308
|
-
class="myPrimaryTag"
|
|
314
|
+
class="pbx-myPrimaryTag"
|
|
309
315
|
:class="{
|
|
310
|
-
'bg-myPrimaryLinkColor text-white': editor.isActive('bulletList'),
|
|
316
|
+
'pbx-bg-myPrimaryLinkColor pbx-text-white': editor.isActive('bulletList'),
|
|
311
317
|
}"
|
|
312
318
|
>
|
|
313
319
|
<span class="material-symbols-outlined"> list </span>
|
|
@@ -320,7 +326,7 @@ onMounted(() => {
|
|
|
320
326
|
<editor-content
|
|
321
327
|
id="page-builder-editor"
|
|
322
328
|
:editor="editor"
|
|
323
|
-
class="p-2 prounded-lg lg:min-h-[20rem] lg:max-h-[30rem] md:min-h-[20rem] md:max-h-[20rem] min-h-[20rem] max-h-[20rem] overflow-y-auto"
|
|
329
|
+
class="pbx-p-2 pbx-prounded-lg lg:pbx-min-h-[20rem] lg:pbx-max-h-[30rem] md:pbx-min-h-[20rem] md:pbx-max-h-[20rem] pbx-min-h-[20rem] pbx-max-h-[20rem] pbx-overflow-y-auto"
|
|
324
330
|
/>
|
|
325
331
|
</div>
|
|
326
332
|
</div>
|
|
@@ -42,7 +42,7 @@ const fetchUnsplash = async function () {
|
|
|
42
42
|
|
|
43
43
|
try {
|
|
44
44
|
const response = await fetch(
|
|
45
|
-
`https://api.unsplash.com/search/photos?page=${getCurrentPageNumber.value}&per_page=24&query=${getSearchTerm.value || '
|
|
45
|
+
`https://api.unsplash.com/search/photos?page=${getCurrentPageNumber.value}&per_page=24&query=${getSearchTerm.value || 'kinfolk'}${orientationParam}`,
|
|
46
46
|
{
|
|
47
47
|
headers: {
|
|
48
48
|
'Accept-Version': 'v1',
|
|
@@ -112,7 +112,7 @@ const applySelectedImage = async function (imageURL) {
|
|
|
112
112
|
|
|
113
113
|
// on mounted
|
|
114
114
|
onMounted(async () => {
|
|
115
|
-
getSearchTerm.value = localStorage.getItem('unsplash-query') || '
|
|
115
|
+
getSearchTerm.value = localStorage.getItem('unsplash-query') || 'kinfolk'
|
|
116
116
|
getCurrentPageNumber.value = Number(localStorage.getItem('unsplash-page')) || 1
|
|
117
117
|
|
|
118
118
|
await fetchUnsplash()
|
|
@@ -132,20 +132,22 @@ onMounted(async () => {
|
|
|
132
132
|
>
|
|
133
133
|
<label
|
|
134
134
|
for="default-search"
|
|
135
|
-
class="mb-2 text-sm font-normal text-gray-900 sr-only dark:text-gray-300"
|
|
135
|
+
class="pbx-mb-2 pbx-text-sm pbx-font-normal pbx-text-gray-900 pbx-sr-only dark:pbx-text-gray-300"
|
|
136
136
|
>Search</label
|
|
137
137
|
>
|
|
138
138
|
|
|
139
|
-
<div class="mysearchBarWithOptions">
|
|
140
|
-
<div class="relative w-full">
|
|
141
|
-
<div
|
|
139
|
+
<div class="pbx-mysearchBarWithOptions">
|
|
140
|
+
<div class="pbx-relative pbx-w-full">
|
|
141
|
+
<div
|
|
142
|
+
class="pbx-flex pbx-absolute pbx-inset-y-0 pbx-left-0 pbx-items-center pbx-pl-3 pbx-pointer-events-none"
|
|
143
|
+
>
|
|
142
144
|
<span class="material-symbols-outlined"> search </span>
|
|
143
145
|
</div>
|
|
144
146
|
<input
|
|
145
147
|
type="search"
|
|
146
148
|
id="search_query"
|
|
147
149
|
v-model="getSearchTerm"
|
|
148
|
-
class="myPrimarySearchInput"
|
|
150
|
+
class="pbx-myPrimarySearchInput"
|
|
149
151
|
autocomplete="off"
|
|
150
152
|
placeholder="Search..."
|
|
151
153
|
/>
|
|
@@ -159,24 +161,24 @@ onMounted(async () => {
|
|
|
159
161
|
}
|
|
160
162
|
"
|
|
161
163
|
type="submit"
|
|
162
|
-
class="myPrimaryTag break-keep mr-4"
|
|
164
|
+
class="pbx-myPrimaryTag pbx-break-keep pbx-mr-4"
|
|
163
165
|
>
|
|
164
166
|
Search
|
|
165
167
|
</button>
|
|
166
168
|
</div>
|
|
167
169
|
</form>
|
|
168
|
-
<div class="mt-2">
|
|
170
|
+
<div class="pbx-mt-2">
|
|
169
171
|
<div
|
|
170
172
|
v-if="getUnsplashImages && getUnsplashImages.results"
|
|
171
|
-
class="flex lg:justify-between justify-end items-center gap-2 py-2 px-2 mb-1 rounded-full border border-gray-200 shadow-sm"
|
|
173
|
+
class="pbx-flex lg:pbx-justify-between pbx-justify-end pbx-items-center pbx-gap-2 pbx-py-2 pbx-px-2 pbx-mb-1 pbx-rounded-full pbx-border pbx-border-gray-200 pbx-shadow-sm"
|
|
172
174
|
>
|
|
173
|
-
<div class="lg:flex hidden justify-left items-center gap-2">
|
|
175
|
+
<div class="lg:pbx-flex pbx-hidden pbx-justify-left pbx-items-center pbx-gap-2">
|
|
174
176
|
<button
|
|
175
177
|
@click="searchByOrientation('landscape')"
|
|
176
178
|
type="button"
|
|
177
|
-
class="myPrimaryTag"
|
|
179
|
+
class="pbx-myPrimaryTag"
|
|
178
180
|
:class="{
|
|
179
|
-
'bg-myPrimaryBrandColor text-white': getOrientationValue === 'landscape',
|
|
181
|
+
'pbx-bg-myPrimaryBrandColor pbx-text-white': getOrientationValue === 'landscape',
|
|
180
182
|
'': getOrientationValue !== 'landscape',
|
|
181
183
|
}"
|
|
182
184
|
>
|
|
@@ -185,9 +187,9 @@ onMounted(async () => {
|
|
|
185
187
|
<button
|
|
186
188
|
@click="searchByOrientation('portrait')"
|
|
187
189
|
type="button"
|
|
188
|
-
class="myPrimaryTag"
|
|
190
|
+
class="pbx-myPrimaryTag"
|
|
189
191
|
:class="{
|
|
190
|
-
'bg-myPrimaryBrandColor text-white': getOrientationValue === 'portrait',
|
|
192
|
+
'pbx-bg-myPrimaryBrandColor pbx-text-white': getOrientationValue === 'portrait',
|
|
191
193
|
'': getOrientationValue !== 'portrait',
|
|
192
194
|
}"
|
|
193
195
|
>
|
|
@@ -196,9 +198,9 @@ onMounted(async () => {
|
|
|
196
198
|
<button
|
|
197
199
|
@click="searchByOrientation('squarish')"
|
|
198
200
|
type="button"
|
|
199
|
-
class="myPrimaryTag"
|
|
201
|
+
class="pbx-myPrimaryTag"
|
|
200
202
|
:class="{
|
|
201
|
-
'bg-myPrimaryBrandColor text-white': getOrientationValue === 'squarish',
|
|
203
|
+
'pbx-bg-myPrimaryBrandColor pbx-text-white': getOrientationValue === 'squarish',
|
|
202
204
|
'': getOrientationValue !== 'squarish',
|
|
203
205
|
}"
|
|
204
206
|
>
|
|
@@ -212,21 +214,28 @@ onMounted(async () => {
|
|
|
212
214
|
viewBox="0 0 24 24"
|
|
213
215
|
stroke-width="2"
|
|
214
216
|
stroke="currentColor"
|
|
215
|
-
class="w-4 h-4 cursor-pointer"
|
|
217
|
+
class="pbx-w-4 pbx-h-4 pbx-cursor-pointer"
|
|
216
218
|
>
|
|
217
219
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
218
220
|
</svg>
|
|
219
221
|
</div>
|
|
220
222
|
|
|
221
|
-
<nav
|
|
222
|
-
|
|
223
|
+
<nav
|
|
224
|
+
class="pbx-flex pbx-items-center pbx-gap-2 pbx-justify-start"
|
|
225
|
+
aria-label="Pagination"
|
|
226
|
+
>
|
|
227
|
+
<p class="pbx-myPrimaryParagraph pbx-text-xs pbx-italic">
|
|
223
228
|
Total pages {{ getUnsplashImages.total_pages }}
|
|
224
229
|
</p>
|
|
225
|
-
<p class="myPrimaryParagraph text-xs italic">
|
|
226
|
-
|
|
230
|
+
<p class="pbx-myPrimaryParagraph pbx-text-xs pbx-italic">
|
|
231
|
+
Images {{ getUnsplashImages.total }}
|
|
232
|
+
</p>
|
|
233
|
+
<div
|
|
234
|
+
class="pbx-flex pbx-flex-1 pbx-justify-between sm:pbx-justify-end pbx-items-center pbx-gap-2"
|
|
235
|
+
>
|
|
227
236
|
<span
|
|
228
237
|
v-if="Number(getCurrentPageNumber) !== 1"
|
|
229
|
-
class="myPrimaryParagraph text-xs italic pr-2 pl-1 cursor-pointer underline"
|
|
238
|
+
class="pbx-myPrimaryParagraph pbx-text-xs pbx-italic pbx-pr-2 pbx-pl-1 pbx-cursor-pointer pbx-underline"
|
|
230
239
|
@click="nextPage(Number((getCurrentPageNumber = 1)))"
|
|
231
240
|
>
|
|
232
241
|
First page
|
|
@@ -235,7 +244,7 @@ onMounted(async () => {
|
|
|
235
244
|
<button
|
|
236
245
|
v-if="Number(getCurrentPageNumber) > 1"
|
|
237
246
|
:disabled="Number(getCurrentPageNumber) < 1"
|
|
238
|
-
class="myPrimaryTag"
|
|
247
|
+
class="pbx-myPrimaryTag"
|
|
239
248
|
@click="previousPage(Number(getCurrentPageNumber--))"
|
|
240
249
|
>
|
|
241
250
|
{{
|
|
@@ -243,14 +252,14 @@ onMounted(async () => {
|
|
|
243
252
|
}}
|
|
244
253
|
</button>
|
|
245
254
|
|
|
246
|
-
<span class="myPrimaryTag py-2.5 px-4">
|
|
255
|
+
<span class="pbx-myPrimaryTag py-2.5 pbx-px-4">
|
|
247
256
|
{{ Number(getCurrentPageNumber) }}
|
|
248
257
|
</span>
|
|
249
258
|
<button
|
|
250
259
|
:disabled="Number(getCurrentPageNumber) >= getUnsplashImages.total_pages"
|
|
251
|
-
class="myPrimaryTag"
|
|
260
|
+
class="pbx-myPrimaryTag"
|
|
252
261
|
:class="{
|
|
253
|
-
'opacity-50': Number(getCurrentPageNumber) >= getUnsplashImages.total_pages,
|
|
262
|
+
'pbx-opacity-50': Number(getCurrentPageNumber) >= getUnsplashImages.total_pages,
|
|
254
263
|
}"
|
|
255
264
|
@click="nextPage(Number(getCurrentPageNumber++))"
|
|
256
265
|
>
|
|
@@ -261,15 +270,15 @@ onMounted(async () => {
|
|
|
261
270
|
</nav>
|
|
262
271
|
</div>
|
|
263
272
|
|
|
264
|
-
<div class="min-h-[33rem] max-h-[33rem] flex gap-6">
|
|
265
|
-
<div class="w-9/12 pr-1 rounded-lg overflow-y-auto">
|
|
273
|
+
<div class="pbx-min-h-[33rem] pbx-max-h-[33rem] pbx-flex pbx-gap-6">
|
|
274
|
+
<div class="pbx-w-9/12 pbx-pr-1 pbx-rounded-lg pbx-overflow-y-auto">
|
|
266
275
|
<div v-if="getIsLoading">
|
|
267
|
-
<div class="flex items-center justify-center mt-4">
|
|
276
|
+
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-mt-4">
|
|
268
277
|
<div
|
|
269
|
-
class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"
|
|
278
|
+
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
270
279
|
>
|
|
271
280
|
<span
|
|
272
|
-
class="!absolute
|
|
281
|
+
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
273
282
|
>Loading...</span
|
|
274
283
|
>
|
|
275
284
|
</div>
|
|
@@ -278,20 +287,20 @@ onMounted(async () => {
|
|
|
278
287
|
<div v-if="getUnsplashImages && getUnsplashImages.results">
|
|
279
288
|
<div
|
|
280
289
|
v-if="!getIsLoading"
|
|
281
|
-
class="grid md:grid-cols-4 sm:grid-cols-4 grid-cols-2 gap-2"
|
|
290
|
+
class="pbx-grid md:pbx-grid-cols-4 sm:pbx-grid-cols-4 pbx-grid-cols-2 pbx-gap-2"
|
|
282
291
|
>
|
|
283
292
|
<div
|
|
284
293
|
v-for="image in getUnsplashImages.results"
|
|
285
294
|
:key="image.id"
|
|
286
295
|
@click="handleImageClick({ url: image.urls.regular, user: image.user.name })"
|
|
287
|
-
class="border border-gray-200 my-2 px-2 p-2 cursor-pointer"
|
|
296
|
+
class="pbx-border pbx-border-gray-200 pbx-my-2 pbx-px-2 pbx-p-2 pbx-cursor-pointer"
|
|
288
297
|
>
|
|
289
298
|
<img
|
|
290
299
|
:alt="image.user.name"
|
|
291
|
-
class="group block w-full overflow-hidden cursor-pointer"
|
|
300
|
+
class="pbx-group pbx-block pbx-w-full pbx-overflow-hidden pbx-cursor-pointer"
|
|
292
301
|
:src="image.urls.thumb"
|
|
293
302
|
/>
|
|
294
|
-
<p class="myPrimaryParagraph text-xs font-normal mt-2">
|
|
303
|
+
<p class="pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-mt-2">
|
|
295
304
|
By: {{ image.user.name }}
|
|
296
305
|
</p>
|
|
297
306
|
</div>
|
|
@@ -305,25 +314,29 @@ onMounted(async () => {
|
|
|
305
314
|
getUnsplashImages.results.length < 1
|
|
306
315
|
"
|
|
307
316
|
>
|
|
308
|
-
<p class="myPrimaryParagraph py-4 px-4">
|
|
317
|
+
<p class="pbx-myPrimaryParagraph pbx-py-4 pbx-px-4">
|
|
309
318
|
<span v-if="getCurrentPageNumber === 1">
|
|
310
319
|
We did not find any images. Make a new search.
|
|
311
320
|
</span>
|
|
312
|
-
<span
|
|
321
|
+
<span
|
|
322
|
+
v-if="getCurrentPageNumber > 1"
|
|
323
|
+
@click="nextPage(1)"
|
|
324
|
+
class="pbx-myPrimaryLink"
|
|
325
|
+
>
|
|
313
326
|
No results on current page. Navigate to First Page.
|
|
314
327
|
</span>
|
|
315
328
|
</p>
|
|
316
329
|
</div>
|
|
317
330
|
</div>
|
|
318
331
|
<!-- Sidebar # start -->
|
|
319
|
-
<aside class="w-3/12 overflow-y-auto">
|
|
332
|
+
<aside class="pbx-w-3/12 pbx-overflow-y-auto">
|
|
320
333
|
<template v-if="getIsLoadingImage">
|
|
321
|
-
<div class="flex items-center justify-center mt-4">
|
|
334
|
+
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-mt-4">
|
|
322
335
|
<div
|
|
323
|
-
class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"
|
|
336
|
+
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
324
337
|
>
|
|
325
338
|
<span
|
|
326
|
-
class="!absolute
|
|
339
|
+
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
327
340
|
>Loading...</span
|
|
328
341
|
>
|
|
329
342
|
</div>
|
|
@@ -331,21 +344,29 @@ onMounted(async () => {
|
|
|
331
344
|
</template>
|
|
332
345
|
<template v-if="getCurrentImage && !getIsLoadingImage">
|
|
333
346
|
<img
|
|
334
|
-
class="mx-auto block w-full object-cover object-center cursor-pointer"
|
|
347
|
+
class="pbx-mx-auto pbx-block pbx-w-full pbx-object-cover pbx-object-center pbx-cursor-pointer"
|
|
335
348
|
:src="`${getCurrentImage}`"
|
|
336
349
|
alt="file"
|
|
337
350
|
/>
|
|
338
|
-
<div class="md:px-3 px-2">
|
|
351
|
+
<div class="md:pbx-px-3 pbx-px-2">
|
|
339
352
|
<div>
|
|
340
|
-
<p class="myPrimaryParagraph font-normal text-gray-900 pt-4">
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
353
|
+
<p class="pbx-myPrimaryParagraph pbx-font-normal pbx-text-gray-900 pbx-pt-4">
|
|
354
|
+
Information
|
|
355
|
+
</p>
|
|
356
|
+
<dl
|
|
357
|
+
class="pbx-mt-2 pbx-border-t pbx-border-b pbx-border-gray-200 pbx-divide-y pbx-divide-gray-200"
|
|
358
|
+
>
|
|
359
|
+
<div
|
|
360
|
+
class="pbx-py-3 pbx-flex pbx-justify-between pbx-text-sm pbx-font-normal pbx-items-center"
|
|
361
|
+
>
|
|
362
|
+
<dt class="pbx-text-gray-500">From:</dt>
|
|
363
|
+
<dd class="pbx-text-gray-900">Unsplash</dd>
|
|
345
364
|
</div>
|
|
346
|
-
<div
|
|
347
|
-
|
|
348
|
-
|
|
365
|
+
<div
|
|
366
|
+
class="pbx-py-3 pbx-flex pbx-justify-between pbx-text-sm pbx-font-normal pbx-items-center"
|
|
367
|
+
>
|
|
368
|
+
<dt class="pbx-text-gray-500">By:</dt>
|
|
369
|
+
<dd class="pbx-text-gray-900">{{ getCurrentUser }}</dd>
|
|
349
370
|
</div>
|
|
350
371
|
</dl>
|
|
351
372
|
</div>
|
|
@@ -356,7 +377,9 @@ onMounted(async () => {
|
|
|
356
377
|
<!-- Sidebar # end -->
|
|
357
378
|
|
|
358
379
|
<!-- Actions footer # start -->
|
|
359
|
-
<div
|
|
380
|
+
<div
|
|
381
|
+
class="pbx-px-4 pbx-py-3 pbx-flex pbx-gap-2 pbx-border-t pbx-border-gray-200 pbx-mt-4 pbx-justify-end"
|
|
382
|
+
>
|
|
360
383
|
<button
|
|
361
384
|
@click="
|
|
362
385
|
() => {
|
|
@@ -364,7 +387,7 @@ onMounted(async () => {
|
|
|
364
387
|
localStorage.setItem('unsplash-page', getCurrentPageNumber)
|
|
365
388
|
}
|
|
366
389
|
"
|
|
367
|
-
class="mySecondaryButton"
|
|
390
|
+
class="pbx-mySecondaryButton"
|
|
368
391
|
type="button"
|
|
369
392
|
>
|
|
370
393
|
Close
|
|
@@ -372,7 +395,7 @@ onMounted(async () => {
|
|
|
372
395
|
<button
|
|
373
396
|
v-if="getCurrentImage && typeof getCurrentImage === 'string'"
|
|
374
397
|
@click="applySelectedImage(getCurrentImage)"
|
|
375
|
-
class="myPrimaryButton"
|
|
398
|
+
class="pbx-myPrimaryButton"
|
|
376
399
|
type="button"
|
|
377
400
|
>
|
|
378
401
|
Select image
|
|
@@ -382,7 +405,7 @@ onMounted(async () => {
|
|
|
382
405
|
</div>
|
|
383
406
|
</div>
|
|
384
407
|
<div>
|
|
385
|
-
<button class="sr-only">Focusable fallback</button>
|
|
408
|
+
<button class="pbx-sr-only">Focusable fallback</button>
|
|
386
409
|
</div>
|
|
387
410
|
</div>
|
|
388
411
|
</template>
|