diff --git a/configs/ecospheres/config.yaml b/configs/ecospheres/config.yaml index ebc7796d3..22b8fa295 100644 --- a/configs/ecospheres/config.yaml +++ b/configs/ecospheres/config.yaml @@ -26,10 +26,10 @@ website: logo_operator: homepage_title: 'Ecosphères' homepage_subtitle: 'Explorez les données ouvertes et restreintes de la **Transition écologique**, de la **Cohésion des territoires**, de la **Transition énergétique** et de la **Mer**' - search_bar: + search_bar: display: true placeholder: 'Rechercher un jeu de données' - secondary_search: + secondary_search: display: false name: link: diff --git a/configs/meteo-france/config.yaml b/configs/meteo-france/config.yaml index cea6eb18e..d65de020e 100644 --- a/configs/meteo-france/config.yaml +++ b/configs/meteo-france/config.yaml @@ -23,10 +23,10 @@ website: logo_operator: 'https://static.data.gouv.fr/avatars/81/6374003e904fad9ddac7436315fd15-100.png' homepage_title: 'La météo et le climat en Open Data' homepage_subtitle: 'meteo.data.gouv.fr centralise et structure les données publiques relatives à la météo et au climat.
Vous y trouverez des données brutes téléchargeables et utilisable de manière libre et gratuite.' - search_bar: + search_bar: display: true placeholder: 'Rechercher un jeu de données' - secondary_search: + secondary_search: display: true name: 'Recherche guidée' link: '/form' @@ -74,7 +74,7 @@ website: # display settings pagination_sizes: organizations_list: 9 - topics_list: 100 + topics_list: 100 home_banner_colors: - '#F7EED4' - '#ECEEE6' diff --git a/src/assets/main.css b/src/assets/main.css index 47d6bf015..b5c38ff54 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -39,13 +39,26 @@ align-items: center; } -.theme_without_breadcrumb { +.without_breadcrumb { margin: 128px 0 0; } -.theme_with_breadcrumb { +.with_breadcrumb { margin: 60px 0 0; - .home-selection-breadcrumb { - text-align: left; +} + +.breadcrumb { + margin-top: 40px; + text-align: left; +} + +.actionTile { + background: #000092; + .fr-tile__link { + color: white; } } + +.dsfr_alert { + margin: 20px 0; +} \ No newline at end of file diff --git a/src/components/HomeThemes.vue b/src/components/HomeThemes.vue index bc004108f..53dff27c6 100644 --- a/src/components/HomeThemes.vue +++ b/src/components/HomeThemes.vue @@ -1,5 +1,5 @@ @@ -64,7 +66,7 @@ export default { return `box-shadow: rgb(221, 221, 221) 0px 0px 0px 1px inset, #${color} 0px -4px 0px 0px inset` }, goToTopicList(subtheme: Subtheme): string { - return 'link to topic list' // TO DO redirect to search result once the page is created + return `/bouquets/?theme=${this.selectedTheme.name}&subtheme=${subtheme.name}` }, getThemeDescription(theme: Theme): string { const nbSubthemes = theme.subthemes.length diff --git a/src/components/TopicList.vue b/src/components/TopicList.vue new file mode 100644 index 000000000..c9abb3865 --- /dev/null +++ b/src/components/TopicList.vue @@ -0,0 +1,123 @@ + + + diff --git a/src/components/TopicSearch.vue b/src/components/TopicSearch.vue new file mode 100644 index 000000000..9cb570280 --- /dev/null +++ b/src/components/TopicSearch.vue @@ -0,0 +1,124 @@ + + + diff --git a/src/model.ts b/src/model.ts index 4a37fddf8..7bb02c667 100644 --- a/src/model.ts +++ b/src/model.ts @@ -8,4 +8,42 @@ interface Subtheme { name: string } -export type { Theme, Subtheme } +interface SelectOption { + value: string + text: string + disabled?: boolean +} + +interface BreadcrumbItem { + text: string + to?: string +} + +interface Topic { + created_at: string + datasets: Dataset[] + description: string + extras: { + 'ecospheres:datasets_properties': {} + 'ecospheres:informations': { subtheme: string; theme: string }[] + } + featured: boolean + id: string + name: string + organisation: any + owner: any + page: string + private: boolean + reuses: [] + slug: string + tags: string[] + uri: string +} + +interface Dataset { + // TODO -- add list of properties for Dataset +} + +export const NoOptionSelected = 'no_option_selected' + +export type { Theme, Subtheme, SelectOption, BreadcrumbItem, Topic } diff --git a/src/services/routerUtils.js b/src/services/routerUtils.js index 41741b9cc..7433d6cc6 100644 --- a/src/services/routerUtils.js +++ b/src/services/routerUtils.js @@ -42,7 +42,11 @@ export default class RouterFetch { items.push({ path: item.linkPage, name: item.id, - component: BouquetsListView + component: BouquetsListView, + props: (route) => ({ + initThemeName: route.query.theme, + initSubthemeName: route.query.subtheme + }) }) items.push({ path: `${item.linkPage}/:bid`, diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 4bbc2bf3f..78abc9449 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -83,7 +83,6 @@ const goToPage = (page) => {
diff --git a/src/views/bouquets/BouquetsListView.vue b/src/views/bouquets/BouquetsListView.vue index d74442d71..be301b309 100644 --- a/src/views/bouquets/BouquetsListView.vue +++ b/src/views/bouquets/BouquetsListView.vue @@ -1,45 +1,86 @@ - - + +