Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #10786 Review of the home description image #10823

Merged
merged 7 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions build/prod-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const paths = {
code: path.join(__dirname, "..", "web", "client")
};

const favicon = path.join(__dirname, '..', 'web', 'client', 'product', 'assets', 'img', 'favicon.png');

module.exports = require('./buildConfig')({
bundles: {
"mapstore2": path.join(paths.code, "product", "app"),
Expand All @@ -30,39 +32,44 @@ module.exports = require('./buildConfig')({
publicPath: 'dist/',
chunks: ['mapstore2'],
inject: "body",
hash: true
hash: true,
favicon
}),
new HtmlWebpackPlugin({
template: path.join(paths.framework, 'embeddedTemplate.html'),
publicPath: 'dist/',
chunks: ['embedded'],
inject: "body",
hash: true,
filename: 'embedded.html'
filename: 'embedded.html',
favicon
}),
new HtmlWebpackPlugin({
template: path.join(paths.framework, 'apiTemplate.html'),
publicPath: 'dist/',
chunks: ['ms2-api'],
inject: 'body',
hash: true,
filename: 'api.html'
filename: 'api.html',
favicon
}),
new HtmlWebpackPlugin({
template: path.join(paths.framework, 'geostory-embedded-template.html'),
publicPath: 'dist/',
chunks: ['geostory-embedded'],
inject: "body",
hash: true,
filename: 'geostory-embedded.html'
filename: 'geostory-embedded.html',
favicon
}),
new HtmlWebpackPlugin({
template: path.join(paths.framework, 'dashboard-embedded-template.html'),
publicPath: 'dist/',
chunks: ['dashboard-embedded'],
inject: 'body',
hash: true,
filename: 'dashboard-embedded.html'
filename: 'dashboard-embedded.html',
favicon
})
]
});
98 changes: 98 additions & 0 deletions docs/developer-guide/mapstore-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,104 @@ This is a list of things to check if you want to update from a previous version

## Migration from 2024.02.00 to 2025.01.00

### HomeDescription plugin configuration changes

The HomeDescription plugin has been refactored and a property has been removed:

- `cfg.name` removed in favor of the translation message `home.shortDescription`

For downstream projects review the `.less` or `.css` files for possible conflicting style related to the `.ms-home-description` class selector

### Update of CDN favicon

The usage of default CDN favicon is deprecated so existing downstream project still using this setup should be updated as follow:

1. Add a favicon image inside the `assets/img` folder:

```text
MapStoreProject/
|-- ...
|-- assets/
| |-- img/
| |-- favicon.png (new)
|-- ...
|-- dashboard-embedded-template.html
|-- dashboard-embedded.html
|-- embedded.html
|-- embeddedTemplate.html
|-- geostory-embedded-template.html
|-- geostory-embedded.html
|-- index.html
|-- indexTemplate.html
|-- ...
|-- prod-webpack.config.js
|-- ...
```

2. Remove the existing favicon link from all the html files (index.html, indexTemplate.html, embedded.html, embeddedTemplate.hml, ...):

```diff
- <link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
```

3. Include the new favicon inside the `prod-webpack.config.js` file:

```diff

+ const favicon = path.join(__dirname, "assets", "img", "favicon.png');

module.exports = require('./MapStore2/build/buildConfig')({
...
prodPlugins: [
new HtmlWebpackPlugin({
template: path.join(__dirname, 'indexTemplate.html'),
chunks: ['__PROJECTNAME__'],
publicPath: 'dist/',
inject: "body",
hash: true,
+ favicon
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'embeddedTemplate.html'),
chunks: ['__PROJECTNAME__-embedded'],
publicPath: 'dist/',
inject: "body",
hash: true,
filename: 'embedded.html',
+ favicon
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'apiTemplate.html'),
chunks: ['__PROJECTNAME__-api'],
publicPath: 'dist/',
inject: 'body',
hash: true,
filename: 'api.html',
+ favicon
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'geostory-embedded-template.html'),
chunks: ['geostory-embedded'],
publicPath: 'dist/',
inject: "body",
hash: true,
filename: 'geostory-embedded.html',
+ favicon
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'dashboard-embedded-template.html'),
chunks: ['dashboard-embedded'],
publicPath: 'dist/',
inject: 'body',
hash: true,
filename: 'dashboard-embedded.html',
+ favicon
})
],
...
});
```

### Add TagsManager and Favorite plugins to localConfig.json

The new TagsManager and Favorite plugin should be added inside the plugins `maps` section of the `localConfig.json` to visualize a new menu item in the admin menu and to to visualize the button on the resource cards
Expand Down
Binary file added project/standard/static/assets/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
1 change: 0 additions & 1 deletion project/standard/templates/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<title>__PROJECTDESCRIPTION__</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
<style>
Expand Down
1 change: 0 additions & 1 deletion project/standard/templates/apiTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<title>__PROJECTDESCRIPTION__</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
<style>
Expand Down
1 change: 0 additions & 1 deletion project/standard/templates/embedded.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
</head>
Expand Down
1 change: 0 additions & 1 deletion project/standard/templates/embeddedTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
<script src="https://unpkg.com/bowser@2.7.0/es5.js"
Expand Down
1 change: 0 additions & 1 deletion project/standard/templates/geostory-embedded-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script src="https://unpkg.com/bowser@2.7.0/es5.js"
async integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
Expand Down
1 change: 0 additions & 1 deletion project/standard/templates/geostory-embedded.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
</head>
<body>
Expand Down
1 change: 0 additions & 1 deletion project/standard/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
<!--<script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=__API_KEY_MAPQUEST__"></script>-->
Expand Down
1 change: 0 additions & 1 deletion project/standard/templates/indexTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script src="https://unpkg.com/bowser@2.7.0/es5.js"
async integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
Expand Down
18 changes: 13 additions & 5 deletions project/standard/templates/prod-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const paths = {
framework: path.join(__dirname, "MapStore2", "web", "client"),
code: [path.join(__dirname, "js"), path.join(__dirname, "MapStore2", "web", "client")]
};

const favicon = path.join(__dirname, "assets", "img", "favicon.png');

module.exports = require('./MapStore2/build/buildConfig')({
bundles: {
'__PROJECTNAME__': path.join(__dirname, "js", "app"),
Expand All @@ -31,39 +34,44 @@ module.exports = require('./MapStore2/build/buildConfig')({
chunks: ['__PROJECTNAME__'],
publicPath: 'dist/',
inject: "body",
hash: true
hash: true,
favicon
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'embeddedTemplate.html'),
chunks: ['__PROJECTNAME__-embedded'],
publicPath: 'dist/',
inject: "body",
hash: true,
filename: 'embedded.html'
filename: 'embedded.html',
favicon
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'apiTemplate.html'),
chunks: ['__PROJECTNAME__-api'],
publicPath: 'dist/',
inject: 'body',
hash: true,
filename: 'api.html'
filename: 'api.html',
favicon
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'geostory-embedded-template.html'),
chunks: ['geostory-embedded'],
publicPath: 'dist/',
inject: "body",
hash: true,
filename: 'geostory-embedded.html'
filename: 'geostory-embedded.html',
favicon
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, 'dashboard-embedded-template.html'),
chunks: ['dashboard-embedded'],
publicPath: 'dist/',
inject: 'body',
hash: true,
filename: 'dashboard-embedded.html'
filename: 'dashboard-embedded.html',
favicon
})
],
alias: {
Expand Down
1 change: 0 additions & 1 deletion web/client/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<title>Page with MapStore API</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
<style>
Expand Down
1 change: 0 additions & 1 deletion web/client/apiTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<title>Page with MapStore API</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
<style>
Expand Down
1 change: 0 additions & 1 deletion web/client/components/share/api-template.raw
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.2/leaflet.draw.css" />
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<script src="https://maps.google.com/maps/api/js?v=3"></script>
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet.js"></script>
Expand Down
19 changes: 1 addition & 18 deletions web/client/configs/localConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -708,24 +708,7 @@
"FeedbackMask"
],
"common": [{
"name": "BrandNavbar",
"cfg": {
"rightMenuItems": [{
"type": "link",
"href": "https://docs.mapstore.geosolutionsgroup.com/",
"target": "blank",
"glyph": "book",
"labelId": "Documentation",
"variant": "default"
}, {
"type": "link",
"href": "https://github.com/geosolutions-it/MapStore2",
"target": "blank",
"label": "GitHub",
"glyph": "github",
"variant": "default"
}]
}
"name": "BrandNavbar"
},
{ "name": "ManagerMenu" },
"Login","Language", "ScrollTop", "Notifications"],
Expand Down
3 changes: 1 addition & 2 deletions web/client/embedded.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MapStore HomePage</title>
<title>Map Embedded</title>
<style>
body {
margin: 0;
Expand Down Expand Up @@ -84,7 +84,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
</head>
Expand Down
3 changes: 1 addition & 2 deletions web/client/embeddedTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MapStore HomePage</title>
<title>Map Embedded</title>
<style>
body {
margin: 0;
Expand Down Expand Up @@ -84,7 +84,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
<script src="https://unpkg.com/bowser@2.7.0/es5.js"
Expand Down
1 change: 0 additions & 1 deletion web/client/geostory-embedded-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script src="https://unpkg.com/bowser@2.7.0/es5.js"
async integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
Expand Down
1 change: 0 additions & 1 deletion web/client/geostory-embedded.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
</style>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
</head>
<body>
Expand Down
Loading