Skip to content

Commit

Permalink
Merge branch 'main' into feat/regroupement-facteurs
Browse files Browse the repository at this point in the history
  • Loading branch information
narduin committed Dec 12, 2024
2 parents 9db627c + 5ed5ebc commit 4fe46ea
Show file tree
Hide file tree
Showing 25 changed files with 909 additions and 384 deletions.
174 changes: 29 additions & 145 deletions configs/ecospheres/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ website:
to: /datasets
- text: Bouquets
to: /bouquets
# TODO: enable when ready
# - text: Indicateurs
# to: /indicators
- text: Organisations
to: /organizations
- text: A propos
Expand Down Expand Up @@ -233,148 +236,29 @@ themes:
- name: La transition juste et les mesures d’accompagnement, pour ne laisser personne au bord du chemin
- name: La sobriété des usages et des ressources

organizations:
- ademe
- agence-de-l-eau-rhone-mediterranee-et-corse
- agence-nationale-de-la-cohesion-des-territoires
- agence-nationale-pour-la-renovation-urbaine
- agence-ore-3
- airparif-1
- atmo-bourgogne-franche-comte
- atmo-grand-est
- atmosud
- bureau-de-recherches-geologiques-et-minieres
- centre-scientifique-et-technique-du-batiment
- cerema
- commission-de-regulation-de-lenergie
- datagrandest
- ddt-aisne
- ddt-ardennes
- ddt-aveyron
- ddt-cote-dor
- ddt-creuse
- ddt-de-la-loire
- ddt-de-lain
- ddt-de-lardeche
- ddt-de-meurthe-et-moselle
- ddt-deux-sevres
- ddt-drome
- ddt-haute-garonne
- ddt-haute-marne
- ddt-hautes-pyrenees
- ddt-indre
- ddt-jura
- ddt-lot
- ddt-maine-et-loire
- ddt-mayenne
- ddt-nievre
- ddt-savoie
- ddt-tarn
- ddt-tarn-et-garonne
- ddt-territoire-de-belfort
- ddt-vaucluse
- ddt-vienne
- ddt-yvelines
- ddtm-alpes-maritimes
- ddtm-aude
- ddtm-corse-du-sud
- ddtm-cotes-darmor
- ddtm-finistere
- ddtm-gard
- ddtm-gironde
- ddtm-haute-corse
- ddtm-morbihan
- ddtm-pas-de-calais
- ddtm-pyrenees-orientales
- ddtm-vendee
- deal-guadeloupe
- direction-departementale-des-territoire-du-puy-de-dome
- direction-departementale-des-territoires-de-charente
- direction-departementale-des-territoires-de-haute-saone
- direction-departementale-des-territoires-de-haute-savoie
- direction-departementale-des-territoires-de-la-correze
- direction-departementale-des-territoires-de-la-haute-loire
- direction-departementale-des-territoires-de-la-lozere
- direction-departementale-des-territoires-de-la-marne
- direction-departementale-des-territoires-de-la-meuse
- direction-departementale-des-territoires-de-la-sarthe
- direction-departementale-des-territoires-de-lallier
- direction-departementale-des-territoires-de-lariege
- direction-departementale-des-territoires-de-laube
- direction-departementale-des-territoires-de-lessonne
- direction-departementale-des-territoires-de-lisere
- direction-departementale-des-territoires-de-loir-et-cher
- direction-departementale-des-territoires-de-lorne
- direction-departementale-des-territoires-de-saone-et-loire
- direction-departementale-des-territoires-de-seine-et-marne
- direction-departementale-des-territoires-des-alpes-de-haute-provence
- direction-departementale-des-territoires-des-hautes-alpes
- direction-departementale-des-territoires-des-vosges
- direction-departementale-des-territoires-deure-et-loir
- direction-departementale-des-territoires-dindre-et-loire
- direction-departementale-des-territoires-du-bas-rhin-67
- direction-departementale-des-territoires-du-cher
- direction-departementale-des-territoires-du-doubs
- direction-departementale-des-territoires-du-haut-rhin-68
- direction-departementale-des-territoires-du-loiret
- direction-departementale-des-territoires-du-rhone-1
- direction-departementale-des-territoires-du-val-doise
- direction-departementale-des-territoires-et-de-la-mer-de-charente-maritime
- direction-departementale-des-territoires-et-de-la-mer-de-la-somme
- direction-departementale-des-territoires-et-de-la-mer-de-leure
- direction-departementale-des-territoires-et-de-la-mer-de-lherault
- direction-departementale-des-territoires-et-de-la-mer-de-loire-atlantique
- direction-departementale-des-territoires-et-de-la-mer-des-bouches-du-rhone
- direction-departementale-des-territoires-et-de-la-mer-des-landes
- direction-departementale-des-territoires-et-de-la-mer-des-pyrenees-atlantiques
- direction-departementale-des-territoires-et-de-la-mer-dille-et-vilaine
- direction-departementale-des-territoires-et-de-la-mer-du-calvados
- direction-departementale-des-territoires-et-de-la-mer-du-var
- direction-departementale-et-des-territoires-du-cantal
- direction-regionale-de-lenvironnement-de-lamenagement-et-du-logement-de-normandie
- direction-regionale-de-lenvironnement-de-lamenagement-et-du-logement-du-centre-val-de-loire
- direction-regionale-de-lenvironnement-et-du-logement-bourgogne-franche-comte
- do-terr-geo-centre
- dreal-grand-est
- dreal-nouvelle-aquitaine
- dreal-provence-alpes-cote-dazur
- edf-systemes-energetiques-insulaires
- electricite-de-france
- electricite-reseau-distribution-france
- equipe-transport-data-gouv-fr
- federation-des-parcs-naturels-regionaux-de-france
- fluo-grand-est
- gip-bretagne-environnement
- grdf
- institut-francais-de-recherche-pour-lexploitation-de-la-mer
- institut-national-de-l-information-geographique-et-forestiere
- irstea
- jvmalin
- ligair
- meteo-france
- ministere-de-l-egalite-des-territoires-et-du-logement
- ministere-de-la-transition-ecologique
- morbihan-energies
- museum-national-dhistoire-naturelle
- observatoire-de-recherche-montpellierain-de-lenvironnement
- office-national-des-forets
- oise-mobilite-syndicat-mixte-des-transports-collectifs-de-loise
- open-data-reseaux-energies-1
- parc-national-de-forets
- parc-national-des-cevennes
- parc-national-des-ecrins
- parc-naturel-regional-de-la-montagne-de-reims
- parc-naturel-regional-de-la-montagne-de-reims-1
- parc-naturel-regional-des-vosges-du-nord
- parc-naturel-regional-du-morvan
- parc-naturel-regional-du-vercors
- regie-autonome-des-transports-parisiens-ratp
- reseau-de-transport-delectricite
- section-cadastre-topographie-de-la-polynesie-francaise
- shom
- sncf
- societe-du-grand-paris
- star
- syndicat-mixte-des-mobilites-de-laire-grenobloise
- systeme-d-information-sur-l-eau
- twisto
organizations: https://raw.githubusercontent.com/ecolabdata/ecospheres-universe/refs/heads/main/dist/organizations-demo.json

indicators:
organization_id: 673dafb02cf54cfb2ccbd118
global_tag_prefix: ecospheres-indicateurs
filters:
- name: Thématique
id: theme
color: green-menthe
values:
- id: mieux-se-deplacer
name: Mieux se déplacer
- id: autre
name: Autre
- id: mieux-produire
name: Mieux produire
- name: Enjeu
id: enjeu
color: blue-ecume
values:
- id: sante
name: Santé
- id: attenuation
name: Atténuation
- id: biodiversite
name: Biodiversité
12 changes: 12 additions & 0 deletions src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ body {
display: block;
}

.flex-nowrap {
flex-wrap: nowrap;
}

.flex-1-1-auto {
flex: 1 1 auto;
}

.overflow-hidden {
overflow: hidden;
}

/* FONT CUSTOM */
.uppercase {
text-transform: uppercase;
Expand Down
119 changes: 73 additions & 46 deletions src/components/bouquets/BouquetCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { toRef } from 'vue'
import type { RouteLocationRaw } from 'vue-router'
import OrganizationLogo from '@/components/OrganizationLogo.vue'
import { NoOptionSelected } from '@/model/theme'
import type { Topic } from '@/model/topic'
import { stripFromMarkdown } from '@/utils'
import { getOwnerAvatar } from '@/utils/avatar'
Expand All @@ -23,6 +22,10 @@ const props = defineProps({
bouquet: {
type: Object as () => Topic,
required: true
},
hideDescription: {
type: Boolean,
default: false
}
})
Expand All @@ -44,49 +47,49 @@ const { themeColors } = useThemeOptions(theme)
</script>

<template>
<article class="fr-my-3w fr-p-3w border border-default-grey fr-enlarge-link">
<article
class="fr-my-1w fr-px-3w fr-py-2w border border-default-grey fr-enlarge-link"
>
<div
v-if="bouquet.private"
class="absolute top-0 fr-grid-row fr-grid-row--middle fr-mt-n3v"
>
<p class="fr-badge fr-badge--mention-grey fr-mr-1w">Brouillon</p>
</div>
<div class="fr-grid-row fr-grid-row--gutters fr-grid-row--top">
<div class="fr-col-auto">
<div class="fr-grid-row">
<div class="fr-col-12">
<DsfrTag
class="fr-card__detail fr-mt-1w fr-mb-1w card__tag"
:label="subtheme"
/>
</div>
</div>
<div class="fr-grid-row fr-pt-2v align-center flex-nowrap">
<div class="fr-col-12 fr-col-sm-2 bouquet-card-col-logo">
<OrganizationLogo
v-if="bouquet.organization"
:size="64"
:size="43"
:object="bouquet"
/>
<div v-else class="border fr-p-1-5v fr-mr-1-5v">
<div v-else class="border fr-p-1-5v fr-mr-1-5v inline-block">
<img
:src="getOwnerAvatar(bouquet)"
alt=""
loading="lazy"
class="owner-avatar"
height="64"
width="64"
height="42"
width="42"
/>
</div>
</div>
<div class="fr-col">
<div
class="fr-col-12 fr-col-sm-10 fr-pl-2v overflow-hidden flex-1-1-auto"
>
<h3 class="fr-mb-1v fr-grid-row h4">
<RouterLink :to="bouquetLink" class="text-grey-500">
{{ bouquet.name }}
</RouterLink>
</h3>
<DsfrTag
v-if="theme && subtheme !== NoOptionSelected"
:class="[
{
'fr-card__detail': true,
'fr-mt-1w': subtheme !== NoOptionSelected
},
'fr-mb-1w',
'card__tag'
]"
:label="subtheme"
/>
<p
v-if="bouquet.organization || bouquet.owner"
class="fr-m-0 fr-text--sm"
Expand All @@ -98,43 +101,67 @@ const { themeColors } = useThemeOptions(theme)
/>
</template>
<template v-else>{{ ownerName }}</template>
— mis à jour {{ formatRelativeIfRecentDate(bouquet.last_modified) }}
</p>
<p
class="fr-mt-1w fr-mb-2w fr-hidden fr-unhidden-sm overflow-wrap-anywhere"
>
<text-clamp
v-if="bouquet.description"
:auto-resize="true"
:text="stripFromMarkdown(bouquet.description)"
:max-lines="3"
/>
</p>
<p class="fr-tag">
<VIcon name="ri-database-2-line" class="fr-mr-1v" />
<span class="fr-mr-1v">
{{
`${nbData > 0 ? nbData : 'Aucune'} donnée${nbData > 1 ? 's' : ''}`
}}
</span>
</p>
<p v-if="spatialCoverage" class="fr-tag fr-ml-1w">
<VIcon name="ri-map-2-line" class="fr-mr-1v" />
<span class="fr-mr-1v">
{{ spatialCoverage.name }}
</span>
</p>
</div>
</div>
<div v-if="!hideDescription" class="fr-grid-row description fr-mt-3v">
<p class="fr-mb-1v">{{ stripFromMarkdown(bouquet.description) }}</p>
</div>

<p class="fr-mb-2v fr-text--sm flex align-center fr-pt-3v text-grey-380">
<VIcon name="ri:time-line" class="fr-mr-1v text-grey-380" />
Mis à jour {{ formatRelativeIfRecentDate(bouquet.last_modified) }}
</p>

<div class="fr-grid-row">
<span class="fr-tag fr-mr-2v fr-mb-2v">
<VIcon name="ri-database-2-line" class="fr-mr-1v" />
<span class="fr-mr-1v">
{{
`${nbData > 0 ? nbData : 'Aucune'} donnée${nbData > 1 ? 's' : ''}`
}}
</span>
</span>

<span v-if="spatialCoverage" class="fr-tag fr-mb-2v">
<VIcon name="ri-map-2-line" class="fr-mr-1v" />
<span class="fr-mr-1v">
{{ spatialCoverage.name }}
</span>
</span>
</div>
</article>
</template>

<style scoped>
.owner-avatar {
margin-bottom: -6px;
display: inline-block;
}
.card__tag {
color: v-bind('themeColors.color');
background-color: v-bind('themeColors.background');
}
.fr-card__detail,
:deep(h3) {
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
line-height: inherit;
}
.bouquet-card-col-logo {
max-width: 4.25rem;
}
.description p {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>
Loading

0 comments on commit 4fe46ea

Please sign in to comment.