@paris-ias/list 1.0.10 → 1.0.13
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 +71 -51
- package/dist/module.d.mts +8 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +64 -0
- package/dist/runtime/components/events/Badges.vue +5 -7
- package/dist/runtime/components/events/DateTimePlace.vue +11 -13
- package/dist/runtime/components/events/DenseItem.vue +7 -6
- package/dist/runtime/components/events/ExpandedItem.vue +3 -5
- package/dist/runtime/components/events/ListContainer.vue +6 -6
- package/dist/runtime/components/events/RegisterModal.vue +4 -5
- package/dist/runtime/components/events/RelatedItem.vue +6 -7
- package/dist/runtime/components/events/RowsItem.vue +12 -11
- package/dist/runtime/components/events/View.vue +10 -13
- package/dist/runtime/components/fellowships/Badges.vue +12 -15
- package/dist/runtime/components/fellowships/DenseItem.vue +7 -7
- package/dist/runtime/components/fellowships/RegisterModal.vue +3 -2
- package/dist/runtime/components/fellowships/RowsItem.vue +19 -21
- package/dist/runtime/components/fellowships/View.vue +43 -49
- package/dist/runtime/components/list/atoms/FiltersMenu.vue +6 -8
- package/dist/runtime/components/list/atoms/SearchInput.vue +42 -50
- package/dist/runtime/components/list/atoms/SearchItem.vue +14 -14
- package/dist/runtime/components/list/atoms/SearchString.vue +6 -7
- package/dist/runtime/components/list/atoms/SortMenu.vue +23 -40
- package/dist/runtime/components/list/atoms/ViewMenu.vue +14 -22
- package/dist/runtime/components/list/inputs/AutoComplete.vue +9 -9
- package/dist/runtime/components/list/inputs/BooleanSwitch.vue +9 -9
- package/dist/runtime/components/list/inputs/Checkbox.vue +11 -11
- package/dist/runtime/components/list/inputs/Select.vue +11 -11
- package/dist/runtime/components/list/molecules/Filters.vue +27 -42
- package/dist/runtime/components/list/molecules/Header.vue +5 -7
- package/dist/runtime/components/list/molecules/Pagination.vue +60 -102
- package/dist/runtime/components/list/organisms/List.vue +28 -36
- package/dist/runtime/components/list/views/Dense.vue +1 -14
- package/dist/runtime/components/list/views/Grid.vue +3 -3
- package/dist/runtime/components/list/views/Rows.vue +3 -3
- package/dist/runtime/components/list/views/Table.vue +3 -3
- package/dist/runtime/components/misc/atoms/CountUp.vue +89 -144
- package/dist/runtime/components/misc/atoms/DateStamp.vue +42 -46
- package/dist/runtime/components/misc/atoms/ImageContainer.vue +14 -22
- package/dist/runtime/components/misc/atoms/ShareMenu.vue +9 -11
- package/dist/runtime/components/misc/atoms/Socials.vue +46 -52
- package/dist/runtime/components/misc/molecules/ChipContainer.vue +7 -11
- package/dist/runtime/components/misc/molecules/Related.vue +9 -11
- package/dist/runtime/components/misc/molecules/RelatedItems.vue +7 -9
- package/dist/runtime/components/misc/molecules/SearchItem.vue +2 -2
- package/dist/runtime/components/news/DenseItem.vue +15 -15
- package/dist/runtime/components/news/ExpandedItem.vue +40 -50
- package/dist/runtime/components/news/Header.vue +3 -5
- package/dist/runtime/components/news/RelatedItem.vue +6 -7
- package/dist/runtime/components/news/RowsItem.vue +14 -16
- package/dist/runtime/components/news/View.vue +9 -20
- package/dist/runtime/components/people/DenseItem.vue +9 -8
- package/dist/runtime/components/people/ExpandedItem.vue +4 -6
- package/dist/runtime/components/people/GroupBadges.vue +6 -8
- package/dist/runtime/components/people/RelatedItem.vue +6 -7
- package/dist/runtime/components/people/RowsItem.vue +12 -19
- package/dist/runtime/components/people/View.vue +7 -7
- package/dist/runtime/components/projects/ExpandedItem.vue +4 -6
- package/dist/runtime/components/projects/RelatedItem.vue +6 -7
- package/dist/runtime/components/projects/RowsItem.vue +21 -26
- package/dist/runtime/components/projects/View.vue +8 -8
- package/dist/runtime/components/publications/RelatedItem.vue +6 -7
- package/dist/runtime/components/publications/RowsItem.vue +20 -22
- package/dist/runtime/components/publications/View.vue +9 -15
- package/dist/runtime/composables/useFetchItem.d.ts +6 -0
- package/dist/runtime/composables/useFetchItem.js +49 -0
- package/dist/runtime/composables/useIcons.d.ts +1 -0
- package/dist/runtime/composables/useIcons.js +30 -0
- package/dist/runtime/composables/useUtils.d.ts +12 -0
- package/dist/runtime/composables/useUtils.js +47 -0
- package/dist/runtime/plugins/pinia.d.ts +2 -0
- package/dist/runtime/plugins/pinia.js +69 -0
- package/dist/runtime/plugins/vuetify.d.ts +2 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/stores/factory.d.ts +1 -0
- package/dist/runtime/stores/{factory.ts → factory.js} +9 -9
- package/dist/runtime/stores/root.d.ts +34 -0
- package/dist/runtime/stores/root.js +227 -0
- package/dist/types.d.mts +3 -0
- package/package.json +55 -26
- package/dist/runtime/composables/useFetchItem.ts +0 -64
- package/dist/runtime/composables/useIcons.ts +0 -30
- package/dist/runtime/composables/useUtils.ts +0 -75
- package/dist/runtime/plugins/pinia.ts +0 -88
- package/dist/runtime/stores/root.ts +0 -353
- package/example/.env.example +0 -3
- package/example/nuxt.config.ts +0 -19
- package/example/pages/index.vue +0 -27
- package/index.ts +0 -119
|
@@ -2,197 +2,142 @@
|
|
|
2
2
|
<span> {{ displayedAmount }}</span>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
|
-
<script setup
|
|
6
|
-
/*
|
|
7
|
-
/!\ This component is a port by Antoine Cordelois
|
|
8
|
-
of the vue3-autocounter package made by ps-christopher
|
|
9
|
-
into a nuxt composition API component.
|
|
10
|
-
|
|
11
|
-
Source code is here: https://github.com/ps-cristopher/vue3-autocounter/blob/master/src/vue3-autocounter.vue
|
|
12
|
-
*/
|
|
13
|
-
interface Data {
|
|
14
|
-
timestamp: number
|
|
15
|
-
startTimestamp: number | null
|
|
16
|
-
currentStartAmount: number
|
|
17
|
-
currentAmount: number
|
|
18
|
-
currentDuration: number
|
|
19
|
-
paused: boolean
|
|
20
|
-
remaining: number
|
|
21
|
-
animationFrame: number
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Props
|
|
5
|
+
<script setup>
|
|
25
6
|
const props = defineProps({
|
|
26
7
|
startAmount: {
|
|
27
8
|
type: Number,
|
|
28
|
-
default: 0
|
|
9
|
+
default: 0
|
|
29
10
|
},
|
|
30
11
|
endAmount: {
|
|
31
12
|
type: Number,
|
|
32
13
|
default: 0,
|
|
33
|
-
required: true
|
|
14
|
+
required: true
|
|
34
15
|
},
|
|
35
16
|
duration: {
|
|
36
17
|
type: Number,
|
|
37
18
|
default: 3,
|
|
38
|
-
validator(duration
|
|
39
|
-
return duration > 0
|
|
40
|
-
}
|
|
19
|
+
validator(duration) {
|
|
20
|
+
return duration > 0;
|
|
21
|
+
}
|
|
41
22
|
},
|
|
42
23
|
autoinit: {
|
|
43
24
|
type: Boolean,
|
|
44
|
-
default: true
|
|
25
|
+
default: true
|
|
45
26
|
},
|
|
46
27
|
prefix: {
|
|
47
28
|
type: String,
|
|
48
|
-
default: ""
|
|
29
|
+
default: ""
|
|
49
30
|
},
|
|
50
31
|
suffix: {
|
|
51
32
|
type: String,
|
|
52
|
-
default: ""
|
|
33
|
+
default: ""
|
|
53
34
|
},
|
|
54
35
|
separator: {
|
|
55
36
|
type: String,
|
|
56
|
-
default: ","
|
|
37
|
+
default: ","
|
|
57
38
|
},
|
|
58
39
|
decimalSeparator: {
|
|
59
40
|
type: String,
|
|
60
|
-
default: "."
|
|
41
|
+
default: "."
|
|
61
42
|
},
|
|
62
43
|
decimals: {
|
|
63
44
|
type: Number,
|
|
64
45
|
default: 0,
|
|
65
|
-
validator(decimals
|
|
66
|
-
return decimals >= 0
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
// Reactive state
|
|
72
|
-
const state = reactive<Data>({
|
|
46
|
+
validator(decimals) {
|
|
47
|
+
return decimals >= 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const state = reactive({
|
|
73
52
|
timestamp: 0,
|
|
74
53
|
startTimestamp: null,
|
|
75
54
|
currentAmount: props.startAmount,
|
|
76
55
|
currentStartAmount: props.startAmount,
|
|
77
|
-
currentDuration: props.duration *
|
|
56
|
+
currentDuration: props.duration * 1e3,
|
|
78
57
|
paused: false,
|
|
79
|
-
remaining: props.duration *
|
|
80
|
-
animationFrame: 0
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
let numbers: string = numberArray[0]
|
|
91
|
-
const decimals: string =
|
|
92
|
-
numberArray.length > 1 ? props.decimalSeparator + numberArray[1] : ""
|
|
93
|
-
const isNumber = !isNaN(parseFloat(props.separator))
|
|
94
|
-
|
|
58
|
+
remaining: props.duration * 1e3,
|
|
59
|
+
animationFrame: 0
|
|
60
|
+
});
|
|
61
|
+
const isCountingUp = computed(() => props.endAmount > props.startAmount);
|
|
62
|
+
const formatedAmount = computed(() => {
|
|
63
|
+
const regex = /(\d+)(\d{3})/;
|
|
64
|
+
const numberString = state.currentAmount.toFixed(props.decimals);
|
|
65
|
+
const numberArray = numberString.split(".");
|
|
66
|
+
let numbers = numberArray[0];
|
|
67
|
+
const decimals = numberArray.length > 1 ? props.decimalSeparator + numberArray[1] : "";
|
|
68
|
+
const isNumber = !isNaN(parseFloat(props.separator));
|
|
95
69
|
if (props.separator && !isNumber) {
|
|
96
70
|
while (regex.test(numbers)) {
|
|
97
|
-
numbers = numbers.replace(regex, "$1" + props.separator + "$2")
|
|
71
|
+
numbers = numbers.replace(regex, "$1" + props.separator + "$2");
|
|
98
72
|
}
|
|
99
73
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
})
|
|
103
|
-
|
|
74
|
+
return numbers + decimals;
|
|
75
|
+
});
|
|
104
76
|
const displayedAmount = computed(
|
|
105
77
|
() => `${props.prefix}${formatedAmount.value}${props.suffix}`
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
state.
|
|
113
|
-
state.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
state.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
state.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
state.
|
|
130
|
-
state.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
state.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
const counting = (timestamp: number): void => {
|
|
144
|
-
state.timestamp = timestamp
|
|
145
|
-
if (!state.startTimestamp) state.startTimestamp = timestamp
|
|
146
|
-
const progress: number = timestamp - state.startTimestamp
|
|
147
|
-
state.remaining = state.currentDuration - progress
|
|
148
|
-
|
|
78
|
+
);
|
|
79
|
+
const start = () => {
|
|
80
|
+
cancelAnimation();
|
|
81
|
+
state.currentStartAmount = props.startAmount;
|
|
82
|
+
state.startTimestamp = null;
|
|
83
|
+
state.currentDuration = props.duration * 1e3;
|
|
84
|
+
state.paused = false;
|
|
85
|
+
state.animationFrame = window.requestAnimationFrame(counting);
|
|
86
|
+
};
|
|
87
|
+
const pause = () => {
|
|
88
|
+
if (state.paused) return;
|
|
89
|
+
cancelAnimation();
|
|
90
|
+
state.paused = true;
|
|
91
|
+
};
|
|
92
|
+
const resume = () => {
|
|
93
|
+
if (!state.paused) return;
|
|
94
|
+
state.startTimestamp = null;
|
|
95
|
+
state.currentDuration = +state.remaining;
|
|
96
|
+
state.currentStartAmount = +state.currentAmount;
|
|
97
|
+
state.animationFrame = window.requestAnimationFrame(counting);
|
|
98
|
+
state.paused = false;
|
|
99
|
+
};
|
|
100
|
+
const reset = () => {
|
|
101
|
+
state.paused = false;
|
|
102
|
+
state.startTimestamp = null;
|
|
103
|
+
cancelAnimation();
|
|
104
|
+
state.currentAmount = props.startAmount;
|
|
105
|
+
if (props.autoinit) start();
|
|
106
|
+
else state.paused = true;
|
|
107
|
+
};
|
|
108
|
+
const counting = (timestamp) => {
|
|
109
|
+
state.timestamp = timestamp;
|
|
110
|
+
if (!state.startTimestamp) state.startTimestamp = timestamp;
|
|
111
|
+
const progress = timestamp - state.startTimestamp;
|
|
112
|
+
state.remaining = state.currentDuration - progress;
|
|
149
113
|
if (!isCountingUp.value) {
|
|
150
|
-
state.currentAmount =
|
|
151
|
-
|
|
152
|
-
(state.currentStartAmount - props.endAmount) *
|
|
153
|
-
(progress / state.currentDuration)
|
|
154
|
-
state.currentAmount =
|
|
155
|
-
state.currentAmount < props.endAmount
|
|
156
|
-
? props.endAmount
|
|
157
|
-
: state.currentAmount
|
|
114
|
+
state.currentAmount = state.currentStartAmount - (state.currentStartAmount - props.endAmount) * (progress / state.currentDuration);
|
|
115
|
+
state.currentAmount = state.currentAmount < props.endAmount ? props.endAmount : state.currentAmount;
|
|
158
116
|
} else {
|
|
159
|
-
state.currentAmount =
|
|
160
|
-
|
|
161
|
-
(props.endAmount - state.currentStartAmount) *
|
|
162
|
-
(progress / state.currentDuration)
|
|
163
|
-
state.currentAmount =
|
|
164
|
-
state.currentAmount > props.endAmount
|
|
165
|
-
? props.endAmount
|
|
166
|
-
: state.currentAmount
|
|
117
|
+
state.currentAmount = state.currentStartAmount + (props.endAmount - state.currentStartAmount) * (progress / state.currentDuration);
|
|
118
|
+
state.currentAmount = state.currentAmount > props.endAmount ? props.endAmount : state.currentAmount;
|
|
167
119
|
}
|
|
168
|
-
|
|
169
120
|
if (progress < state.currentDuration) {
|
|
170
|
-
state.animationFrame = window.requestAnimationFrame(counting)
|
|
121
|
+
state.animationFrame = window.requestAnimationFrame(counting);
|
|
171
122
|
} else {
|
|
172
|
-
console.log("finished")
|
|
123
|
+
console.log("finished");
|
|
173
124
|
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
watch(() => props.startAmount, reset)
|
|
182
|
-
watch(() => props.endAmount, reset)
|
|
183
|
-
watch(() => props.duration, reset)
|
|
184
|
-
|
|
185
|
-
// Lifecycle hooks
|
|
125
|
+
};
|
|
126
|
+
const cancelAnimation = () => {
|
|
127
|
+
if (state.animationFrame) window.cancelAnimationFrame(state.animationFrame);
|
|
128
|
+
};
|
|
129
|
+
watch(() => props.startAmount, reset);
|
|
130
|
+
watch(() => props.endAmount, reset);
|
|
131
|
+
watch(() => props.duration, reset);
|
|
186
132
|
onMounted(() => {
|
|
187
|
-
state.currentAmount = props.startAmount
|
|
188
|
-
state.currentStartAmount = props.startAmount
|
|
189
|
-
state.currentDuration = props.duration *
|
|
190
|
-
state.remaining = props.duration *
|
|
191
|
-
if (props.autoinit) start()
|
|
192
|
-
else state.paused = true
|
|
193
|
-
})
|
|
194
|
-
|
|
133
|
+
state.currentAmount = props.startAmount;
|
|
134
|
+
state.currentStartAmount = props.startAmount;
|
|
135
|
+
state.currentDuration = props.duration * 1e3;
|
|
136
|
+
state.remaining = props.duration * 1e3;
|
|
137
|
+
if (props.autoinit) start();
|
|
138
|
+
else state.paused = true;
|
|
139
|
+
});
|
|
195
140
|
onUnmounted(() => {
|
|
196
|
-
cancelAnimation()
|
|
197
|
-
})
|
|
141
|
+
cancelAnimation();
|
|
142
|
+
});
|
|
198
143
|
</script>
|
|
@@ -40,65 +40,61 @@
|
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
42
|
<script setup>
|
|
43
|
-
import { useDisplay } from "vuetify"
|
|
43
|
+
import { useDisplay } from "vuetify";
|
|
44
44
|
import {
|
|
45
45
|
getDetailedFormatedDate,
|
|
46
|
-
formatDateValue
|
|
47
|
-
} from "../../../composables/useUtils"
|
|
48
|
-
const { smAndDown, mdAndUp, name } = useDisplay()
|
|
49
|
-
|
|
50
|
-
const { locale } = useI18n()
|
|
46
|
+
formatDateValue
|
|
47
|
+
} from "../../../composables/useUtils";
|
|
48
|
+
const { smAndDown, mdAndUp, name } = useDisplay();
|
|
49
|
+
const { locale } = useI18n();
|
|
51
50
|
const props = defineProps({
|
|
52
51
|
dateStart: {
|
|
53
|
-
type: String
|
|
52
|
+
type: String
|
|
54
53
|
},
|
|
55
54
|
dateStop: {
|
|
56
|
-
type: String
|
|
55
|
+
type: String
|
|
57
56
|
},
|
|
58
57
|
loading: {
|
|
59
58
|
type: Boolean,
|
|
60
59
|
default: false,
|
|
61
|
-
required: true
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
getDetailedFormatedDate(props.dateStop, locale.value)
|
|
71
|
-
)
|
|
72
|
-
|
|
60
|
+
required: true
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
const detailedDateStart = computed(
|
|
64
|
+
() => getDetailedFormatedDate(props.dateStart, locale.value)
|
|
65
|
+
);
|
|
66
|
+
const detailedDateStop = computed(
|
|
67
|
+
() => getDetailedFormatedDate(props.dateStop, locale.value)
|
|
68
|
+
);
|
|
73
69
|
const showDateStop = computed(() => {
|
|
74
|
-
const dateStartFormatted = formatDateValue(props.dateStart, locale.value)
|
|
75
|
-
const dateStopFormatted = formatDateValue(props.dateStop, locale.value)
|
|
76
|
-
return dateStopFormatted > dateStartFormatted
|
|
77
|
-
})
|
|
70
|
+
const dateStartFormatted = formatDateValue(props.dateStart, locale.value);
|
|
71
|
+
const dateStopFormatted = formatDateValue(props.dateStop, locale.value);
|
|
72
|
+
return dateStopFormatted > dateStartFormatted;
|
|
73
|
+
});
|
|
78
74
|
</script>
|
|
79
|
-
|
|
75
|
+
|
|
76
|
+
<style scoped>
|
|
80
77
|
.date-stamp {
|
|
81
78
|
font-family: "Open sans";
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
79
|
+
}
|
|
80
|
+
.date-stamp .day {
|
|
81
|
+
font-size: 2.6rem;
|
|
82
|
+
line-height: 2.6rem;
|
|
83
|
+
font-family: "Bodoni Moda", sans-serif;
|
|
84
|
+
}
|
|
85
|
+
.date-stamp .month-year {
|
|
86
|
+
padding-left: 0.5rem;
|
|
87
|
+
font-size: 1rem;
|
|
88
|
+
line-height: 1.2rem;
|
|
89
|
+
}
|
|
90
|
+
.date-stamp .day-stop {
|
|
91
|
+
font-size: 2rem;
|
|
92
|
+
line-height: 2rem;
|
|
93
|
+
font-family: "Bodoni Moda", sans-serif;
|
|
94
|
+
}
|
|
95
|
+
.date-stamp .month-year-stop {
|
|
96
|
+
padding-left: 0.5rem;
|
|
97
|
+
font-size: 0.8rem;
|
|
98
|
+
line-height: 1.2rem;
|
|
103
99
|
}
|
|
104
100
|
</style>
|
|
@@ -50,12 +50,11 @@
|
|
|
50
50
|
</template>
|
|
51
51
|
|
|
52
52
|
<script setup>
|
|
53
|
-
const localePath = useLocalePath()
|
|
54
|
-
const img = useImage()
|
|
55
|
-
|
|
53
|
+
const localePath = useLocalePath();
|
|
54
|
+
const img = useImage();
|
|
56
55
|
const computedSrc = computed(() => {
|
|
57
|
-
return typeof props.src === "string" ? props.src : props.src.url
|
|
58
|
-
})
|
|
56
|
+
return typeof props.src === "string" ? props.src : props.src.url;
|
|
57
|
+
});
|
|
59
58
|
const props = defineProps({
|
|
60
59
|
src: {
|
|
61
60
|
type: [Object, String],
|
|
@@ -63,21 +62,21 @@ const props = defineProps({
|
|
|
63
62
|
default: {
|
|
64
63
|
alt: "default",
|
|
65
64
|
copyright: "IEA PARIS",
|
|
66
|
-
url: "/logo_grey.png"
|
|
67
|
-
}
|
|
65
|
+
url: "/logo_grey.png"
|
|
66
|
+
}
|
|
68
67
|
},
|
|
69
68
|
loading: {
|
|
70
69
|
type: Boolean,
|
|
71
70
|
default: false,
|
|
72
|
-
required: true
|
|
71
|
+
required: true
|
|
73
72
|
},
|
|
74
73
|
width: { type: Number, default: 0 },
|
|
75
74
|
ratio: { type: Number, required: true, default: 1 },
|
|
76
75
|
caption: { type: String, default: "" },
|
|
77
76
|
slug: { type: String, default: "" },
|
|
78
77
|
link: { type: String, default: "" },
|
|
79
|
-
animate: { type: Boolean, default: true }
|
|
80
|
-
})
|
|
78
|
+
animate: { type: Boolean, default: true }
|
|
79
|
+
});
|
|
81
80
|
const _srcset = computed(() => {
|
|
82
81
|
return img.getSizes(
|
|
83
82
|
typeof props.src === "string" ? props.src : props.src.url,
|
|
@@ -86,20 +85,13 @@ const _srcset = computed(() => {
|
|
|
86
85
|
modifiers: {
|
|
87
86
|
format: "webp",
|
|
88
87
|
quality: 70,
|
|
89
|
-
...
|
|
90
|
-
}
|
|
88
|
+
...props.width && { width: props.width }
|
|
89
|
+
}
|
|
91
90
|
}
|
|
92
|
-
)
|
|
93
|
-
})
|
|
91
|
+
);
|
|
92
|
+
});
|
|
94
93
|
</script>
|
|
95
94
|
|
|
96
95
|
<style scoped>
|
|
97
|
-
.img-animation {
|
|
98
|
-
transition: all 0.5s ease-in-out;
|
|
99
|
-
width: 100%;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.img-animation:hover {
|
|
103
|
-
transform: scale(1.1);
|
|
104
|
-
}
|
|
96
|
+
.img-animation{transition:all .5s ease-in-out;width:100%}.img-animation:hover{transform:scale(1.1)}
|
|
105
97
|
</style>
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
</v-list>
|
|
32
32
|
</v-menu>
|
|
33
33
|
</template>
|
|
34
|
-
<script setup>
|
|
35
|
-
import config from "~/static.config"
|
|
36
|
-
import { mergeProps } from "vue"
|
|
37
|
-
const route = useRoute()
|
|
38
34
|
|
|
35
|
+
<script setup>
|
|
36
|
+
import config from "~/static.config";
|
|
37
|
+
import { mergeProps } from "vue";
|
|
38
|
+
const route = useRoute();
|
|
39
39
|
const props = defineProps({
|
|
40
40
|
networks: {
|
|
41
41
|
type: Array,
|
|
@@ -47,14 +47,12 @@ const props = defineProps({
|
|
|
47
47
|
"pinterest",
|
|
48
48
|
"reddit",
|
|
49
49
|
"whatsapp",
|
|
50
|
-
"pocket"
|
|
51
|
-
]
|
|
50
|
+
"pocket"
|
|
51
|
+
]
|
|
52
52
|
},
|
|
53
53
|
item: {
|
|
54
54
|
type: Object,
|
|
55
|
-
required: true
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
/* console.log("PRPOS", props.item) */
|
|
55
|
+
required: true
|
|
56
|
+
}
|
|
57
|
+
});
|
|
60
58
|
</script>
|
|
@@ -29,99 +29,93 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script setup>
|
|
32
|
-
import { useAttrs } from "vue"
|
|
33
|
-
import { mergeProps } from "vue"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const { name } = useDisplay()
|
|
38
|
-
|
|
32
|
+
import { useAttrs } from "vue";
|
|
33
|
+
import { mergeProps } from "vue";
|
|
34
|
+
const attrs = useAttrs();
|
|
35
|
+
import { useDisplay } from "vuetify";
|
|
36
|
+
const { name } = useDisplay();
|
|
39
37
|
const props = defineProps({
|
|
40
38
|
socials: {
|
|
41
39
|
type: Object,
|
|
42
|
-
required: true
|
|
40
|
+
required: true
|
|
43
41
|
},
|
|
44
42
|
location: {
|
|
45
43
|
type: String,
|
|
46
|
-
default: "bottom"
|
|
44
|
+
default: "bottom"
|
|
47
45
|
},
|
|
48
46
|
dark: {
|
|
49
47
|
type: Boolean,
|
|
50
|
-
default: false
|
|
48
|
+
default: false
|
|
51
49
|
},
|
|
52
50
|
labelled: {
|
|
53
51
|
type: Boolean,
|
|
54
|
-
default: false
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
switch (name) {
|
|
52
|
+
default: false
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const getSocialId = (name2, id) => {
|
|
56
|
+
switch (name2) {
|
|
60
57
|
case "idRef":
|
|
61
|
-
return `https://www.idref.fr/${id}
|
|
58
|
+
return `https://www.idref.fr/${id}`;
|
|
62
59
|
case "mendeley":
|
|
63
|
-
return `https://www.mendeley.com/${id}
|
|
60
|
+
return `https://www.mendeley.com/${id}`;
|
|
64
61
|
case "linkedin":
|
|
65
|
-
return `https://www.linkedin.com/company/${id}
|
|
62
|
+
return `https://www.linkedin.com/company/${id}`;
|
|
66
63
|
case "twitter":
|
|
67
|
-
return `https://x.com/${id}
|
|
64
|
+
return `https://x.com/${id}`;
|
|
68
65
|
case "orcid":
|
|
69
|
-
return `https://orcid.org/${id}
|
|
66
|
+
return `https://orcid.org/${id}`;
|
|
70
67
|
case "scholar":
|
|
71
|
-
return `https://scholar.google.com/${id}
|
|
68
|
+
return `https://scholar.google.com/${id}`;
|
|
72
69
|
case "wikipedia":
|
|
73
|
-
return `https://fr.wikipedia.org/${id}
|
|
70
|
+
return `https://fr.wikipedia.org/${id}`;
|
|
74
71
|
case "researchgate":
|
|
75
|
-
return `https://www.researchgate.net/${id}
|
|
72
|
+
return `https://www.researchgate.net/${id}`;
|
|
76
73
|
case "youtube":
|
|
77
|
-
return `https://www.youtube.com/${id}
|
|
74
|
+
return `https://www.youtube.com/${id}`;
|
|
78
75
|
case "facebook":
|
|
79
|
-
return `https://www.facebook.com/pages/${id}
|
|
76
|
+
return `https://www.facebook.com/pages/${id}`;
|
|
80
77
|
case "instagram":
|
|
81
|
-
return `https://www.instagram.com/${id}
|
|
78
|
+
return `https://www.instagram.com/${id}`;
|
|
82
79
|
case "github":
|
|
83
|
-
return `https://gitbub.com/${id}
|
|
80
|
+
return `https://gitbub.com/${id}`;
|
|
84
81
|
case "rss":
|
|
85
|
-
return ""
|
|
82
|
+
return "";
|
|
86
83
|
case "website":
|
|
87
|
-
return ""
|
|
84
|
+
return "";
|
|
88
85
|
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
switch (name) {
|
|
86
|
+
};
|
|
87
|
+
const getProfileIcon = (name2) => {
|
|
88
|
+
switch (name2) {
|
|
93
89
|
case "idRef":
|
|
94
|
-
return "mdi-account-plus-outline"
|
|
90
|
+
return "mdi-account-plus-outline";
|
|
95
91
|
case "mendeley":
|
|
96
|
-
return "mdi-book"
|
|
92
|
+
return "mdi-book";
|
|
97
93
|
case "bluesky":
|
|
98
|
-
return "mdi-cloud"
|
|
94
|
+
return "mdi-cloud";
|
|
99
95
|
case "linkedin":
|
|
100
|
-
return "mdi-linkedin"
|
|
96
|
+
return "mdi-linkedin";
|
|
101
97
|
case "twitter":
|
|
102
|
-
return "mdi-twitter"
|
|
98
|
+
return "mdi-twitter";
|
|
103
99
|
case "orcid":
|
|
104
|
-
return "mdi-account"
|
|
100
|
+
return "mdi-account";
|
|
105
101
|
case "scholar":
|
|
106
|
-
return "mdi-google"
|
|
102
|
+
return "mdi-google";
|
|
107
103
|
case "wikipedia":
|
|
108
|
-
return "mdi-wikipedia"
|
|
104
|
+
return "mdi-wikipedia";
|
|
109
105
|
case "researchgate":
|
|
110
|
-
return "mdi-account"
|
|
106
|
+
return "mdi-account";
|
|
111
107
|
case "youtube":
|
|
112
|
-
return "mdi-youtube"
|
|
108
|
+
return "mdi-youtube";
|
|
113
109
|
case "facebook":
|
|
114
|
-
return "mdi-facebook"
|
|
110
|
+
return "mdi-facebook";
|
|
115
111
|
case "instagram":
|
|
116
|
-
return "mdi-instagram"
|
|
112
|
+
return "mdi-instagram";
|
|
117
113
|
case "github":
|
|
118
|
-
return "mdi-github"
|
|
114
|
+
return "mdi-github";
|
|
119
115
|
case "rss":
|
|
120
|
-
return "mdi-rss"
|
|
116
|
+
return "mdi-rss";
|
|
121
117
|
case "website":
|
|
122
|
-
return "mdi-web"
|
|
118
|
+
return "mdi-web";
|
|
123
119
|
}
|
|
124
|
-
}
|
|
120
|
+
};
|
|
125
121
|
</script>
|
|
126
|
-
|
|
127
|
-
<style lang="scss"></style>
|
|
@@ -17,19 +17,15 @@
|
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script setup>
|
|
20
|
-
import { useAttrs } from "vue"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const { name, md, xl, lg, smAndDown, mdAndUp } = useDisplay()
|
|
25
|
-
|
|
20
|
+
import { useAttrs } from "vue";
|
|
21
|
+
import { useDisplay } from "vuetify";
|
|
22
|
+
const attrs = useAttrs();
|
|
23
|
+
const { name, md, xl, lg, smAndDown, mdAndUp } = useDisplay();
|
|
26
24
|
const props = defineProps({
|
|
27
25
|
items: {
|
|
28
26
|
type: Array,
|
|
29
27
|
required: true,
|
|
30
|
-
default: []
|
|
31
|
-
}
|
|
32
|
-
})
|
|
28
|
+
default: []
|
|
29
|
+
}
|
|
30
|
+
});
|
|
33
31
|
</script>
|
|
34
|
-
|
|
35
|
-
<style lang="scss" scoped></style>
|