@paris-ias/list 1.0.135 → 1.0.137
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/dist/module.json +1 -1
- package/dist/runtime/components/actions/ExpandedItem.vue +4 -0
- package/dist/runtime/components/actions/RowsItem.vue +5 -1
- package/dist/runtime/components/actions/View.vue +4 -4
- package/dist/runtime/components/affiliation/DenseItem.vue +4 -0
- package/dist/runtime/components/affiliation/ExpandedItem.vue +4 -0
- package/dist/runtime/components/affiliation/RowsItem.vue +5 -1
- package/dist/runtime/components/affiliation/View.vue +4 -4
- package/dist/runtime/components/apps/DenseItem.vue +4 -0
- package/dist/runtime/components/apps/ExpandedItem.vue +5 -1
- package/dist/runtime/components/apps/RowsItem.vue +5 -1
- package/dist/runtime/components/apps/View.vue +4 -4
- package/dist/runtime/components/disciplines/DenseItem.vue +4 -0
- package/dist/runtime/components/disciplines/ExpandedItem.vue +4 -0
- package/dist/runtime/components/disciplines/RowsItem.vue +5 -1
- package/dist/runtime/components/disciplines/View.vue +4 -4
- package/dist/runtime/components/events/Badges.vue +8 -12
- package/dist/runtime/components/events/DenseItem.vue +15 -14
- package/dist/runtime/components/events/ExpandedItem.vue +4 -0
- package/dist/runtime/components/events/RelatedItem.vue +4 -13
- package/dist/runtime/components/events/RowsItem.vue +9 -16
- package/dist/runtime/components/events/SlidingItem.vue +39 -47
- package/dist/runtime/components/events/View.vue +0 -2
- package/dist/runtime/components/fellowships/Badges.vue +15 -11
- package/dist/runtime/components/fellowships/DenseItem.vue +8 -11
- package/dist/runtime/components/fellowships/ExpandedItem.vue +8 -1
- package/dist/runtime/components/fellowships/RowsItem.vue +7 -16
- package/dist/runtime/components/files/DenseItem.vue +5 -0
- package/dist/runtime/components/files/ExpandedItem.vue +4 -0
- package/dist/runtime/components/files/RowsItem.vue +5 -1
- package/dist/runtime/components/files/View.vue +4 -4
- package/dist/runtime/components/list/atoms/ResultsList.vue +3 -3
- package/dist/runtime/components/list/inputs/Select.vue +0 -4
- package/dist/runtime/components/list/molecules/Filters.vue +5 -5
- package/dist/runtime/components/list/molecules/Header.vue +10 -4
- package/dist/runtime/components/list/organisms/List.vue +16 -5
- package/dist/runtime/components/mailing/DenseItem.vue +4 -0
- package/dist/runtime/components/mailing/ExpandedItem.vue +4 -0
- package/dist/runtime/components/mailing/RowsItem.vue +5 -1
- package/dist/runtime/components/mailing/View.vue +4 -4
- package/dist/runtime/components/misc/atoms/ImageContainer.vue +3 -45
- package/dist/runtime/components/misc/molecules/Related.vue +1 -1
- package/dist/runtime/components/news/DenseItem.vue +6 -11
- package/dist/runtime/components/news/ExpandedItem.vue +11 -17
- package/dist/runtime/components/news/RelatedItem.vue +4 -13
- package/dist/runtime/components/news/RowsItem.vue +10 -35
- package/dist/runtime/components/news/View.vue +7 -7
- package/dist/runtime/components/people/DenseItem.vue +7 -13
- package/dist/runtime/components/people/RelatedItem.vue +4 -14
- package/dist/runtime/components/people/RowsItem.vue +3 -21
- package/dist/runtime/components/projects/DenseItem.vue +6 -13
- package/dist/runtime/components/projects/RelatedItem.vue +4 -13
- package/dist/runtime/components/projects/RowsItem.vue +7 -14
- package/dist/runtime/components/projects/View.vue +6 -6
- package/dist/runtime/components/publications/DenseItem.vue +6 -8
- package/dist/runtime/components/publications/RelatedItem.vue +4 -13
- package/dist/runtime/components/publications/RowsItem.vue +7 -15
- package/dist/runtime/components/tags/DenseItem.vue +4 -0
- package/dist/runtime/components/tags/ExpandedItem.vue +4 -0
- package/dist/runtime/components/tags/RowsItem.vue +5 -1
- package/dist/runtime/components/tags/View.vue +4 -4
- package/dist/runtime/components/users/DenseItem.vue +4 -0
- package/dist/runtime/components/users/ExpandedItem.vue +5 -1
- package/dist/runtime/components/users/RowsItem.vue +5 -1
- package/dist/runtime/components/users/View.vue +4 -4
- package/dist/runtime/stores/root.js +1 -56
- package/package.json +3 -4
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-col cols="12" md="6" class="highlight-on-hover">
|
|
3
3
|
<div v-ripple class="border-thin pa-6">
|
|
4
|
-
<FellowshipsBadges :item
|
|
4
|
+
<FellowshipsBadges :item :pathPrefix />
|
|
5
5
|
<div class="d-flex">
|
|
6
|
-
<
|
|
7
|
-
:to="
|
|
8
|
-
localePath({
|
|
9
|
-
name: 'activities-fellowships-slug',
|
|
10
|
-
params: { slug: item.slug[locale] },
|
|
11
|
-
})
|
|
12
|
-
"
|
|
13
|
-
class="text-h4 text-black text-wrap mt-4 pb-4"
|
|
14
|
-
>
|
|
6
|
+
<div class="text-h4 text-black text-wrap mt-4 pb-4">
|
|
15
7
|
{{ item.name }}
|
|
16
|
-
</
|
|
8
|
+
</div>
|
|
17
9
|
</div>
|
|
18
10
|
<div
|
|
19
11
|
class="text-wrap clamped-text d-flex"
|
|
@@ -41,11 +33,8 @@
|
|
|
41
33
|
|
|
42
34
|
<script setup>
|
|
43
35
|
import { useDisplay } from "vuetify"
|
|
44
|
-
import { useLocalePath, useI18n } from "#imports"
|
|
45
36
|
|
|
46
37
|
const { name } = useDisplay()
|
|
47
|
-
const localePath = useLocalePath()
|
|
48
|
-
const { locale } = useI18n()
|
|
49
38
|
|
|
50
39
|
const props = defineProps({
|
|
51
40
|
item: {
|
|
@@ -56,9 +45,11 @@ const props = defineProps({
|
|
|
56
45
|
type: Number,
|
|
57
46
|
required: true,
|
|
58
47
|
},
|
|
48
|
+
pathPrefix: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
59
52
|
})
|
|
60
|
-
|
|
61
|
-
console.log("itemLocal", props.item.slug)
|
|
62
53
|
</script>
|
|
63
54
|
|
|
64
55
|
<style lang="scss"></style>
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import { useNuxtApp } from "#imports"
|
|
6
|
+
import { useNuxtApp } from "#imports"
|
|
7
7
|
|
|
8
|
-
const { $stores } = useNuxtApp()
|
|
8
|
+
const { $stores } = useNuxtApp()
|
|
9
9
|
defineProps({
|
|
10
10
|
item: {
|
|
11
11
|
type: Object,
|
|
@@ -16,7 +16,7 @@ defineProps({
|
|
|
16
16
|
required: false,
|
|
17
17
|
default: false,
|
|
18
18
|
},
|
|
19
|
-
})
|
|
19
|
+
})
|
|
20
20
|
|
|
21
|
-
$stores.files.loading = false
|
|
21
|
+
$stores.files.loading = false
|
|
22
22
|
</script>
|
|
@@ -13,7 +13,7 @@ import { useRootStore } from "../../../stores/root"
|
|
|
13
13
|
import { useNuxtApp, resolveComponent, computed } from "#imports"
|
|
14
14
|
const { $stores } = useNuxtApp()
|
|
15
15
|
const rootStore = useRootStore()
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
const props = defineProps({
|
|
18
18
|
type: {
|
|
19
19
|
type: String,
|
|
@@ -27,7 +27,7 @@ const itemTemplate = computed(() =>
|
|
|
27
27
|
capitalize(props.type) +
|
|
28
28
|
capitalize($stores[props.type].view.name) +
|
|
29
29
|
"Item"
|
|
30
|
-
).toString()
|
|
31
|
-
)
|
|
30
|
+
).toString()
|
|
31
|
+
)
|
|
32
32
|
)
|
|
33
33
|
</script>
|
|
@@ -15,10 +15,6 @@ const { $stores } = useNuxtApp()
|
|
|
15
15
|
const props = defineProps(["type", "items", "name"])
|
|
16
16
|
const val = computed({
|
|
17
17
|
get() {
|
|
18
|
-
console.log(
|
|
19
|
-
"$stores[props.type].filters[props.name]?.value: ",
|
|
20
|
-
$stores[props.type].filters[props.name]?.value,
|
|
21
|
-
)
|
|
22
18
|
return $stores[props.type].filters[props.name]?.value || []
|
|
23
19
|
},
|
|
24
20
|
set(value) {
|
|
@@ -44,7 +44,7 @@ const props = defineProps(["type", "expanded"])
|
|
|
44
44
|
|
|
45
45
|
const ComponentName = (name) => {
|
|
46
46
|
return resolveComponent(
|
|
47
|
-
"ListInputs" + capitalize($stores[props.type].filters[name].type)
|
|
47
|
+
"ListInputs" + capitalize($stores[props.type].filters[name].type),
|
|
48
48
|
)
|
|
49
49
|
}
|
|
50
50
|
const getItems = (name) => {
|
|
@@ -53,14 +53,14 @@ const getItems = (name) => {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
if ($filters?.[props.type]?.[name]) {
|
|
56
|
-
console.log("filters found for ", name, $filters[props.type][name])
|
|
56
|
+
/* console.log("filters found for ", name, $filters[props.type][name]) */
|
|
57
57
|
return $filters[props.type][name]
|
|
58
58
|
.filter((key) => key !== "label")
|
|
59
59
|
.map((item) => ({
|
|
60
60
|
title: i18n.t(
|
|
61
61
|
props.type === "people" && name === "vintage"
|
|
62
62
|
? item
|
|
63
|
-
: `list.filters.${props.type}.${name}.${item}
|
|
63
|
+
: `list.filters.${props.type}.${name}.${item}`,
|
|
64
64
|
),
|
|
65
65
|
value: item,
|
|
66
66
|
}))
|
|
@@ -73,7 +73,7 @@ const getItems = (name) => {
|
|
|
73
73
|
}
|
|
74
74
|
// TODO replace with package based values
|
|
75
75
|
return Object.keys(
|
|
76
|
-
messages.value[locale.value].list.filters[props.type][name]
|
|
76
|
+
messages.value[locale.value].list.filters[props.type][name],
|
|
77
77
|
)
|
|
78
78
|
.filter((key) => key !== "label")
|
|
79
79
|
.map((item) => ({
|
|
@@ -97,7 +97,7 @@ const computeVisibility = (filterItem) => {
|
|
|
97
97
|
$stores[props.type].filters[value]?.value.includes(rule[value])
|
|
98
98
|
: $stores[props.type].filters[value]?.value === rule[value]
|
|
99
99
|
})
|
|
100
|
-
}
|
|
100
|
+
},
|
|
101
101
|
)
|
|
102
102
|
)
|
|
103
103
|
}
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
@open="filtersOpen = $event"
|
|
8
8
|
/>
|
|
9
9
|
<v-spacer />
|
|
10
|
-
<ListAtomsResetButton
|
|
10
|
+
<ListAtomsResetButton
|
|
11
|
+
v-if="
|
|
12
|
+
$stores[type].filtersCount ||
|
|
13
|
+
($stores[type].search && $stores[type].search.trim() !== '')
|
|
14
|
+
"
|
|
15
|
+
:type
|
|
16
|
+
/>
|
|
11
17
|
<ListAtomsViewMenu :type />
|
|
12
18
|
<ListAtomsSortMenu :type />
|
|
13
19
|
</div>
|
|
@@ -32,16 +38,16 @@ const filtersOpen = ref(false)
|
|
|
32
38
|
const visible = computed(() => {
|
|
33
39
|
console.log(
|
|
34
40
|
"$stores[props.type]?.filtersCount > 0: ",
|
|
35
|
-
$stores[props.type]?.filtersCount > 0
|
|
41
|
+
$stores[props.type]?.filtersCount > 0
|
|
36
42
|
)
|
|
37
43
|
console.log(
|
|
38
44
|
"$stores[props.type]?.filtersCount: ",
|
|
39
|
-
$stores[props.type]?.filtersCount
|
|
45
|
+
$stores[props.type]?.filtersCount
|
|
40
46
|
)
|
|
41
47
|
console.log(
|
|
42
48
|
!!(
|
|
43
49
|
$stores[props.type]?.filtersCount && $stores[props.type]?.filtersCount > 0
|
|
44
|
-
)
|
|
50
|
+
)
|
|
45
51
|
)
|
|
46
52
|
return !!(
|
|
47
53
|
$stores[props.type]?.filtersCount && $stores[props.type]?.filtersCount > 0
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
:key="index"
|
|
8
8
|
:item="item"
|
|
9
9
|
:index="index"
|
|
10
|
+
:pathPrefix="
|
|
11
|
+
localePath({
|
|
12
|
+
name: pathPrefix,
|
|
13
|
+
params: { slug: item.slug },
|
|
14
|
+
})
|
|
15
|
+
"
|
|
10
16
|
/>
|
|
11
17
|
</component>
|
|
12
18
|
<div class="text-center">
|
|
@@ -43,11 +49,15 @@ import {
|
|
|
43
49
|
onMounted,
|
|
44
50
|
useI18n,
|
|
45
51
|
useRoute,
|
|
52
|
+
navigateTo,
|
|
53
|
+
useLocalePath,
|
|
46
54
|
} from "#imports"
|
|
47
55
|
const { $stores } = useNuxtApp()
|
|
48
56
|
const { locale } = useI18n()
|
|
49
57
|
const route = useRoute()
|
|
50
58
|
const rootStore = useRootStore()
|
|
59
|
+
const localePath = useLocalePath()
|
|
60
|
+
|
|
51
61
|
const props = defineProps({
|
|
52
62
|
addBtn: {
|
|
53
63
|
type: Boolean,
|
|
@@ -69,6 +79,10 @@ const props = defineProps({
|
|
|
69
79
|
}
|
|
70
80
|
},
|
|
71
81
|
},
|
|
82
|
+
pathPrefix: {
|
|
83
|
+
type: String,
|
|
84
|
+
required: true,
|
|
85
|
+
},
|
|
72
86
|
pagination: {
|
|
73
87
|
type: Object,
|
|
74
88
|
required: false,
|
|
@@ -128,11 +142,6 @@ onMounted(async () => {
|
|
|
128
142
|
console.error("Error fetching list:", e)
|
|
129
143
|
}
|
|
130
144
|
})
|
|
131
|
-
// try {
|
|
132
|
-
// await rootStore.update(props.type, locale.value);
|
|
133
|
-
// } catch (error) {
|
|
134
|
-
// console.log("error fetching update list: ", error);
|
|
135
|
-
// }
|
|
136
145
|
|
|
137
146
|
watch(
|
|
138
147
|
() => page.value,
|
|
@@ -157,4 +166,6 @@ async function onPageChange(newPage) {
|
|
|
157
166
|
lang: locale.value,
|
|
158
167
|
})
|
|
159
168
|
}
|
|
169
|
+
|
|
170
|
+
console.log("pathPrefix", itemTemplate.value)
|
|
160
171
|
</script>
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import { useNuxtApp } from "#imports"
|
|
6
|
+
import { useNuxtApp } from "#imports"
|
|
7
7
|
|
|
8
|
-
const { $stores } = useNuxtApp()
|
|
8
|
+
const { $stores } = useNuxtApp()
|
|
9
9
|
defineProps({
|
|
10
10
|
item: {
|
|
11
11
|
type: Object,
|
|
@@ -16,7 +16,7 @@ defineProps({
|
|
|
16
16
|
required: false,
|
|
17
17
|
default: false,
|
|
18
18
|
},
|
|
19
|
-
})
|
|
19
|
+
})
|
|
20
20
|
|
|
21
|
-
$stores.mailing.loading = false
|
|
21
|
+
$stores.mailing.loading = false
|
|
22
22
|
</script>
|
|
@@ -8,46 +8,7 @@
|
|
|
8
8
|
<v-skeleton-loader v-if="loading" height="100%" type="image" />
|
|
9
9
|
|
|
10
10
|
<template v-else>
|
|
11
|
-
<
|
|
12
|
-
v-if="link"
|
|
13
|
-
v-slot="{ navigate, isActive }"
|
|
14
|
-
:to="
|
|
15
|
-
localePath({
|
|
16
|
-
name: link,
|
|
17
|
-
params: { slug },
|
|
18
|
-
})
|
|
19
|
-
"
|
|
20
|
-
custom
|
|
21
|
-
>
|
|
22
|
-
<div class="overflow-hidden mw-100">
|
|
23
|
-
<!-- TODO debug why the picture is not displaying/sizing properly -->
|
|
24
|
-
<v-img
|
|
25
|
-
v-if="src"
|
|
26
|
-
:aspect-ratio="ratio"
|
|
27
|
-
:active="isActive"
|
|
28
|
-
:class="{ 'img-animation': animate }"
|
|
29
|
-
:lazy-src="
|
|
30
|
-
img(computedSrc, {
|
|
31
|
-
width,
|
|
32
|
-
quality: 70,
|
|
33
|
-
})
|
|
34
|
-
"
|
|
35
|
-
:src="
|
|
36
|
-
img(computedSrc, {
|
|
37
|
-
width,
|
|
38
|
-
quality: 70,
|
|
39
|
-
})
|
|
40
|
-
"
|
|
41
|
-
:srcset="_srcset.srcset"
|
|
42
|
-
:sizes="_srcset.sizes"
|
|
43
|
-
:title="caption"
|
|
44
|
-
v-bind="$attrs"
|
|
45
|
-
@click="navigate"
|
|
46
|
-
>
|
|
47
|
-
<slot />
|
|
48
|
-
</v-img></div
|
|
49
|
-
></nuxt-link>
|
|
50
|
-
<div v-else class="overflow-hidden mw-100">
|
|
11
|
+
<div class="overflow-hidden mw-100">
|
|
51
12
|
<!-- TODO debug why the picture is not displaying/sizing properly -->
|
|
52
13
|
<v-img
|
|
53
14
|
v-if="src"
|
|
@@ -78,8 +39,7 @@
|
|
|
78
39
|
</template>
|
|
79
40
|
|
|
80
41
|
<script setup>
|
|
81
|
-
import { computed, useImage
|
|
82
|
-
const localePath = useLocalePath()
|
|
42
|
+
import { computed, useImage } from "#imports"
|
|
83
43
|
const img = useImage()
|
|
84
44
|
|
|
85
45
|
const computedSrc = computed(() => {
|
|
@@ -105,8 +65,6 @@ const props = defineProps({
|
|
|
105
65
|
width: { type: Number, default: 0 },
|
|
106
66
|
ratio: { type: Number, required: true, default: 1 },
|
|
107
67
|
caption: { type: String, default: "" },
|
|
108
|
-
slug: { type: [Object, String], default: "" },
|
|
109
|
-
link: { type: String, default: "" },
|
|
110
68
|
animate: { type: Boolean, default: true },
|
|
111
69
|
})
|
|
112
70
|
const _srcset = computed(() => {
|
|
@@ -119,7 +77,7 @@ const _srcset = computed(() => {
|
|
|
119
77
|
quality: 70,
|
|
120
78
|
...(props.width && { width: props.width }),
|
|
121
79
|
},
|
|
122
|
-
}
|
|
80
|
+
},
|
|
123
81
|
)
|
|
124
82
|
})
|
|
125
83
|
</script>
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-row
|
|
3
|
-
v-ripple
|
|
4
|
-
no-gutters
|
|
5
|
-
class="cursor-pointer highlight-on-hover my-2"
|
|
6
|
-
@click="$router.push(localePath('/activities/news/' + item.slug[locale]))"
|
|
7
|
-
>
|
|
2
|
+
<v-row v-ripple no-gutters class="cursor-pointer highlight-on-hover my-2">
|
|
8
3
|
<v-col v-if="mdAndUp" align-self="center" cols="1">
|
|
9
4
|
<MiscAtomsImageContainer
|
|
10
5
|
cover
|
|
@@ -13,9 +8,6 @@
|
|
|
13
8
|
item && item.image && item.image.url ? item.image.url : '/default.png'
|
|
14
9
|
"
|
|
15
10
|
:ratio="1 / 1"
|
|
16
|
-
:name="item.slug"
|
|
17
|
-
:slug="item.slug && item.slug[locale]"
|
|
18
|
-
link="news-slug"
|
|
19
11
|
width="80px"
|
|
20
12
|
/>
|
|
21
13
|
</v-col>
|
|
@@ -61,11 +53,10 @@
|
|
|
61
53
|
<script setup>
|
|
62
54
|
import { useDisplay } from "vuetify"
|
|
63
55
|
import { useRootStore } from "../../stores/root"
|
|
64
|
-
import { computed, useNuxtApp, useI18n
|
|
56
|
+
import { computed, useNuxtApp, useI18n } from "#imports"
|
|
65
57
|
|
|
66
58
|
const { $stores } = useNuxtApp()
|
|
67
59
|
const { name, mdAndUp } = useDisplay()
|
|
68
|
-
const localePath = useLocalePath()
|
|
69
60
|
const { locale } = useI18n()
|
|
70
61
|
|
|
71
62
|
const rootStore = useRootStore()
|
|
@@ -78,6 +69,10 @@ const props = defineProps({
|
|
|
78
69
|
type: Number,
|
|
79
70
|
required: true,
|
|
80
71
|
},
|
|
72
|
+
pathPrefix: {
|
|
73
|
+
type: String,
|
|
74
|
+
required: true,
|
|
75
|
+
},
|
|
81
76
|
})
|
|
82
77
|
const eventCategory = computed(() => {
|
|
83
78
|
if (props.item.category) {
|
|
@@ -12,10 +12,7 @@
|
|
|
12
12
|
@click.prevent="
|
|
13
13
|
expanded
|
|
14
14
|
? router.push(
|
|
15
|
-
|
|
16
|
-
name: 'news-slug',
|
|
17
|
-
params: { slug: item.slug[locale] },
|
|
18
|
-
}),
|
|
15
|
+
pathPrefix
|
|
19
16
|
)
|
|
20
17
|
: null
|
|
21
18
|
"
|
|
@@ -33,10 +30,7 @@
|
|
|
33
30
|
@click.prevent="
|
|
34
31
|
expanded
|
|
35
32
|
? router.push(
|
|
36
|
-
|
|
37
|
-
name: 'news-slug',
|
|
38
|
-
params: { slug: item.slug[locale] },
|
|
39
|
-
}),
|
|
33
|
+
pathPrefix
|
|
40
34
|
)
|
|
41
35
|
: null
|
|
42
36
|
"
|
|
@@ -66,12 +60,8 @@
|
|
|
66
60
|
class="mt-4"
|
|
67
61
|
variant="outlined"
|
|
68
62
|
tile
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
localePath({
|
|
72
|
-
name: 'news-slug',
|
|
73
|
-
params: { slug: item.slug[locale] },
|
|
74
|
-
}),
|
|
63
|
+
:to="pathPrefix"
|
|
64
|
+
|
|
75
65
|
)
|
|
76
66
|
"
|
|
77
67
|
>
|
|
@@ -85,15 +75,15 @@
|
|
|
85
75
|
<script setup>
|
|
86
76
|
import { useDisplay } from "vuetify"
|
|
87
77
|
import { useRootStore } from "../../stores/root"
|
|
88
|
-
import { useRouter
|
|
78
|
+
import { useRouter } from "#imports"
|
|
79
|
+
|
|
89
80
|
|
|
90
|
-
const localePath = useLocalePath()
|
|
91
81
|
|
|
92
82
|
const router = useRouter()
|
|
93
83
|
const rootStore = useRootStore()
|
|
94
84
|
const expanded = ref(false)
|
|
95
85
|
const { name, lgAndUp } = useDisplay()
|
|
96
|
-
|
|
86
|
+
|
|
97
87
|
const props = defineProps({
|
|
98
88
|
item: {
|
|
99
89
|
type: Object,
|
|
@@ -103,6 +93,10 @@ const props = defineProps({
|
|
|
103
93
|
type: Number,
|
|
104
94
|
required: true,
|
|
105
95
|
},
|
|
96
|
+
pathPrefix: {
|
|
97
|
+
type: String,
|
|
98
|
+
required: true,
|
|
99
|
+
},
|
|
106
100
|
})
|
|
107
101
|
</script>
|
|
108
102
|
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-sheet
|
|
3
|
-
:to="
|
|
4
|
-
localePath({
|
|
5
|
-
name: 'news-slug',
|
|
6
|
-
params: { slug: item.name },
|
|
7
|
-
})
|
|
8
|
-
"
|
|
9
|
-
>
|
|
2
|
+
<v-sheet>
|
|
10
3
|
<v-row>
|
|
11
4
|
<v-col v-if="lgAndUp" cols="3">
|
|
12
5
|
<MiscAtomsImageContainer
|
|
@@ -14,8 +7,6 @@
|
|
|
14
7
|
:src="item.image"
|
|
15
8
|
:loading="rootStore.loading"
|
|
16
9
|
:ratio="1 / 1"
|
|
17
|
-
:link="item.name"
|
|
18
|
-
name="news-slug"
|
|
19
10
|
/>
|
|
20
11
|
</v-col>
|
|
21
12
|
<v-col cols="12" lg="9">
|
|
@@ -36,11 +27,11 @@
|
|
|
36
27
|
<script setup>
|
|
37
28
|
import { useDisplay } from "vuetify"
|
|
38
29
|
import { useRootStore } from "../../stores/root"
|
|
39
|
-
import { useLocalePath } from "#imports"
|
|
40
30
|
|
|
41
|
-
const localePath = useLocalePath()
|
|
42
31
|
const rootStore = useRootStore()
|
|
43
32
|
const { lgAndUp } = useDisplay()
|
|
44
33
|
|
|
45
|
-
const props = defineProps({
|
|
34
|
+
const props = defineProps({
|
|
35
|
+
item: { type: Object, required: true },
|
|
36
|
+
})
|
|
46
37
|
</script>
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
:src="item.image.url ? item.image : '/default.png'"
|
|
8
8
|
:ratio="1 / 1"
|
|
9
9
|
:loading="$stores.news.loading"
|
|
10
|
-
link="news-slug"
|
|
11
|
-
:slug="item._path && item._path.split('/').pop()"
|
|
12
10
|
>
|
|
13
11
|
<v-chip class="ma-2" style="background-color: white; color: black">
|
|
14
12
|
{{ $t(eventCategory) }}
|
|
@@ -38,17 +36,9 @@
|
|
|
38
36
|
<br />
|
|
39
37
|
</template>
|
|
40
38
|
|
|
41
|
-
<
|
|
42
|
-
:to="
|
|
43
|
-
localePath({
|
|
44
|
-
name: 'news-slug',
|
|
45
|
-
params: { slug: item.slug[locale] },
|
|
46
|
-
})
|
|
47
|
-
"
|
|
48
|
-
class="text-wrap text-h5 text-md-h4 text-black"
|
|
49
|
-
>
|
|
39
|
+
<div class="text-wrap text-h5 text-md-h4 text-black">
|
|
50
40
|
{{ item.name }}
|
|
51
|
-
</
|
|
41
|
+
</div>
|
|
52
42
|
<div class="tex-overline mt-3">
|
|
53
43
|
{{ formatDateValue(item.date, locale) }}
|
|
54
44
|
</div>
|
|
@@ -75,12 +65,7 @@
|
|
|
75
65
|
variant="outlined"
|
|
76
66
|
tile
|
|
77
67
|
size="small"
|
|
78
|
-
:to="
|
|
79
|
-
localePath({
|
|
80
|
-
name: 'activities-news-slug',
|
|
81
|
-
params: { slug: item.slug[locale] },
|
|
82
|
-
})
|
|
83
|
-
"
|
|
68
|
+
:to="pathPrefix"
|
|
84
69
|
>
|
|
85
70
|
{{ $t("read-more") }}
|
|
86
71
|
</v-btn>
|
|
@@ -112,12 +97,7 @@
|
|
|
112
97
|
class="mt-4"
|
|
113
98
|
variant="outlined"
|
|
114
99
|
tile
|
|
115
|
-
:to="
|
|
116
|
-
localePath({
|
|
117
|
-
name: 'activities-news-slug',
|
|
118
|
-
params: { slug: item.slug[locale] },
|
|
119
|
-
})
|
|
120
|
-
"
|
|
100
|
+
:to="pathPrefix"
|
|
121
101
|
:size="
|
|
122
102
|
['small', 'small', 'small', 'default', 'default', 'large'][
|
|
123
103
|
['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
|
|
@@ -129,17 +109,15 @@
|
|
|
129
109
|
</template>
|
|
130
110
|
</v-col>
|
|
131
111
|
</v-row>
|
|
132
|
-
<!-- <MiscMoleculesSearchItem></MiscMoleculesSearchItem> -->
|
|
133
112
|
</template>
|
|
134
113
|
|
|
135
114
|
<script setup>
|
|
136
115
|
import { useDisplay } from "vuetify"
|
|
137
116
|
import { useRootStore } from "../../stores/root"
|
|
138
|
-
import { useNuxtApp, useI18n,
|
|
117
|
+
import { useNuxtApp, useI18n, computed } from "#imports"
|
|
139
118
|
|
|
140
119
|
const { $stores } = useNuxtApp()
|
|
141
120
|
const { locale } = useI18n()
|
|
142
|
-
const localePath = useLocalePath()
|
|
143
121
|
const rootStore = useRootStore()
|
|
144
122
|
const { name, smAndDown, mdAndDown, mdAndUp, lgAndUp } = useDisplay()
|
|
145
123
|
const eventCategory = computed(() => {
|
|
@@ -158,19 +136,16 @@ const props = defineProps({
|
|
|
158
136
|
type: Number,
|
|
159
137
|
required: true,
|
|
160
138
|
},
|
|
139
|
+
pathPrefix: {
|
|
140
|
+
type: String,
|
|
141
|
+
required: true,
|
|
142
|
+
},
|
|
161
143
|
})
|
|
162
144
|
|
|
163
145
|
const processedSummary = computed(() => {
|
|
164
146
|
const raw = props.item.summary || ""
|
|
165
147
|
|
|
166
|
-
|
|
167
|
-
name: "news-slug",
|
|
168
|
-
params: { slug: props.item.slug[locale.value] },
|
|
169
|
-
})
|
|
170
|
-
|
|
171
|
-
/* console.log("Raw summary:", raw);
|
|
172
|
-
console.log("Slug path:", slugPath); */
|
|
173
|
-
return replaceMarkdownLinksWithSlug(raw, slugPath)
|
|
148
|
+
return replaceMarkdownLinksWithSlug(raw, props.pathPrefix)
|
|
174
149
|
})
|
|
175
150
|
|
|
176
151
|
function replaceMarkdownLinksWithSlug(markdownText, slugPath) {
|