@fy-/fws-vue 2.0.24 → 2.0.26

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.
@@ -10,6 +10,10 @@ defineProps({
10
10
  type: String,
11
11
  default: "blog",
12
12
  },
13
+ imageDomain: {
14
+ type: String,
15
+ default: "https://s.nocachenocry.com",
16
+ },
13
17
  });
14
18
  </script>
15
19
 
@@ -27,7 +31,7 @@ defineProps({
27
31
  <meta
28
32
  itemprop="thumbnailUrl"
29
33
  v-if="article.CoverUUID"
30
- :content="`https://s.nocachenocry.com/${article.CoverUUID}?vars=format=webp:resize=512x512`"
34
+ :content="`${imageDomain}/${article.CoverUUID}?vars=format=webp:resize=512x512`"
31
35
  />
32
36
  <RouterLink
33
37
  :to="`/${type}/${article.Slug}`"
@@ -35,7 +39,7 @@ defineProps({
35
39
  :alt="article.Title"
36
40
  ><img
37
41
  v-if="article.CoverUUID"
38
- :src="`https://s.nocachenocry.com/${article.CoverUUID}?vars=format=webp:scale_crop_center=400x195`"
42
+ :src="`${imageDomain}/${article.CoverUUID}?vars=format=webp:scale_crop_center=400x195`"
39
43
  loading="lazy"
40
44
  :title="article.Title"
41
45
  :alt="article.Title"
@@ -6,6 +6,7 @@ import { useRest } from "../../composables/rest";
6
6
  import { LazyHead, useSeo } from "../../composables/seo";
7
7
  import type { BreadcrumbLink } from "../../types";
8
8
  import DefaultBreadcrumb from "../ui/DefaultBreadcrumb.vue";
9
+ import { defineWebPage, useSchemaOrg } from "@unhead/schema-org";
9
10
 
10
11
  const props = withDefaults(
11
12
  defineProps<{
@@ -18,6 +19,9 @@ const props = withDefaults(
18
19
  showTitle?: boolean;
19
20
  postValue?: any;
20
21
  passData?: boolean;
22
+ imageDomain?: string;
23
+ multLanguage?: boolean;
24
+ urlSlug?: string;
21
25
  }>(),
22
26
  {
23
27
  baseBreadcrumb: () => [],
@@ -26,6 +30,9 @@ const props = withDefaults(
26
30
  showTitle: true,
27
31
  postValue: () => undefined,
28
32
  passData: false,
33
+ imageDomain: "https://s.nocachenocry.com",
34
+ multLanguage: true,
35
+ urlSlug: "blog",
29
36
  },
30
37
  );
31
38
 
@@ -47,7 +54,7 @@ const getBlogPost = async () => {
47
54
  seo.value.description = post.value.Overview;
48
55
 
49
56
  if (post.value.CoverUUID) {
50
- seo.value.image = `https://s.nocachenocry.com/${post.value.CoverUUID}?vars=format=png:resize=512x512`;
57
+ seo.value.image = `${props.imageDomain}/${post.value.CoverUUID}?vars=format=png:resize=512x512`;
51
58
  seo.value.imageWidth = "512";
52
59
  seo.value.imageHeight = "512";
53
60
  seo.value.imageType = "image/png";
@@ -57,7 +64,11 @@ const getBlogPost = async () => {
57
64
  } else {
58
65
  seo.value.locale = "en-US";
59
66
  }
60
- seo.value.url = `https://${props.baseUrl}/l/${seo.value.locale}/blog/${post.value.Slug}`;
67
+ if (props.multLanguage) {
68
+ seo.value.url = `https://${props.baseUrl}/l/${seo.value.locale}/${props.urlSlug}/${post.value.Slug}`;
69
+ } else {
70
+ seo.value.url = `https://${props.baseUrl}/${props.urlSlug}/${post.value.Slug}`;
71
+ }
61
72
  if (post.value.Locales && post.value.Locales.length > 1) {
62
73
  seo.value.alternateLocales = post.value.Locales;
63
74
  }
@@ -72,6 +83,12 @@ watchEffect(() => {
72
83
  getBlogPost();
73
84
  });
74
85
  useSeo(seo);
86
+ useSchemaOrg([
87
+ defineWebPage({
88
+ datePublished: post.value.CreatedAt.iso,
89
+ dateModified: post.value.UpdatedAt.iso,
90
+ }),
91
+ ]);
75
92
  </script>
76
93
  <template>
77
94
  <div>
@@ -85,6 +102,7 @@ useSeo(seo);
85
102
  />
86
103
  </div>
87
104
  <article itemscope itemtype="https://schema.org/Article">
105
+ <meta itemprop="mainEntityOfPage" content="#webpage" />
88
106
  <meta itemprop="wordCount" :content="post.WordCount" />
89
107
  <meta itemprop="datePublished" :content="post.CreatedAt.iso" />
90
108
  <meta itemprop="dateModified" :content="post.UpdatedAt.iso" />
@@ -93,7 +111,7 @@ useSeo(seo);
93
111
  <meta
94
112
  itemprop="thumbnailUrl"
95
113
  v-if="post.CoverUUID"
96
- :content="`https://s.nocachenocry.com/${post.CoverUUID}?vars=format=webp:resize=512x512`"
114
+ :content="`${props.imageDomain}/${post.CoverUUID}?vars=format=webp:resize=512x512`"
97
115
  />
98
116
  <div class="py-4 px-4 max-w-6xl mx-auto" v-if="showTitle">
99
117
  <h1
@@ -110,7 +128,7 @@ useSeo(seo);
110
128
  </div>
111
129
  <img
112
130
  v-if="post.CoverUUID && showImage"
113
- :src="`https://s.nocachenocry.com/${post.CoverUUID}?vars=format=webp:resize=768x768`"
131
+ :src="`${props.imageDomain}/${post.CoverUUID}?vars=format=webp:resize=768x768`"
114
132
  :alt="post.Title"
115
133
  class="h-auto rounded-xl shadow max-w-[768px] max-h-[280px] mx-auto mb-6"
116
134
  />
@@ -16,10 +16,12 @@ const props = withDefaults(
16
16
  onClose?: Function;
17
17
  closeIcon?: Object;
18
18
  mSize?: string;
19
+ ofy?: string;
19
20
  }>(),
20
21
  {
21
22
  closeIcon: () => h(XCircleIcon),
22
23
  mSize: "w-full",
24
+ ofy: "overflow-y-auto",
23
25
  },
24
26
  );
25
27
 
@@ -63,7 +65,7 @@ onUnmounted(() => {
63
65
  style="z-index: 41"
64
66
  >
65
67
  <div
66
- :class="`relative ${mSize} max-w-6xl max-h-full overflow-y-auto bg-white rounded-lg shadow dark:bg-fv-neutral-900`"
68
+ :class="`relative ${mSize} max-w-6xl max-h-full ${ofy}bg-white rounded-lg shadow dark:bg-fv-neutral-900`"
67
69
  style="z-index: 42"
68
70
  >
69
71
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.0.24",
3
+ "version": "2.0.26",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {