diff --git a/README b/README index 923931a..7ab53fe 100644 --- a/README +++ b/README @@ -15,6 +15,14 @@ note: les credentials pour accéder au backend se trouvent dans /home/appuser/ci $ docker-compose up -d $ docker-compose exec citizen sh install/restart.sh -# Documentation : +# Documentation : $ make doc + +# Builder le front + +``` +$ docker-compose exec citizen bash +appuser@ab136184159a:~/citizen/$ cd frontend +appuser@ab136184159a:~/citizen/frontend$ npm run ng build -- --configuration=fr --prod +``` \ No newline at end of file diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 31592df..35c4fb1 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -7,3 +7,4 @@ services: - ./vendor/GeoNature-citizen/frontend:/home/appuser/citizen/frontend - ./vendor/GeoNature-citizen/backend:/home/appuser/citizen/backend - ./restart.sh:/home/appuser/citizen/install/restart.sh + - ./patches/frontend/conf:/home/appuser/citizen/frontend/src/conf diff --git a/patches/frontend/conf/app.config.ts b/patches/frontend/conf/app.config.ts new file mode 100644 index 0000000..6a23b3f --- /dev/null +++ b/patches/frontend/conf/app.config.ts @@ -0,0 +1,72 @@ +export const AppConfig = { + appName: "GeoNature-citizen", + API_ENDPOINT:"http://localhost:8080/api", + API_TAXHUB:"http://localhost/taxhub/api/", + FRONTEND:{ + PROD_MOD:true, + MULTILINGUAL:false, + DISPLAY_FOOTER: true, + DISPLAY_TOPBAR: true, + DISPLAY_SIDEBAR: true, + DISPLAY_STATS: true, + DISPLAY_BADGES: true, + NEW_OBS_FORM_MODAL_VERSION: true + }, + META: { + keywords: 'biodiversite enquetes participatif observations', + }, + about: true, + URL_APPLICATION:"http://localhost:8080/", + REWARDS: true, + termsOfUse: { + fr: "assets/cgu.pdf", + en: "assets/termsOfUse.pdf" + }, + signup:true, + email_contact:false, + platform_intro: { + fr: "Bienvenue
à Wasseiges", + en: "Welcome
on GeoNature Citizen" + }, + platform_teaser: { + fr: "Hae duae provinciae bello quondam piratico catervis mixtae praedonum a Servilio pro consule missae sub iugum factae sunt vectigales. et hae quidem regiones velut in prominenti terrarum lingua positae ob orbe eoo monte Amano disparantur.", + en: "Hae duae provinciae bello quondam piratico catervis mixtae praedonum a Servilio pro consule missae sub iugum factae sunt vectigales. et hae quidem regiones velut in prominenti terrarum lingua positae ob orbe eoo monte Amano disparantur." + }, + platform_participate: { + fr: "PARTICIPER AU PROGRAMME", + en: "PARTICIPATE" + }, + programs_label: { + fr: "Programmes", + en: "Surveys" + }, + program_label: { + fr: "Le programme", + en: "Survey" + }, + program_share_an_observation: { + fr: "PARTAGER UNE OBSERVATION", + en: "SHARE AN OBSERVATION" + }, + program_add_an_observation: { + fr: "AJOUTER UNE OBSERVATION", + en: "CONTRIBUTE AN OBSERVATION" + }, + program_allow_email_contact: { + fr: "J'accepte que mon adresse e-mail puisse être utilisée pour recontacter à propos de mon observation", + en : "I agree that my e-mail address can be used to recontact about my observation" + }, + taxonSelectInputThreshold: 7, + taxonAutocompleteInputThreshold: 12, + taxonAutocompleteFields: [ + "nom_complet", + "nom_vern", + "nom_vern_eng", + "cd_nom" + ], + taxonDisplaySciName: true, + program_list_observers_names: true, + program_list_sort: "-timestamp_create", + details_espece_url: "/cd_nom/", // !! gardez bien le cd_nom/ dans l'url + registration_message : "Vous inscrire vous permet de gérer vos observations" +} diff --git a/patches/frontend/conf/map.config.ts b/patches/frontend/conf/map.config.ts new file mode 100644 index 0000000..7bd537e --- /dev/null +++ b/patches/frontend/conf/map.config.ts @@ -0,0 +1,92 @@ +export const MAP_CONFIG = { + DEFAULT_PROVIDER: "OpenStreetMapOrg", + BASEMAPS: [ + { + name: "OpenStreetMapOrg", + maxZoom: 19, + layer: "//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", + subdomains: "abc", + attribution: + '© OpenStreetMap contributors, Tiles style by Humanitarian OpenStreetMap Team hosted by OpenStreetMap France' + }, + // { + // name: "OpenStreetMapFRHot", + // maxZoom: 19, + // layer: "//{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png", + // subdomains: "abc", + // attribution: + // '© OpenStreetMap contributors, Tiles style by Humanitarian OpenStreetMap Team hosted by OpenStreetMap France' + // }, + // { + // name: "OpenStreetMapCH", + // maxZoom: 18, + // layer: "//tile.osm.ch/switzerland/{z}/{x}/{y}.png", + // subdomains: "abc", + // attribution: + // '© OpenStreetMap contributors', + // bounds: [[45, 5], [48, 11]] + // }, + // { + // name: "OpenStreetMapDE", + // maxZoom: 18, + // layer: "//{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png", + // subdomains: "abc", + // attribution: + // '© OpenStreetMap contributors' + // }, + // { + // name: "OpenStreetMapBZH", + // maxZoom: 18, + // layer: "//tile.openstreetmap.bzh/br/{z}/{x}/{y}.png", + // subdomains: "", + // attribution: + // '© OpenStreetMap contributors, Tiles courtesy of Breton OpenStreetMap Team', + // bounds: [[46.2, -5.5], [50, 0.7]] + // }, + { + name: "OpenTopoMap", + maxZoom: 17, + layer: "//{s}.opentopomap.org/{z}/{x}/{y}.png", + subdomains: "abc", + attribution: "© OpenTopoMap" + }, + { + name: "IGN Vue satellite", + maxZoom: 17, + layer: "https://wxs.ign.fr/{apiKey}/geoportail/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER={layerName}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}", + layerName: "ORTHOIMAGERY.ORTHOPHOTOS", + // Remplacer "pratique" par votre clé IGN + apiKey: 'pratique', + subdomains: "abc", + attribution: "© IGN-F/Geoportail" + }, + { + name: "IGN Cartes HELLO C EST UNE MODIF", + maxZoom: 17, + layer: "https://wxs.ign.fr/{apiKey}/geoportail/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER={layerName}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}", + layerName: "GEOGRAPHICALGRIDSYSTEMS.MAPS", + // Remplacer "pratique" par votre clé IGN + apiKey: 'pratique', + subdomains: "abc", + attribution: "© IGN-F/Geoportail" + }, + // { + // // ⚠ google's terms&conditions + // // https://github.com/Leaflet/Leaflet/blob/master/FAQ.md#i-want-to-use-google-maps-api-tiles-with-leaflet-can-i-do-that + // name: "GoogleSatellite", + // maxZoom: 20, + // layer: "//mt{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}", + // subdomains: "1", + // attribution: "© GoogleMap" + // } + ], + CENTER: [46.52863469527167, 2.43896484375], + ZOOM_LEVEL: 6, + ZOOM_LEVEL_RELEVE: 15, + NEW_OBS_POINTER: "assets/pointer-blue2.png", + OBS_POINTER: "assets/pointer-green.png", + LOCATE_CONTROL_TITLE: { + 'fr':'Me localiser', + 'en':'Show me where i am' + } +}