@edgedev/create-edge-app 1.1.27 → 1.1.28

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.
@@ -1,24 +1,116 @@
1
- <footer id="global-footer" class="bg-neutral-900 text-white">
2
- <div class="mx-auto max-w-7xl px-6 py-12"> <!-- Top: Brand / Map / Contact -->
3
- <div class="grid gap-10 md:grid-cols-3"> <!-- Brand / Title -->
4
- <div class="text-center md:text-left">
5
- <h6 class="text-lg font-semibold tracking-wide">{{{#text {"field":"name","value":""}}}}</h6>
6
- <p class="mt-2 whitespace-pre-line text-sm text-neutral-300"> {{{#text {"field":"title","value":""}}}} </p>
7
- </div> <!-- Map -->
8
- <div> </div> <!-- Contact -->
9
- <div class="text-center md:text-left">
10
- <h6 class="text-lg font-semibold tracking-wide">Contact Us</h6>
11
- <div class="mt-2 space-y-2 text-sm">
12
- <p> Phone: <a class="font-normal hover:opacity-90 underline underline-offset-4" href="tel:2025502730"
13
- aria-label="Call (202) 550-2730"> {{{#text {"field":"phone","value":""}}}} </a> </p>
14
- <p> Office: <a class="font-normal hover:opacity-90 underline underline-offset-4" href="tel:6154755616"
15
- aria-label="Call (615) 475-5616"> {{{#text {"field":"officeNumber","value":""}}}} </a> </p>
16
- <div>
17
- <div class="text-neutral-300">{{{#text {"field":"streetAddress","value":""}}}}</div>
18
- <div class="text-neutral-300">{{{#text {"field":"city","value":"","title":"City, State & Zip"}}}}</div>
19
- </div>
1
+ <footer id="global-footer" class="bg-footerBg text-white h-[344px] overflow-hidden">
2
+ <div class="mx-auto px-1 sm:px-[100px] py-12 h-full w-full"> <!-- Top: Brand / Map / Contact -->
3
+ <div class="grid gap-10 md:grid-cols-2 h-full w-full">
4
+ {{{#array {"field":"agent","schema":[{"field":"contactEmail","value":"text"}],"collection":{"path":"users","uniqueKey":"{orgId}"},"queryOptions":[{"field":"userId","title":"Agent","optionsKey":"name","optionsValue":"userId","options":"users"}],"limit":1,"value":[]}}}}
5
+ <div class="text-center md:text-left relative h-full">
6
+ <div class="flex justify-center md:justify-start gap-4 mb-8">
7
+ <img
8
+ src="{{{#image {"field":"logo","value":"","tags":["Logos"]}}}}"
9
+ class="h-10 object-contain"
10
+ />
11
+ <span class="h-10 w-px bg-white opacity-80"></span>
12
+ <img
13
+ src="{{{#image {"field":"brandLogo","value":"","tags":["Logos"]}}}}"
14
+ class="h-8 object-contain"
15
+ />
20
16
  </div>
17
+ Phone: {{item.contactPhone}} <br />
18
+ Email: {{item.contactEmail}}
19
+ <img src="https://imagedelivery.net/h7EjKG0X9kOxmLp41mxOng/clearwater-hub-nSyJmnm6i2xLMPQ1PCX2-images-JyO9Jv7e5H6TghMPhq8W-watermark.png/public" class="absolute -bottom-14 -left-26" />
21
20
  </div>
21
+ <div class="flex w-full justify-center md:justify-right gap-1">
22
+ {{{#if {"cond":"item.socialFacebook"}}}}
23
+ <a
24
+ href="{{ item.socialFacebook }}"
25
+ target="_blank"
26
+ class="flex h-8 w-8 items-center justify-center bg-white rounded-full"
27
+ >
28
+ <svg
29
+ xmlns="http://www.w3.org/2000/svg"
30
+ viewBox="0 0 320 512"
31
+ class="h-4 w-4"
32
+ >
33
+ <path d="M80 299.3V512H196V299.3h86.5l18-97.8H196V166.9c0-51.7 20.3-71.5 72.7-71.5c16.3 0 29.4 .4 37 1.2V7.9C291.4 4 256.4 0 236.2 0C129.3 0 80 50.5 80 159.4v42.1H14v97.8H80z"/>
34
+ </svg>
35
+ </a>
36
+ {{{/if}}}
37
+ {{{#if {"cond":"item.socialInstagram"}}}}
38
+ <a
39
+ href="{{ item.socialInstagram }}"
40
+ target="_blank"
41
+ class="flex h-8 w-8 items-center justify-center bg-white rounded-full"
42
+ >
43
+ <svg
44
+ xmlns="http://www.w3.org/2000/svg"
45
+ viewBox="0 0 448 512"
46
+ class="h-4 w-4"
47
+ >
48
+ <path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"/>
49
+ </svg>
50
+ </a>
51
+ {{{/if}}}
52
+ {{{#if {"cond":"item.socialTwitter"}}}}
53
+ <a
54
+ href="{{ item.socialTwitter }}"
55
+ target="_blank"
56
+ class="flex h-8 w-8 items-center justify-center bg-white rounded-full"
57
+ >
58
+ <svg
59
+ xmlns="http://www.w3.org/2000/svg"
60
+ viewBox="0 0 300 400"
61
+ class="h-5 w-5"
62
+ >
63
+ <path d="M279.14 288l14.22-16.53L319.08 240h-72.7l-39.5-46.2 93.9-109.2h-74.3l-59.4 69.1-54.5-69.1H0l99.8 116.3L0 320h74.3l64.3-74.8L198.5 320h120.7l-40.1-32zM164.6 213.6l-10.5-12.6-83.7-100.4h33.8l67.6 81.2 10.5 12.6 87.8 105.5h-33.8l-71.7-86.1z"/>
64
+ </svg>
65
+ </a>
66
+ {{{/if}}}
67
+ {{{#if {"cond":"item.socialLinkedIn"}}}}
68
+ <a
69
+ href="{{ item.socialLinkedIn }}"
70
+ target="_blank"
71
+ class="flex h-8 w-8 items-center justify-center bg-white rounded-full"
72
+ >
73
+ <svg
74
+ xmlns="http://www.w3.org/2000/svg"
75
+ viewBox="0 0 448 512"
76
+ class="h-4 w-4"
77
+ >
78
+ <path d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"/>
79
+ </svg>
80
+ </a>
81
+ {{{/if}}}
82
+ {{{#if {"cond":"item.socialYouTube"}}}}
83
+ <a
84
+ href="{{ item.socialYouTube }}"
85
+ target="_blank"
86
+ class="flex h-8 w-8 items-center justify-center bg-white rounded-full"
87
+ >
88
+ <svg
89
+ xmlns="http://www.w3.org/2000/svg"
90
+ viewBox="0 0 576 512"
91
+ class="h-4 w-4"
92
+ >
93
+ <path d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"/>
94
+ </svg>
95
+ </a>
96
+ {{{/if}}}
97
+ {{{#if {"cond":"item.socialTikTok"}}}}
98
+ <a
99
+ href="{{ item.socialTikTok }}"
100
+ target="_blank"
101
+ class="flex h-8 w-8 items-center justify-center bg-white rounded-full"
102
+ >
103
+ <svg
104
+ xmlns="http://www.w3.org/2000/svg"
105
+ viewBox="0 0 448 512"
106
+ class="h-4 w-4"
107
+ >
108
+ <path d="M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z"/>
109
+ </svg>
110
+ </a>
111
+ {{{/if}}}
112
+ </div>
113
+ {{{/array}}}
22
114
  </div>
23
115
  </div>
24
116
  </footer>
@@ -0,0 +1,8 @@
1
+ <div class="w-full md:1/2 p-4">
2
+ <img
3
+ src="{{{#image {"field":"backgroundImage","value":"https://imagedelivery.net/h7EjKG0X9kOxmLp41mxOng/clearwater-hub-nSyJmnm6i2xLMPQ1PCX2-images-EdDjIxZYYcqeGMqk1ZDt-AdobeStock_New_Second.jpg/public"}}}}"
4
+ loading="lazy"
5
+ class="w-full h-auto"
6
+ alt="{{{#text {"field":"altTag","validation":{"required":true,"min":1},"value":""}}}}"
7
+ />
8
+ </div>
@@ -1,7 +1,8 @@
1
1
  <div class="pa-8 bg-white font-sans">
2
- {{{#array {"field":"list","schema":[{"field":"name","value":"text"},{"field":"content","value":"richtext"}],"collection":{"path":"post","query":[{"field":"doc_created_at","operator":">","value":0}],"order":[{"field":"doc_created_at","direction":"desc"}]},"queryOptions":[],"limit":1,"value":[]}}}}
2
+ {{{#array
3
+ {"field":"list","schema":[{"field":"name","value":"text"},{"field":"content","value":"richtext"}],"collection":{"path":"posts","uniqueKey":"{orgId}:{siteId}","query":[],"order":[]},"queryOptions":[],"limit":1,"value":[]}}}}
3
4
  <h1 class="text-sm">
4
5
  {{item.content}}
5
6
  </h1>
6
- {{{/array}}}
7
+ {{{/array}}}
7
8
  </div>
@@ -1,8 +1,9 @@
1
- {{{#array {"field":"list","schema":[{"field":"name","value":"text"}],"collection":{"path":"post","query":[{"field":"doc_created_at","operator":">","value":0}],"order":[{"field":"doc_created_at","direction":"desc"}]},"queryOptions":[],"limit":1,"value":[]}}}}
2
- <section
3
- class="relative h-[50dvh] min-h-[260px] w-full bg-cover bg-center"
4
- style="background-image: url('{{item.featuredImage}}')"
5
- >
1
+ <div class="relative h-[20dvh] md:h-[30dvh] w-full bg-cover bg-center {{{#text {"
2
+ field":"backgroundColor","option":{"optionsKey":"title","optionsValue":"value","options":[{"title":"Brand","value":"bg-brand"},{"title":"Primary","value":"bg-primary"},{"title":"Secondary","value":"bg-secondary"},{"title":"White","value":"bg-white"},{"title":"Transparent","value":"bg-transparent"}]},"value":"bg-primary"}}}}">
3
+ {{{#array
4
+ {"field":"list","schema":[{"field":"name","value":"text"}],"collection":{"path":"posts","uniqueKey":"{orgId}:{siteId}","query":[],"order":[]},"queryOptions":[],"limit":1,"value":[]}}}}
5
+ <section class="relativeh-[20dvh] md:h-[30dvh] w-full bg-cover bg-center"
6
+ style="background-image: url('{{item.featuredImage}}')">
6
7
  <!-- Dark overlay -->
7
8
  <div class="absolute inset-0 bg-black/40"></div>
8
9
 
@@ -18,4 +19,5 @@
18
19
  <!-- Optional vignette -->
19
20
  <div class="pointer-events-none absolute inset-0 bg-gradient-to-b from-black/20 via-transparent to-black/30"></div>
20
21
  </section>
21
- {{{/array}}}
22
+ {{{/array}}}
23
+ </div>
@@ -1,20 +1,21 @@
1
1
  <div class="p-8 bg-gray-50 font-sans">
2
2
  <div class="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
3
- {{{#array {"field":"list","schema":[{"field":"name","value":"text"},{"field":"content","value":"richtext"}],"collection":{"path":"posts","query":[{"field":"doc_created_at","operator":">","value":0}],"order":[{"field":"doc_created_at","direction":"desc"}]},"queryOptions":[{"field":"tags","operator":"array-contains-any","options":[]}],"limit":10,"value":[]}}}}
4
-
5
- <div class="bg-white rounded-2xl shadow-sm hover:shadow-md transition-shadow duration-200 overflow-hidden flex flex-col">
3
+ {{{#array
4
+ {"field":"list","schema":[{"field":"name","value":"text"},{"field":"content","value":"richtext"}],"collection":{"path":"posts","uniqueKey":"{orgId}:{siteId}","query":[{"field":"doc_created_at","operator":">","value":0}],"order":[{"field":"doc_created_at","direction":"desc"}]},"queryOptions":[{"field":"tags","operator":"array-contains-any","options":[]}],"limit":10,"value":[]}}}}
5
+ <div
6
+ class="bg-white rounded-2xl shadow-sm hover:shadow-md transition-shadow duration-200 overflow-hidden flex flex-col">
6
7
  <img src="{{item.featuredImage}}" alt="{{item.title}}" class="h-48 w-full object-cover" />
7
8
  <div class="p-5 flex flex-col flex-1">
8
9
  <h2 class="text-lg font-semibold text-gray-800 mb-2 line-clamp-2">{{ item.title }}</h2>
9
10
  <div class="text-gray-600 text-sm flex-1 mb-4 line-clamp-3">
10
11
  {{ item.blurb }}
11
12
  </div>
12
- <a href="/posts/{{item.name}}" class="inline-block mt-auto self-start text-sm font-medium text-blue-600 hover:text-blue-800 transition-colors duration-150">
13
+ <a href="{{item.name}}"
14
+ class="inline-block mt-auto self-start text-sm font-medium text-blue-600 hover:text-blue-800 transition-colors duration-150">
13
15
  Read More →
14
16
  </a>
15
17
  </div>
16
18
  </div>
17
-
18
19
  {{{/array}}}
19
20
  </div>
20
21
  </div>
@@ -55,13 +55,24 @@ const timeAgo = (timestamp) => {
55
55
  return `${minutes} minute${minutes > 1 ? 's' : ''} ago`
56
56
  return `${seconds} second${seconds > 1 ? 's' : ''} ago`
57
57
  }
58
+
59
+ const isLightName = (name) => {
60
+ if (!name)
61
+ return false
62
+ return String(name).toLowerCase().includes('light')
63
+ }
64
+
65
+ const previewBackgroundClass = computed(() => {
66
+ const displayName = props.item?.name
67
+ return isLightName(displayName) ? 'bg-neutral-900/90' : 'bg-neutral-100'
68
+ })
58
69
  </script>
59
70
 
60
71
  <template>
61
72
  <Card
62
73
  class="w-full group overflow-hidden rounded-2xl border bg-card hover:shadow-md hover:border-muted-foreground/20 transition-all"
63
74
  >
64
- <div class="relative w-full h-[200px] bg-muted">
75
+ <div class="relative w-full h-[200px] flex items-center justify-center" :class="previewBackgroundClass">
65
76
  <div class="z-10 absolute w-full flex inset-0 bg-black/10 dark:bg-black/30 justify-between items-start p-2">
66
77
  <edge-shad-button
67
78
  v-if="!props.selectMode"
@@ -90,7 +101,7 @@ const timeAgo = (timestamp) => {
90
101
  v-else
91
102
  :src="edgeGlobal.getImage(item, 'thumbnail')"
92
103
  alt=""
93
- class="absolute inset-0 h-full w-full object-cover transition-transform duration-200 group-hover:scale-[1.02]"
104
+ class="max-h-full max-w-full h-auto w-auto object-contain transition-transform duration-200 group-hover:scale-[1.02]"
94
105
  >
95
106
  </div>
96
107
 
@@ -158,6 +158,14 @@ const itemClick = (item) => {
158
158
  state.workingDoc = item
159
159
  }
160
160
  }
161
+
162
+ const isLightName = (name) => {
163
+ if (!name)
164
+ return false
165
+ return String(name).toLowerCase().includes('light')
166
+ }
167
+
168
+ const previewBackgroundClass = computed(() => (isLightName(state.workingDoc?.name) ? 'bg-neutral-900/90' : 'bg-neutral-100'))
161
169
  </script>
162
170
 
163
171
  <template>
@@ -305,7 +313,7 @@ const itemClick = (item) => {
305
313
  </div>
306
314
  </template>
307
315
  <template #list="slotProps">
308
- <div class=" mx-auto px-0 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
316
+ <div class="mx-auto px-0 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
309
317
  <div v-for="item in slotProps.filtered" :key="item.docId" class="w-full cursor-pointer" @click="itemClick(item)">
310
318
  <edge-cms-media-card
311
319
  :item="item"
@@ -325,7 +333,13 @@ const itemClick = (item) => {
325
333
  <SheetHeader>
326
334
  <SheetTitle>{{ state.workingDoc?.fileName }}</SheetTitle>
327
335
  <SheetDescription>
328
- <img :src="edgeGlobal.getImage(state.workingDoc, 'public')" alt="" class="h-[450px] m-auto object-fit rounded-lg mb-4">
336
+ <div class="h-[450px] rounded-lg mb-4 flex items-center justify-center overflow-hidden" :class="previewBackgroundClass">
337
+ <img
338
+ :src="edgeGlobal.getImage(state.workingDoc, 'public')"
339
+ alt=""
340
+ class="max-h-full max-w-full h-auto w-auto object-contain"
341
+ >
342
+ </div>
329
343
  Original Name: <span class="font-semibold">{{ state.workingDoc?.fileName }}</span>, Size: <span class="font-semibold">{{ (state.workingDoc?.fileSize / 1024).toFixed(2) }} KB</span>
330
344
  </SheetDescription>
331
345
  </SheetHeader>