diff --git a/package-lock.json b/package-lock.json index 32b817e0c4422d5c8f87fcb68d22947f3bb3fcf8..89720a3ef4e98a509db802df5887cc69a28c55c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,9 @@ "@primevue/themes": "^4.0.5", "@types/jsonld": "^1.5.15", "@vee-validate/yup": "^4.13.2", + "dompurify": "^3.2.1", "jsonld": "^8.3.2", + "marked": "^15.0.2", "ol": "^10.2.1", "pinia": "^2.1.7", "primelocale": "^1.0.3", @@ -2983,6 +2985,12 @@ "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", "dev": true }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "optional": true + }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", @@ -4990,6 +4998,14 @@ "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true }, + "node_modules/dompurify": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.1.tgz", + "integrity": "sha512-NBHEsc0/kzRYQd+AY6HR6B/IgsqzBABrqJbpCDQII/OK6h7B7LXzweZTDsqSW2LkTRpoxf18YUP+YjGySk6B3w==", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, "node_modules/earcut": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.0.tgz", @@ -7246,6 +7262,17 @@ "react": ">= 0.14.0" } }, + "node_modules/marked": { + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-15.0.2.tgz", + "integrity": "sha512-85RUkoYKIVB21PbMKrnD6aCl9ws+XKEyhJNMbLn206NyD3jbBo7Ec7Wi4Jrsn4dV1a2ng7K/jfkmIN0DNoS41w==", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", diff --git a/package.json b/package.json index f6827494b185b540d5565e76ad460d473bbaef57..0be8d443e662366e96accefa4e5bc4dfbdcab89c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,9 @@ "@primevue/themes": "^4.0.5", "@types/jsonld": "^1.5.15", "@vee-validate/yup": "^4.13.2", + "dompurify": "^3.2.1", "jsonld": "^8.3.2", + "marked": "^15.0.2", "ol": "^10.2.1", "pinia": "^2.1.7", "primelocale": "^1.0.3", diff --git a/src/components/OcTopMenu.vue b/src/components/OcTopMenu.vue index ac4e5c4d1540989aa04f08235ad8910e6b0e5a0d..69da96920717339f15905b15400bd199232dd9cf 100644 --- a/src/components/OcTopMenu.vue +++ b/src/components/OcTopMenu.vue @@ -64,6 +64,11 @@ const menuItems = computed(() => { label: currentLocale.value, items: localeItems }, + { + icon: 'fa-solid fa-circle-info', + title: t('about.title'), + command: () => router.push({ name: 'about' }) + }, { icon: 'fa-regular fa-envelope', url: contactHref diff --git a/src/helpers/icons.ts b/src/helpers/icons.ts index fe44f757b5defd09a88ad2fcbb92161dd2ff4afb..d885d4edbebeff7464f52b16e306e276247ee940 100644 --- a/src/helpers/icons.ts +++ b/src/helpers/icons.ts @@ -1,5 +1,6 @@ -export const iconsDict:Record<string, string> = { +export const iconsDict: Record<string, string> = { home: 'fa-solid fa-house', + about: 'fa-solid fa-circle-info', community: 'fa-solid fa-users', register: 'fa-solid fa-user-plus', profile: 'fa-solid fa-user', diff --git a/src/locales/about/en.md b/src/locales/about/en.md new file mode 100644 index 0000000000000000000000000000000000000000..f80e851b5b7458e27f7a714fdc18958ab001d957 --- /dev/null +++ b/src/locales/about/en.md @@ -0,0 +1,11 @@ +The [OpenCommon platform](https://opencommon.irit.fr/last/dist/spa/#/) was initiated by research prototypes from the [DataNoos](https://datanoos.univ-toulouse.fr/) project project, funded by RTRA STAE from 2018 to 2021. Today, DataNoos is a [platform of expertise on the valorization of interdisciplinary data at the University of Toulouse](https://mshs.univ-toulouse.fr/plateformes/les-plateformes-dexpertise/datanoos/). + +This work continued with the specification of data formatting during the RTRA STAE's [ENV'IA project](https://groupes.renater.fr/wiki/envia/). ENV'IA aims to connect the environment and AI communities. Following on from this, the [ANR Semantics4FAIR](https://anr.fr/Project-ANR-19-DATA-0014) project studied semantic web technologies to implement [FAIR principles](https://www.go-fair.org/fair-principles/) for the reuse of scientific data. In this case, MétéoFrance data was used as a case study to make it easier to reuse in scientific research. +Subsequently, the [ANR So-DRIIHM](https://anr.fr/fr/lanr/engagements/la-science-ouverte/les-projets-laureats-de-lappel-flash-science-ouverte/projet-so-driihm/) project set out to offer [DRIIHM labex](https://www.driihm.fr/) researchers a solution for reusing their data. + +The solution studied and developed is that described by the use case of an [open science intermediation platform for an interdisciplinary](https://datanoos.univ-toulouse.fr/fr/use-case-plateforme-science-ouverte) DataNoos community. +A follow-up is underway with the PFR-DRIIHM project of France Relance and the [University of Paul Sabatier](https://www.univ-tlse3.fr/) ([IRIT](http://www.irit.fr/)) to further develop the current Open Common platform. + +The application's source code is available on [IRIT's software forge](https://gitlab.irit.fr/so/oc/mvp). + +[Subscribe to our newsletter](https://groupes.renater.fr/sympa/subscribe/oc-newsletter?previous_action=info) diff --git a/src/locales/about/fr.md b/src/locales/about/fr.md new file mode 100644 index 0000000000000000000000000000000000000000..c165b0deb8c56e44f070b74bff74adcb4fa4c4c3 --- /dev/null +++ b/src/locales/about/fr.md @@ -0,0 +1,22 @@ +La [plateforme OpenCommon](https://opencommon.irit.fr/last/dist/spa/#/) a été initiée par des prototypes de recherche du chantier [DataNoos](https://datanoos.univ-toulouse.fr/) +financé par le RTRA STAE de 2018 à 2021. DataNoos est aujourd'hui une [plateforme d'expertise +sur la valorisation des données interdisciplinaires de l'université de Toulouse](https://mshs.univ-toulouse.fr/plateformes/les-plateformes-dexpertise/datanoos/). + +Ces travaux se sont poursuivis notamment par la spécifications de la mise en forme des +données lors du [chantier ENV'IA](https://groupes.renater.fr/wiki/envia/) du RTRA STAE. ENV'IA a pour objectif de connecter les +communautés de l'environnement et de l'IA. Dans la continuité, le projet [ANR Semantics4FAIR](https://anr.fr/Project-ANR-19-DATA-0014) a +étudié les technologies du web sémantique pour mettre en oeuvre des [principes FAIR](https://www.go-fair.org/fair-principles/) pour la +réutilisation des données scientifiques. En l'occurrence, les données de MétéoFrance ont +servi de cas d'application pour les rendre plus facilement réutilisables dans les recherches +scientifiques. + +Par la suite, le projet [ANR So-DRIIHM](https://anr.fr/fr/lanr/engagements/la-science-ouverte/les-projets-laureats-de-lappel-flash-science-ouverte/projet-so-driihm/) a eu l'ambition d'offrir aux chercheurs du [labex DRIIHM](https://www.driihm.fr/) une solution pour ses chercheurs et la valorisation de leurs données. + +La solution étudiée et développée est celle décrite par le cas d'usage [d'une plateforme +d'intermédiation de la science ouverte pour une communauté interdisciplinaire](https://datanoos.univ-toulouse.fr/fr/use-case-plateforme-science-ouverte) de DataNoos. + +Une suite est en cours avec le projet PFR-DRIIHM de France Relance et de l'[université de Paul Sabatier](https://www.univ-tlse3.fr/) ([IRIT](http://www.irit.fr/)) pour continuer les développements de l'actuelle plateforme Open Common. + +Le code source de l'application est disponible sur la [forge lociciel de l'IRIT](https://gitlab.irit.fr/so/oc/mvp). + +[S'abonner à la lettre d'information](https://groupes.renater.fr/sympa/subscribe/oc-newsletter?previous_action=info) diff --git a/src/locales/en.ts b/src/locales/en.ts index 0c371964ea597e4acba0a8c2d71977c770aa09ca..40df417615b11f6526c18fa5e9e12140c93d5f5a 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -1,3 +1,5 @@ +import aboutContent from './about/en.md?raw' + // carriage return character const crEncoded = '%0D%0A' @@ -19,6 +21,10 @@ export default { }, goToCommunity: 'Go to community {label}' }, + about: { + title: 'About', + content: aboutContent + }, communities: 'Communities', dashboard: 'Dasboard', datasetsLabel: 'Datasets', diff --git a/src/locales/fr.ts b/src/locales/fr.ts index de4d2fe297c43f4640d6f670d21736751870c501..aa9ec2998caeb3591c31cfb69bb612a422086236 100644 --- a/src/locales/fr.ts +++ b/src/locales/fr.ts @@ -1,3 +1,5 @@ +import aboutContent from './about/fr.md?raw' + // carriage return character const crEncoded = '%0D%0A' @@ -20,6 +22,10 @@ export default { }, goToCommunity: 'Voir la communauté {label}' }, + about: { + title: 'À propos', + content: aboutContent, + }, communities: 'Communautés', dashboard: 'Dasboard', datasetsLabel: 'Datasets', diff --git a/src/pages/about.vue b/src/pages/about.vue new file mode 100644 index 0000000000000000000000000000000000000000..87de2f25b0268bfb7405227734b2364f27d2ba61 --- /dev/null +++ b/src/pages/about.vue @@ -0,0 +1,57 @@ +<template> + <OcLayoutSimple + :is-authenticated="accountStore.isAuthenticated" + :breadcrumb-items="breadcrumbItems" + > + <div class="container mx-auto mt-8 p-8 bg-slate-100"> + <h1 class="text-xl font-bold mb-8">{{ t('about.title') }}</h1> + + <div class="content" v-html="content" /> + </div> + </OcLayoutSimple> +</template> + +<script setup lang="ts"> +import { useAccountData } from '@/dataLoaders/account' +import type { OcBreadcrumbItem } from '@/declarations' +import OcLayoutSimple from '@/layout/OcLayoutSimple/OcLayoutSimple.vue' +import { useAccountStore } from '@/stores/account' +import { computed } from 'vue' +import { useI18n } from 'vue-i18n' +import { marked } from 'marked' +import DOMPurify from 'dompurify' + +definePage({ + name: 'about', + meta: { + needsAuth: false, + loaders: [useAccountData] + } +}) + +const { t } = useI18n() +const accountStore = useAccountStore() + +const content = computed(() => { + const dirty = marked(t('about.content'), { async: false }) + return DOMPurify.sanitize(dirty, { USE_PROFILES: { html: true } }) +}) + +const breadcrumbItems = computed<OcBreadcrumbItem[]>(() => [ + { + label: t('about.title'), + key: 'about', + type: 'about' + } +]) +</script> + +<style lang="css" scoped> +:deep(.content p) { + @apply mb-2; +} + +:deep(.content a) { + @apply underline; +} +</style> diff --git a/typed-router.d.ts b/typed-router.d.ts index 341f99c91b3177ba85a913ec72f0fd89449e089a..dbfb0f316e27ea7642251cae2692d8e0189a6c1d 100644 --- a/typed-router.d.ts +++ b/typed-router.d.ts @@ -20,6 +20,7 @@ declare module 'vue-router/auto-routes' { export interface RouteNamedMap { 'index': RouteRecordInfo<'index', '/:lang', Record<never, never>, Record<never, never>>, 'catchall': RouteRecordInfo<'catchall', '/:lang/:path(.*)', { path: ParamValue<true> }, { path: ParamValue<false> }>, + 'about': RouteRecordInfo<'about', '/:lang/about', Record<never, never>, Record<never, never>>, '/:lang/community/[community]': RouteRecordInfo<'/:lang/community/[community]', '/:lang/community/:community', { community: ParamValue<true> }, { community: ParamValue<false> }>, 'community': RouteRecordInfo<'community', '/:lang/community/:community', { community: ParamValue<true> }, { community: ParamValue<false> }>, 'community.resource': RouteRecordInfo<'community.resource', '/:lang/community/:community/:resource/:identifier', { community: ParamValue<true>, resource: ParamValue<true>, identifier: ParamValue<true> }, { community: ParamValue<false>, resource: ParamValue<false>, identifier: ParamValue<false> }>,