@paris-ias/list 1.0.112 → 1.0.113

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.
Files changed (151) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/list/molecules/Pagination.vue +2 -0
  3. package/dist/runtime/components/list/organisms/List.vue +11 -1
  4. package/dist/runtime/runtime/components/actions/ExpandedItem.vue +14 -0
  5. package/dist/runtime/runtime/components/actions/RowsItem.vue +12 -0
  6. package/dist/runtime/runtime/components/actions/View.vue +20 -0
  7. package/dist/runtime/runtime/components/affiliations/ExpandedItem.vue +14 -0
  8. package/dist/runtime/runtime/components/affiliations/RowsItem.vue +12 -0
  9. package/dist/runtime/runtime/components/affiliations/View.vue +20 -0
  10. package/dist/runtime/runtime/components/apps/ExpandedItem.vue +14 -0
  11. package/dist/runtime/runtime/components/apps/RowsItem.vue +12 -0
  12. package/dist/runtime/runtime/components/apps/View.vue +20 -0
  13. package/dist/runtime/runtime/components/disciplines/ExpandedItem.vue +14 -0
  14. package/dist/runtime/runtime/components/disciplines/RowsItem.vue +12 -0
  15. package/dist/runtime/runtime/components/disciplines/View.vue +20 -0
  16. package/dist/runtime/runtime/components/events/Badges.vue +73 -0
  17. package/dist/runtime/runtime/components/events/DateTimePlace.vue +77 -0
  18. package/dist/runtime/runtime/components/events/DenseItem.vue +60 -0
  19. package/dist/runtime/runtime/components/events/ExpandedItem.vue +9 -0
  20. package/dist/runtime/runtime/components/events/RegisterModal.vue +50 -0
  21. package/dist/runtime/runtime/components/events/RelatedItem.vue +44 -0
  22. package/dist/runtime/runtime/components/events/RowsItem.vue +118 -0
  23. package/dist/runtime/runtime/components/events/SlidingItem.vue +63 -0
  24. package/dist/runtime/runtime/components/events/View.vue +333 -0
  25. package/dist/runtime/runtime/components/fellowships/Badges.vue +47 -0
  26. package/dist/runtime/runtime/components/fellowships/DenseItem.vue +42 -0
  27. package/dist/runtime/runtime/components/fellowships/ExpandedItem.vue +7 -0
  28. package/dist/runtime/runtime/components/fellowships/RegisterModal.vue +41 -0
  29. package/dist/runtime/runtime/components/fellowships/RowsItem.vue +58 -0
  30. package/dist/runtime/runtime/components/fellowships/View.vue +203 -0
  31. package/dist/runtime/runtime/components/files/ExpandedItem.vue +14 -0
  32. package/dist/runtime/runtime/components/files/RowsItem.vue +12 -0
  33. package/dist/runtime/runtime/components/files/View.vue +20 -0
  34. package/dist/runtime/runtime/components/list/atoms/FiltersMenu.vue +44 -0
  35. package/dist/runtime/runtime/components/list/atoms/ResetButton.vue +33 -0
  36. package/dist/runtime/runtime/components/list/atoms/ResultsList.vue +27 -0
  37. package/dist/runtime/runtime/components/list/atoms/SearchInput.vue +59 -0
  38. package/dist/runtime/runtime/components/list/atoms/SearchItem.vue +65 -0
  39. package/dist/runtime/runtime/components/list/atoms/SearchString.vue +160 -0
  40. package/dist/runtime/runtime/components/list/atoms/SortMenu.vue +80 -0
  41. package/dist/runtime/runtime/components/list/atoms/ViewMenu.vue +63 -0
  42. package/dist/runtime/runtime/components/list/atoms/itemsPerPage.vue +33 -0
  43. package/dist/runtime/runtime/components/list/inputs/AutoComplete.vue +24 -0
  44. package/dist/runtime/runtime/components/list/inputs/BooleanSwitch.vue +20 -0
  45. package/dist/runtime/runtime/components/list/inputs/Checkbox.vue +20 -0
  46. package/dist/runtime/runtime/components/list/inputs/Select.vue +28 -0
  47. package/dist/runtime/runtime/components/list/molecules/Filters.vue +98 -0
  48. package/dist/runtime/runtime/components/list/molecules/GlobalSearchInput.vue +131 -0
  49. package/dist/runtime/runtime/components/list/molecules/Header.vue +51 -0
  50. package/dist/runtime/runtime/components/list/molecules/Pagination.vue +194 -0
  51. package/dist/runtime/runtime/components/list/molecules/ResultsContainer.vue +78 -0
  52. package/dist/runtime/runtime/components/list/organisms/List.vue +110 -0
  53. package/dist/runtime/runtime/components/list/organisms/Results.vue +72 -0
  54. package/dist/runtime/runtime/components/list/organisms/Slider.vue +180 -0
  55. package/dist/runtime/runtime/components/list/views/Dense.vue +12 -0
  56. package/dist/runtime/runtime/components/list/views/Expanded.vue +10 -0
  57. package/dist/runtime/runtime/components/list/views/Grid.vue +13 -0
  58. package/dist/runtime/runtime/components/list/views/Rows.vue +12 -0
  59. package/dist/runtime/runtime/components/list/views/Slider.vue +147 -0
  60. package/dist/runtime/runtime/components/list/views/Table.vue +13 -0
  61. package/dist/runtime/runtime/components/mailing/ExpandedItem.vue +14 -0
  62. package/dist/runtime/runtime/components/mailing/RowsItem.vue +12 -0
  63. package/dist/runtime/runtime/components/mailing/View.vue +20 -0
  64. package/dist/runtime/runtime/components/misc/atoms/DateStamp.vue +101 -0
  65. package/dist/runtime/runtime/components/misc/atoms/ImageContainer.vue +127 -0
  66. package/dist/runtime/runtime/components/misc/atoms/ShareMenu.vue +61 -0
  67. package/dist/runtime/runtime/components/misc/atoms/Socials.vue +120 -0
  68. package/dist/runtime/runtime/components/misc/molecules/ChipContainer.vue +31 -0
  69. package/dist/runtime/runtime/components/misc/molecules/Related.vue +28 -0
  70. package/dist/runtime/runtime/components/misc/molecules/RelatedItems.vue +27 -0
  71. package/dist/runtime/runtime/components/misc/molecules/SearchItem.vue +26 -0
  72. package/dist/runtime/runtime/components/news/DenseItem.vue +73 -0
  73. package/dist/runtime/runtime/components/news/ExpandedItem.vue +145 -0
  74. package/dist/runtime/runtime/components/news/Header.vue +7 -0
  75. package/dist/runtime/runtime/components/news/RelatedItem.vue +44 -0
  76. package/dist/runtime/runtime/components/news/RowsItem.vue +182 -0
  77. package/dist/runtime/runtime/components/news/View.vue +174 -0
  78. package/dist/runtime/runtime/components/people/DenseItem.vue +60 -0
  79. package/dist/runtime/runtime/components/people/ExpandedItem.vue +14 -0
  80. package/dist/runtime/runtime/components/people/GroupBadges.vue +54 -0
  81. package/dist/runtime/runtime/components/people/RelatedItem.vue +41 -0
  82. package/dist/runtime/runtime/components/people/RowsItem.vue +93 -0
  83. package/dist/runtime/runtime/components/people/View.vue +172 -0
  84. package/dist/runtime/runtime/components/projects/DenseItem.vue +77 -0
  85. package/dist/runtime/runtime/components/projects/ExpandedItem.vue +12 -0
  86. package/dist/runtime/runtime/components/projects/RelatedItem.vue +44 -0
  87. package/dist/runtime/runtime/components/projects/RowsItem.vue +103 -0
  88. package/dist/runtime/runtime/components/projects/View.vue +130 -0
  89. package/dist/runtime/runtime/components/publications/DenseItem.vue +89 -0
  90. package/dist/runtime/runtime/components/publications/RelatedItem.vue +44 -0
  91. package/dist/runtime/runtime/components/publications/RowsItem.vue +105 -0
  92. package/dist/runtime/runtime/components/publications/View.vue +132 -0
  93. package/dist/runtime/runtime/components/tags/ExpandedItem.vue +14 -0
  94. package/dist/runtime/runtime/components/tags/RowsItem.vue +12 -0
  95. package/dist/runtime/runtime/components/tags/View.vue +20 -0
  96. package/dist/runtime/runtime/components/users/ExpandedItem.vue +14 -0
  97. package/dist/runtime/runtime/components/users/RowsItem.vue +12 -0
  98. package/dist/runtime/runtime/components/users/View.vue +20 -0
  99. package/dist/runtime/runtime/composables/useFetchItem.d.ts +6 -0
  100. package/dist/runtime/runtime/composables/useFetchItem.js +49 -0
  101. package/dist/runtime/runtime/composables/useIcons.d.ts +1 -0
  102. package/dist/runtime/runtime/composables/useIcons.js +30 -0
  103. package/dist/runtime/runtime/composables/useUtils.d.ts +12 -0
  104. package/dist/runtime/runtime/composables/useUtils.js +48 -0
  105. package/dist/runtime/runtime/graphql/buildFiltersValues.gql +35 -0
  106. package/dist/runtime/runtime/graphql/item/action.gql +22 -0
  107. package/dist/runtime/runtime/graphql/item/affiliations.gql +37 -0
  108. package/dist/runtime/runtime/graphql/item/apps.gql +34 -0
  109. package/dist/runtime/runtime/graphql/item/disciplines.gql +17 -0
  110. package/dist/runtime/runtime/graphql/item/events.gql +120 -0
  111. package/dist/runtime/runtime/graphql/item/fellowships.gql +164 -0
  112. package/dist/runtime/runtime/graphql/item/files.gql +25 -0
  113. package/dist/runtime/runtime/graphql/item/mailing.gql +10 -0
  114. package/dist/runtime/runtime/graphql/item/news.gql +129 -0
  115. package/dist/runtime/runtime/graphql/item/people.gql +174 -0
  116. package/dist/runtime/runtime/graphql/item/projects.gql +171 -0
  117. package/dist/runtime/runtime/graphql/item/publications.gql +169 -0
  118. package/dist/runtime/runtime/graphql/item/tags.gql +13 -0
  119. package/dist/runtime/runtime/graphql/item/users.gql +14 -0
  120. package/dist/runtime/runtime/graphql/list/action.gql +31 -0
  121. package/dist/runtime/runtime/graphql/list/affiliations.gql +42 -0
  122. package/dist/runtime/runtime/graphql/list/apps.gql +42 -0
  123. package/dist/runtime/runtime/graphql/list/disciplines.gql +22 -0
  124. package/dist/runtime/runtime/graphql/list/events.gql +44 -0
  125. package/dist/runtime/runtime/graphql/list/fellowships.gql +53 -0
  126. package/dist/runtime/runtime/graphql/list/files.gql +37 -0
  127. package/dist/runtime/runtime/graphql/list/mailing.gql +22 -0
  128. package/dist/runtime/runtime/graphql/list/news.gql +40 -0
  129. package/dist/runtime/runtime/graphql/list/people.gql +50 -0
  130. package/dist/runtime/runtime/graphql/list/projects.gql +37 -0
  131. package/dist/runtime/runtime/graphql/list/publications.gql +38 -0
  132. package/dist/runtime/runtime/graphql/list/search.gql +161 -0
  133. package/dist/runtime/runtime/graphql/list/tags.gql +22 -0
  134. package/dist/runtime/runtime/graphql/list/users.gql +38 -0
  135. package/dist/runtime/runtime/graphql/login.gql +0 -0
  136. package/dist/runtime/runtime/plugins/pinia.d.ts +2 -0
  137. package/dist/runtime/runtime/plugins/pinia.js +134 -0
  138. package/dist/runtime/runtime/plugins/vuetify.d.ts +2 -0
  139. package/dist/runtime/runtime/plugins/vuetify.js +21 -0
  140. package/dist/runtime/runtime/public/default.png +0 -0
  141. package/dist/runtime/runtime/public/filters.json +72 -0
  142. package/dist/runtime/runtime/server/tsconfig.json +3 -0
  143. package/dist/runtime/runtime/stores/factory.d.ts +25 -0
  144. package/dist/runtime/runtime/stores/factory.js +19 -0
  145. package/dist/runtime/runtime/stores/root.d.ts +60 -0
  146. package/dist/runtime/runtime/stores/root.js +315 -0
  147. package/dist/runtime/runtime/translations/en.json +350 -0
  148. package/dist/runtime/runtime/translations/fr.json +349 -0
  149. package/dist/runtime/runtime/types/imports.d.ts +13 -0
  150. package/dist/runtime/runtime/types/stores.d.ts +11 -0
  151. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ <template>
2
+ <section>
3
+ <slot>
4
+ <!-- fallback content -->
5
+ Expanded view
6
+ </slot>
7
+ </section>
8
+ </template>
9
+
10
+ <script setup lang="ts"></script>
@@ -0,0 +1,13 @@
1
+ <template>
2
+ GRID DISPLAY
3
+ <template v-for="(item, index) in items" :key="index">
4
+ <slot name="data" :item="item" />
5
+ </template>
6
+ </template>
7
+
8
+ <script setup>
9
+ const props = defineProps({
10
+ items: [Object],
11
+ type: String
12
+ });
13
+ </script>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <v-row>
3
+ <slot>
4
+ <!-- fallback content -->
5
+ Rows view
6
+ </slot>
7
+ </v-row>
8
+ </template>
9
+
10
+ <script setup>
11
+
12
+ </script>
@@ -0,0 +1,147 @@
1
+ <template>
2
+ <v-row class="mb-9">
3
+ <v-col class="justify-center">
4
+ <slot />
5
+ </v-col>
6
+ <v-col cols="3">
7
+ <!-- <div class="text-h6 font-weight-black d-flex align-center mx-6">
8
+ {{ model + 1 }}/{{ items.length || 0 }}
9
+ </div> -->
10
+ <v-btn-toggle>
11
+ <v-btn
12
+ tile
13
+ variant="outlined"
14
+ flat
15
+ :disabled="model === 0"
16
+ icon="mdi-chevron-left"
17
+ class="pseudo-carousel-prev"
18
+ />
19
+ <v-btn
20
+ tile
21
+ variant="outlined"
22
+ :disabled="model === items.length - 1"
23
+ flat
24
+ icon="mdi-chevron-right"
25
+ class="pseudo-carousel-next"
26
+ @click="model++"
27
+ />
28
+ </v-btn-toggle>
29
+ </v-col>
30
+ </v-row>
31
+
32
+ <Swiper
33
+ ref="swiper"
34
+ style="overflow-x: visible"
35
+ effect="slide"
36
+ :modules="[
37
+ SwiperAutoplay,
38
+ SwiperA11y,
39
+ SwiperPagination,
40
+ SwiperNavigation,
41
+ SwiperKeyboard,
42
+ ]"
43
+ :breakpoints="swiperBreakpoints"
44
+ :navigation="{
45
+ nextEl: '.pseudo-carousel-next',
46
+ prevEl: '.pseudo-carousel-prev',
47
+ }"
48
+ @swiperprogress="onProgress"
49
+ @swiperslidechange="onSlideChange"
50
+ >
51
+ <template v-for="(item, index) in items" v-if="loading"> LOADING </template>
52
+ <SwiperSlide
53
+ v-for="(item, index) in items"
54
+ v-else
55
+ :key="index + type"
56
+ :style="'width: ' + computedWidth + 'px'"
57
+ :width="computedWidth"
58
+ >
59
+ <component
60
+ :is="capitalize(type) + 'SlidingItem'"
61
+ :key="index + type"
62
+ :index="index"
63
+ :item="item"
64
+ :width="computedWidth"
65
+ :loading="loading"
66
+ :dark="dark"
67
+ />
68
+ </SwiperSlide>
69
+ </Swiper>
70
+ <div v-if="more" class="d-flex justify-end mt-12">
71
+ <v-btn class="ml-auto" variant="flat">{{ $t(type + ".see-more") }}</v-btn>
72
+ </div>
73
+ </template>
74
+
75
+ <script setup>
76
+ import { useDisplay } from "vuetify";
77
+ const { locale } = useI18n();
78
+ const { name, mdAndUp } = useDisplay();
79
+ const model = ref(0);
80
+ const swiperBreakpoints = ref({
81
+ 320: {
82
+ slidesPerView: "auto",
83
+ spaceBetween: 15
84
+ },
85
+ 480: {
86
+ slidesPerView: "auto",
87
+ spaceBetween: 22
88
+ },
89
+ 640: {
90
+ slidesPerView: "auto",
91
+ spaceBetween: 25
92
+ },
93
+ 960: {
94
+ slidesPerView: "auto",
95
+ spaceBetween: 28
96
+ },
97
+ 1280: {
98
+ slidesPerView: "auto",
99
+ spaceBetween: 31
100
+ },
101
+ 1920: {
102
+ slidesPerView: "auto",
103
+ spaceBetween: 35
104
+ }
105
+ });
106
+ const props = defineProps({
107
+ type: {
108
+ type: String,
109
+ required: true
110
+ },
111
+ items: { type: Array, required: true },
112
+ loading: { type: Boolean, default: false },
113
+ dark: { type: Boolean, default: false },
114
+ more: { type: Boolean, default: true }
115
+ });
116
+ const spaceBetween = 10;
117
+ const onProgress = (e) => {
118
+ console.log("e: progress ", e);
119
+ const [swiper, progress] = e.detail;
120
+ console.log(progress);
121
+ };
122
+ const onSlideChange = (e) => {
123
+ console.log("slide changed", e);
124
+ };
125
+ const computedWidth = computed(() => {
126
+ let modifier = 1;
127
+ switch (props.type) {
128
+ case "events":
129
+ modifier = 1.1;
130
+ break;
131
+ case "people":
132
+ break;
133
+ case "image":
134
+ break;
135
+ default:
136
+ break;
137
+ }
138
+ return [250, 300, 350, 380, 430, 460][["xs", "sm", "md", "lg", "xl", "xxl"].indexOf(name.value || "md")] * modifier;
139
+ });
140
+ onMounted(() => {
141
+ console.log("Resolved Item", capitalize(props.type) + "SlidingItem");
142
+ });
143
+ </script>
144
+
145
+ <style scoped>
146
+ .swiper-slide{width:auto}
147
+ </style>
@@ -0,0 +1,13 @@
1
+ <template>
2
+ GRID DISPLAY
3
+ <template v-for="(item, index) in items" :key="index">
4
+ <slot name="data" :item="item" />
5
+ </template>
6
+ </template>
7
+
8
+ <script setup>
9
+ const props = defineProps({
10
+ items: [Object],
11
+ type: String
12
+ });
13
+ </script>
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <div>
3
+ {{ item.name }}
4
+ </div>
5
+ </template>
6
+
7
+ <script setup>
8
+ const props = defineProps({
9
+ item: {
10
+ type: Object,
11
+ required: true
12
+ }
13
+ });
14
+ </script>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ {{ item }}
3
+ </template>
4
+
5
+ <script setup>
6
+ defineProps({
7
+ item: {
8
+ type: Object,
9
+ required: true
10
+ }
11
+ });
12
+ </script>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ {{ item }}
3
+ </template>
4
+
5
+ <script setup>
6
+ import { useNuxtApp } from "#imports";
7
+ const { $stores } = useNuxtApp();
8
+ defineProps({
9
+ item: {
10
+ type: Object,
11
+ required: true
12
+ },
13
+ loading: {
14
+ type: Boolean,
15
+ required: false,
16
+ default: false
17
+ }
18
+ });
19
+ $stores.mailing.loading = false;
20
+ </script>
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <v-skeleton-loader
3
+ v-if="loading"
4
+ max-width="120px"
5
+ class="d-flex flex-row flex-md-column align-center align-md-end"
6
+ :type="
7
+ ['avatar', 'avatar', 'avatar', 'avatar', 'avatar', 'avatar'][
8
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
9
+ ]
10
+ "
11
+ />
12
+ <div
13
+ v-else
14
+ class="date-stamp d-flex flex-md-column text-md-right align-center align-md-end"
15
+ >
16
+ <span class="day"> {{ detailedDateStart.day }}</span>
17
+ <span class="month-year">
18
+ {{ detailedDateStart.month }}<br />
19
+ {{ detailedDateStart.year }}
20
+ </span>
21
+ <template v-if="showDateStop && detailedDateStop.day">
22
+ <span>&ndash;</span>
23
+ <template v-if="mdAndUp">
24
+ <span class="month-year"> {{ detailedDateStop.day }}</span>
25
+ <span class="month-year">
26
+ {{ detailedDateStop.month }}<br />
27
+ {{ detailedDateStop.year }}
28
+ </span>
29
+ </template>
30
+
31
+ <template v-if="smAndDown">
32
+ <span class="day"> {{ detailedDateStop.day }}</span>
33
+ <span class="month-year">
34
+ {{ detailedDateStop.month }}<br />
35
+ {{ detailedDateStop.year }}
36
+ </span>
37
+ </template>
38
+ </template>
39
+ </div>
40
+ </template>
41
+
42
+ <script setup>
43
+ import { useDisplay } from "vuetify";
44
+ import {
45
+ getDetailedFormatedDate,
46
+ formatDateValue
47
+ } from "../../../composables/useUtils";
48
+ import { computed, useI18n } from "#imports";
49
+ const { smAndDown, mdAndUp, name } = useDisplay();
50
+ const { locale } = useI18n();
51
+ const props = defineProps({
52
+ dateStart: {
53
+ type: String
54
+ },
55
+ dateStop: {
56
+ type: String
57
+ },
58
+ loading: {
59
+ type: Boolean,
60
+ default: false,
61
+ required: true
62
+ }
63
+ });
64
+ const detailedDateStart = computed(
65
+ () => getDetailedFormatedDate(props.dateStart, locale.value)
66
+ );
67
+ const detailedDateStop = computed(
68
+ () => getDetailedFormatedDate(props.dateStop, locale.value)
69
+ );
70
+ const showDateStop = computed(() => {
71
+ const dateStartFormatted = formatDateValue(props.dateStart, locale.value);
72
+ const dateStopFormatted = formatDateValue(props.dateStop, locale.value);
73
+ return dateStopFormatted > dateStartFormatted;
74
+ });
75
+ </script>
76
+
77
+ <style scoped>
78
+ .date-stamp {
79
+ font-family: "Open sans";
80
+ }
81
+ .date-stamp .day {
82
+ font-size: 2.6rem;
83
+ line-height: 2.6rem;
84
+ font-family: "Bodoni Moda", sans-serif;
85
+ }
86
+ .date-stamp .month-year {
87
+ padding-left: 0.5rem;
88
+ font-size: 1rem;
89
+ line-height: 1.2rem;
90
+ }
91
+ .date-stamp .day-stop {
92
+ font-size: 2rem;
93
+ line-height: 2rem;
94
+ font-family: "Bodoni Moda", sans-serif;
95
+ }
96
+ .date-stamp .month-year-stop {
97
+ padding-left: 0.5rem;
98
+ font-size: 0.8rem;
99
+ line-height: 1.2rem;
100
+ }
101
+ </style>
@@ -0,0 +1,127 @@
1
+ <template>
2
+ <div>
3
+ <!-- TODO
4
+ - add skeleton UI
5
+ - test lazy-src
6
+ - validate requested quality
7
+ - Add conditional overlays slots (top left/right, bottom left/right/center for date, caption, copyright) -->
8
+
9
+ <v-skeleton-loader v-if="loading" height="100%" type="image" />
10
+
11
+ <template v-else>
12
+ <nuxt-link
13
+ v-if="link"
14
+ v-slot="{ navigate, isActive }"
15
+ :to="
16
+ localePath({
17
+ name: link,
18
+ params: { slug },
19
+ })
20
+ "
21
+ custom
22
+ >
23
+ <div class="overflow-hidden mw-100">
24
+ <!-- TODO debug why the picture is not displaying/sizing properly -->
25
+ <v-img
26
+ v-if="src"
27
+ :aspect-ratio="ratio"
28
+ :active="isActive"
29
+ :class="{ 'img-animation': animate }"
30
+ :lazy-src="
31
+ img(computedSrc, {
32
+ width,
33
+ quality: 70,
34
+ })
35
+ "
36
+ :src="
37
+ img(computedSrc, {
38
+ width,
39
+ quality: 70,
40
+ })
41
+ "
42
+ :srcset="_srcset.srcset"
43
+ :sizes="_srcset.sizes"
44
+ :title="caption"
45
+ v-bind="$attrs"
46
+ @click="navigate"
47
+ >
48
+ <slot />
49
+ </v-img></div
50
+ ></nuxt-link>
51
+ <div v-else class="overflow-hidden mw-100">
52
+ <!-- TODO debug why the picture is not displaying/sizing properly -->
53
+ <v-img
54
+ v-if="src"
55
+ :aspect-ratio="ratio"
56
+ :class="{ 'img-animation': animate }"
57
+ :lazy-src="
58
+ img(computedSrc, {
59
+ width,
60
+ quality: 70,
61
+ })
62
+ "
63
+ :src="
64
+ img(computedSrc, {
65
+ width,
66
+ quality: 70,
67
+ })
68
+ "
69
+ :srcset="_srcset.srcset"
70
+ :sizes="_srcset.sizes"
71
+ :title="caption"
72
+ v-bind="$attrs"
73
+ >
74
+ <slot />
75
+ </v-img>
76
+ </div>
77
+ </template>
78
+ </div>
79
+ </template>
80
+
81
+ <script setup>
82
+ import { computed, useImage, useLocalePath } from "#imports";
83
+ const localePath = useLocalePath();
84
+ const img = useImage();
85
+ const computedSrc = computed(() => {
86
+ return typeof props.src === "string" ? props.src : props.src.url;
87
+ });
88
+ const props = defineProps({
89
+ src: {
90
+ type: [Object, String],
91
+ required: false,
92
+ default: {
93
+ alt: "default",
94
+ copyright: "IEA PARIS",
95
+ url: "/logo_grey.png"
96
+ }
97
+ },
98
+ loading: {
99
+ type: Boolean,
100
+ default: false,
101
+ required: true
102
+ },
103
+ width: { type: Number, default: 0 },
104
+ ratio: { type: Number, required: true, default: 1 },
105
+ caption: { type: String, default: "" },
106
+ slug: { type: String, default: "" },
107
+ link: { type: String, default: "" },
108
+ animate: { type: Boolean, default: true }
109
+ });
110
+ const _srcset = computed(() => {
111
+ return img.getSizes(
112
+ typeof props.src === "string" ? props.src : props.src.url,
113
+ {
114
+ sizes: "xs:100vw sm:100vw md:100vw lg:100vw xl:100vw",
115
+ modifiers: {
116
+ format: "webp",
117
+ quality: 70,
118
+ ...props.width && { width: props.width }
119
+ }
120
+ }
121
+ );
122
+ });
123
+ </script>
124
+
125
+ <style scoped>
126
+ .img-animation{transition:all .5s ease-in-out;width:100%}.img-animation:hover{transform:scale(1.1)}
127
+ </style>
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <v-menu>
3
+ <template #activator="{ props: menu }">
4
+ <v-tooltip location="top">
5
+ <template #activator="{ props: tooltip }">
6
+ <v-btn variant="outlined" v-bind="mergeProps(menu, tooltip)">
7
+ <v-icon>mdi-share-variant</v-icon>
8
+ </v-btn>
9
+ </template>
10
+ <div v-html="$t('share')" />
11
+ </v-tooltip>
12
+ </template>
13
+ <v-list>
14
+ <v-list-item
15
+ v-for="(network, index) in networks"
16
+ :key="network"
17
+ :value="network"
18
+ >
19
+ <!-- <SocialShare
20
+ :key="network"
21
+ class="text-black"
22
+ :network="network"
23
+ :title="$t('share-this-on', { item: item.name })"
24
+ :aria-label="$t('share-on', { network: network })"
25
+ :image="item.image"
26
+ :hashtags="item.tags.map((tag) => tag.name)"
27
+ :url="config.url + route.fullPath"
28
+ >
29
+ <template #label>
30
+ {{ network }}
31
+ </template>
32
+ </SocialShare> -->
33
+ </v-list-item>
34
+ </v-list>
35
+ </v-menu>
36
+ </template>
37
+
38
+ <script setup>
39
+ import { mergeProps } from "vue";
40
+ import { useRoute } from "#imports";
41
+ const route = useRoute();
42
+ const props = defineProps({
43
+ networks: {
44
+ type: Array,
45
+ default: [
46
+ "facebook",
47
+ "twitter",
48
+ "linkedin",
49
+ "email",
50
+ "pinterest",
51
+ "reddit",
52
+ "whatsapp",
53
+ "pocket"
54
+ ]
55
+ },
56
+ item: {
57
+ type: Object,
58
+ required: true
59
+ }
60
+ });
61
+ </script>
@@ -0,0 +1,120 @@
1
+ <template>
2
+ <v-row no-gutters>
3
+ <v-col>
4
+ <template v-for="(value, key, index) in socials" :key="key + value">
5
+ <v-tooltip v-if="value" :location="location">
6
+ <template #activator="{ props }">
7
+ <v-btn
8
+ tile
9
+ v-bind="mergeProps(props, attrs)"
10
+ target="_blank"
11
+ :href="getSocialId(key, value)"
12
+ :color="dark ? 'transparent' : 'white'"
13
+ flat
14
+ >
15
+ <v-icon :color="dark ? 'white' : 'black'">
16
+ {{ getProfileIcon(key) }}</v-icon
17
+ >
18
+ <div v-if="labelled" class="text-uppercase text-muted ml-3">
19
+ {{ key }}
20
+ </div>
21
+ </v-btn>
22
+ </template>
23
+ <span>{{ $t("socials." + key) }}</span>
24
+ </v-tooltip>
25
+ <br v-if="labelled" />
26
+ </template>
27
+ </v-col>
28
+ </v-row>
29
+ </template>
30
+
31
+ <script setup>
32
+ import { useAttrs, mergeProps } from "vue";
33
+ import { useDisplay } from "vuetify";
34
+ const attrs = useAttrs();
35
+ const { name } = useDisplay();
36
+ const props = defineProps({
37
+ socials: {
38
+ type: Object,
39
+ required: true
40
+ },
41
+ location: {
42
+ type: String,
43
+ default: "bottom"
44
+ },
45
+ dark: {
46
+ type: Boolean,
47
+ default: false
48
+ },
49
+ labelled: {
50
+ type: Boolean,
51
+ default: false
52
+ }
53
+ });
54
+ const getSocialId = (name2, id) => {
55
+ switch (name2) {
56
+ case "idRef":
57
+ return `https://www.idref.fr/${id}`;
58
+ case "mendeley":
59
+ return `https://www.mendeley.com/${id}`;
60
+ case "linkedin":
61
+ return `https://www.linkedin.com/company/${id}`;
62
+ case "twitter":
63
+ return `https://x.com/${id}`;
64
+ case "orcid":
65
+ return `https://orcid.org/${id}`;
66
+ case "scholar":
67
+ return `https://scholar.google.com/${id}`;
68
+ case "wikipedia":
69
+ return `https://fr.wikipedia.org/${id}`;
70
+ case "researchgate":
71
+ return `https://www.researchgate.net/${id}`;
72
+ case "youtube":
73
+ return `https://www.youtube.com/${id}`;
74
+ case "facebook":
75
+ return `https://www.facebook.com/pages/${id}`;
76
+ case "instagram":
77
+ return `https://www.instagram.com/${id}`;
78
+ case "github":
79
+ return `https://gitbub.com/${id}`;
80
+ case "rss":
81
+ return "";
82
+ case "website":
83
+ return "";
84
+ }
85
+ };
86
+ const getProfileIcon = (name2) => {
87
+ switch (name2) {
88
+ case "idRef":
89
+ return "mdi-account-plus-outline";
90
+ case "mendeley":
91
+ return "mdi-book";
92
+ case "bluesky":
93
+ return "mdi-cloud";
94
+ case "linkedin":
95
+ return "mdi-linkedin";
96
+ case "twitter":
97
+ return "mdi-twitter";
98
+ case "orcid":
99
+ return "mdi-account";
100
+ case "scholar":
101
+ return "mdi-google";
102
+ case "wikipedia":
103
+ return "mdi-wikipedia";
104
+ case "researchgate":
105
+ return "mdi-account";
106
+ case "youtube":
107
+ return "mdi-youtube";
108
+ case "facebook":
109
+ return "mdi-facebook";
110
+ case "instagram":
111
+ return "mdi-instagram";
112
+ case "github":
113
+ return "mdi-github";
114
+ case "rss":
115
+ return "mdi-rss";
116
+ case "website":
117
+ return "mdi-web";
118
+ }
119
+ };
120
+ </script>
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <div class="d-flex flex-row flex-wrap" v-bind="attrs">
3
+ <div v-for="(tag, index) in items" :key="tag + index" class="">
4
+ <v-chip
5
+ :size="
6
+ ['small', 'small', 'small', 'default', 'large'][
7
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
8
+ ]
9
+ "
10
+ class="mr-2 mt-2"
11
+ variant="outlined"
12
+ label
13
+ >{{ tag }}</v-chip
14
+ >
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <script setup>
20
+ import { useAttrs } from "vue";
21
+ import { useDisplay } from "vuetify";
22
+ const attrs = useAttrs();
23
+ const { name, md, xl, lg, smAndDown, mdAndUp } = useDisplay();
24
+ const props = defineProps({
25
+ items: {
26
+ type: Array,
27
+ required: true,
28
+ default: []
29
+ }
30
+ });
31
+ </script>