Skip to content

Commit

Permalink
Merge pull request #504 from GeotrekCE/develop
Browse files Browse the repository at this point in the history
Develop > Master / 3.5.0
  • Loading branch information
camillemonchicourt authored Nov 14, 2021
2 parents 63c1577 + 7a6b613 commit c0513db
Show file tree
Hide file tree
Showing 150 changed files with 5,944 additions and 444 deletions.
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

- [ ] Ticket : [Name]()
- [ ] I made sure that all displayed texts are imported from translation files.
- [ ] I made sure ticket is up to date on Trello.

## Screenshots

Expand Down
33 changes: 33 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

3.5.0 (2021-11-14)
------------------

To enable Outdoor module, Geotrek-admin version 2.70.0 or higher is required

**🚀 New features**

* Add outdoor sites and courses in home activity bar, seach, detail pages and offline contents (#376)
* Add touristic events in home activity bar, seach, detail pages and offline contents (#389)

**✨ Improvements**

* Group secondary filters by activity for outdoor and services search
* Hide images slideshows on offline content as only the first images are downloaded
* Simplify filter display setting with adding a ``display`` property to each filter (default to ``false``)

**🐛 Fixes**

* Fix offline maps tiles with removing ``mapClassicLayerUrlOffline`` setting that didn't worked

**💥 Beaking changes**

* To hide a filter, you now just have to set its ``display`` property to ``false``. If you had overriden ``filter.json`` file, you have to update it with just setting filters to hide to ``"display":false``.
Example to hide "structures" filter:
```
[
{
"id": "structures",
"display": false
}
]
```

3.4.0 (2021-10-22)
------------------

Expand Down
8 changes: 4 additions & 4 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ Examples of customizations are available in https://github.com/GeotrekCE/Geotrek

In json files, you can just override the primary keys you need. You have to override primary keys globally.

- `global.json` (example in https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/customization/config/global.json) to define :
- `global.json` (default value in https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/config/global.json) to define :

- `searchResultsPageSize`, `mapResultsPageSize`: used to limit the sizes of results per page when fetching API
- `maxPoiPerPage`: max number of point of interest (POI) displayed on a single trek page
- `maxTouristicContentPerPage`: max number of touristic contents displayed on a single trek page
- `portalIds`: eventual portal filters (list of ids).
- `enableSensitiveAreas`: boolean, default to false. Set it to true if sensitive areas are defined in your Geotrek-admin
- `enableOutdoor`: : boolean, default to false. Set it to true to enable Outdoor sites and courses
- `apiUrl` : Geotrek-admin API URL
- `googleAnalyticsId`: eventual Google Analytics Id
- `googleSiteVerificationToken`: eventual code to enable Google Search Console and Google developer tools
Expand All @@ -34,7 +35,7 @@ In json files, you can just override the primary keys you need. You have to over
- `enableReport`: to enable report form in trek detail pages
- `enableSearchByMap`: to enable searching by map displayed area (bbox)

- `header.json` to define logo URL, default and available languages, number items to flatpages to display in navbar (see example in https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/customization/config/header.json)
- `header.json` to define logo URL, default and available languages, number items to flatpages to display in navbar (see default values in https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/config/header.json)

- `home.json` to define homepage settings. You can define blocks to display and trek suggestion block with trek ID to highlight on homepage (see https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/customization/config/home.json).

Expand All @@ -51,13 +52,12 @@ In json files, you can just override the primary keys you need. You have to over
- `shouldDisplayText`: `true` to display the text on above the asset, `false` to hide it.

- `footer.json` to define social networks (`facebook`, `twitter`, `youtube`, `instagram` or `fallback)` and links (based on translation labels) in footer (see example in https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/customization/config/footer.json)
- `filter.json` to define filters to display, their order and values (see example in https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/customization/config/filter.json). If you remove some of the filters in this file, they will not be displayed. If you want to override one filter, you have to list all others, otherwise they will not be displayed
- `filter.json` to define filters to hide, their order and values (see example in https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/config/filter.json). If you want to hide some of the filter, you have to override their properties with `"display": false`
- `map.json` to define basemaps URL and attributions, center (y, x), default and max zoom level (see example in https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/customization/config/map.json).

- You can also update the map layers. There are two map layers available:

- `mapClassicLayerUrl` for the map version
- `mapClassicLayerUrlOffline` for the map version in offline mode
- `mapSatelliteLayerUrl` for the satellite version. It is optional, so if you want to have only one available map background, you can add `mapSatelliteLayerUrl: undefined`. This will remove the button which allows the user to switch between two map backgrounds.

- `zoomAvailableOffline` allows you to define the zoom modes allowed in offline mode. This allows you to control the amount of disk space required when caching. Default `[13,14,15]`
Expand Down
6 changes: 4 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,16 @@ sudo apt install python3-certbot-nginx
sudo certbot --nginx
```

## Update Geotrek-rando version or configuration
## Upgrade Geotrek-rando version

After updating configuration or to install a new version of Geotrek-rando, you have to pull the new image of Geotrek-rando, stop and remove the old container and run a new one with the new image:
To install a new version of Geotrek-rando, you have to pull the new image of Geotrek-rando, stop and remove the old container and run a new one with the new image:

```sh
docker-compose pull && docker-compose down && docker-compose up -d
```

It will download and install the latest version of Geotrek-rando. If you want to install a specific version of Geotrek-rando, you can specify it in your `.env` file, instead of `latest`.

# Install without Docker (not recommended)

If you can't install Docker for some reason, there is also a way to directly deploy the node server to your machines.
Expand Down
6 changes: 3 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Install dependencies only when needed
FROM node:alpine AS deps
FROM node:lts-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat g++ gcc libgcc libstdc++ linux-headers make python3
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Rebuild the source code only when needed
FROM node:alpine AS builder
FROM node:lts-alpine AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline

# Production image, copy all the files and run next
FROM node:alpine AS runner
FROM node:lts-alpine AS runner
WORKDIR /app

ENV NODE_ENV production
Expand Down
128 changes: 128 additions & 0 deletions frontend/config/filter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
[
{
"id": "practices",
"type": "MULTIPLE",
"display": true
},
{
"id": "categories",
"type": "MULTIPLE",
"display": true
},
{
"id": "themes",
"type": "MULTIPLE",
"display": true
},
{
"id": "cities",
"type": "MULTIPLE",
"display": true
},
{
"id": "districts",
"type": "MULTIPLE",
"display": true
},
{
"id": "structures",
"type": "MULTIPLE",
"display": true
},
{
"id": "difficulty",
"type": "MULTIPLE",
"display": true
},
{
"id": "duration",
"type": "MULTIPLE",
"display": true,
"options": [
{
"minValue": 0,
"maxValue": 1,
"label": "0 - 1h"
},
{
"minValue": 1,
"maxValue": 2,
"label": "1h - 2h"
},
{
"minValue": 2,
"maxValue": 5,
"label": "2h - 5h"
},
{
"minValue": 5,
"maxValue": 10,
"label": "5h - 10h"
}
]
},
{
"id": "length",
"type": "MULTIPLE",
"display": true,
"options": [
{
"minValue": 0,
"maxValue": 5000,
"label": "0 - 5km"
},
{
"minValue": 5000,
"maxValue": 10000,
"label": "5km - 10km"
},
{
"minValue": 10000,
"maxValue": 15000,
"label": "10km - 15km"
},
{
"minValue": 15000,
"maxValue": 50000,
"label": "15km - 50km"
}
]
},
{
"id": "ascent",
"type": "MULTIPLE",
"display": true,
"options": [
{
"minValue": 0,
"maxValue": 500,
"label": "0 - 500m"
},
{
"minValue": 500,
"maxValue": 1000,
"label": "500m - 1km"
}
]
},
{
"id": "routes",
"type": "MULTIPLE",
"display": true
},
{
"id": "accessibilities",
"type": "MULTIPLE",
"display": true
},
{
"id": "outdoorPractice",
"type": "MULTIPLE",
"display": true
},
{
"id": "event",
"type": "MULTIPLE",
"display": true
}
]
2 changes: 2 additions & 0 deletions frontend/config/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"maxPoiPerPage": 50,
"maxTouristicContentPerPage": 50,
"enableSensitiveAreas": false,
"enableOutdoor": false,
"enableTouristicEvents": true,
"portalIds": [],
"apiUrl": "https://geotrekdemo.ecrins-parcnational.fr/api/v2",
"googleAnalyticsId": null,
Expand Down
1 change: 0 additions & 1 deletion frontend/config/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"searchMapZoom": 10,
"mapCredits": "OpenTopoMap",
"mapClassicLayerUrl": "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",
"mapClassicLayerUrlOffline": "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",
"mapSatelliteLayerUrl": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
"zoomAvailableOffline": [13, 14, 15]
}
107 changes: 1 addition & 106 deletions frontend/customization/config/filter.json
Original file line number Diff line number Diff line change
@@ -1,106 +1 @@
[
{
"id": "practices",
"type": "MULTIPLE"
},
{
"id": "categories",
"type": "MULTIPLE"
},
{
"id": "themes",
"type": "MULTIPLE"
},
{
"id": "cities",
"type": "MULTIPLE"
},
{
"id": "districts",
"type": "MULTIPLE"
},
{
"id": "structures",
"type": "MULTIPLE"
},
{
"id": "difficulty",
"type": "MULTIPLE"
},
{
"id": "duration",
"type": "MULTIPLE",
"options": [
{
"minValue": 0,
"maxValue": 1,
"label": "0 - 1h"
},
{
"minValue": 1,
"maxValue": 2,
"label": "1h - 2h"
},
{
"minValue": 2,
"maxValue": 5,
"label": "2h - 5h"
},
{
"minValue": 5,
"maxValue": 10,
"label": "5h - 10h"
}
]
},
{
"id": "length",
"type": "MULTIPLE",
"options": [
{
"minValue": 0,
"maxValue": 5000,
"label": "0 - 5km"
},
{
"minValue": 5000,
"maxValue": 10000,
"label": "5km - 10km"
},
{
"minValue": 10000,
"maxValue": 15000,
"label": "10km - 15km"
},
{
"minValue": 15000,
"maxValue": 50000,
"label": "15km - 50km"
}
]
},
{
"id": "ascent",
"type": "MULTIPLE",
"options": [
{
"minValue": 0,
"maxValue": 500,
"label": "0 - 500m"
},
{
"minValue": 500,
"maxValue": 1000,
"label": "500m - 1km"
}
]
},
{
"id": "routes",
"type": "MULTIPLE"
},
{
"id": "accessibilities",
"type": "MULTIPLE"
}
]
[]
4 changes: 3 additions & 1 deletion frontend/customization/config/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"maxPoiPerPage": 50,
"maxTouristicContentPerPage": 50,
"enableSensitiveAreas": false,
"portalIds": [],
"enableOutdoor": true,
"enableTouristicEvents": true,
"portalIds": [1],
"apiUrl": "https://geotrekdemo.ecrins-parcnational.fr/api/v2",
"googleAnalyticsId": "G-8FSV2N4FXN",
"googleSiteVerificationToken": "eKAyxwaXAobFWQcJen0mnZ8T3CpLoN45JysXeNkRf38",
Expand Down
Loading

0 comments on commit c0513db

Please sign in to comment.