Skip to content

Commit 34d51b8

Browse files
lucadelunetelerveroandreogithub-actions[bot]cwhite911
authored
GRASS community map (#169)
* started to work on community map * added missing geojson folder * fixed geojson sintax * added institutions contributing to GRASS into map * improved popup info * changed logo into image to keep the same code in the page * improved input style * renamed geojson file * improved README file for geojson * fixed name * fixed typos and updates to newer hugo version * several small improvements * improved english * minor typo * Apply suggestions from code review Thanks to @veroandreo @neteler Co-authored-by: Veronica Andreo <veroandreo@gmail.com> Co-authored-by: Markus Neteler <markus@neteler.org> * add space under the map * fixed popup removing when change layer * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * updated community map to use new implementation * fixed MD013/line-length * fixed openlayers style * small improvements * Update static/geojson/user.geojson Co-authored-by: Markus Neteler <markus@neteler.org> * renamed files and fixed problem in markdown * Apply suggestions from code review Co-authored-by: Corey White <smortopahri@gmail.com> * fixed loading js file * fixed missing line at the end of files * Fix community map: load OpenLayers as UMD, not an esbuild bundle Hugo's js.Build (esbuild) breaks OpenLayers' internal instanceof checks (View, Style), so the map crashed at construction with 'TypeError: view.then is not a function' and a bogus 'No fill, stroke, point, or text symbolizer' error. Load ol as its standalone UMD build (window.ol) via a script tag instead of bundling it. Also: fix the initial view center under useGeographic() (plain [lon, lat], no proj transform), build the popup with DOM APIs instead of innerHTML, validate feature URLs are http(s), reset the previously highlighted feature on each click, and switch var to let/const. * Fix community map docs and lint nits - Fix malformed user.geojson link in README (stray double paren) - Add missing EOF newlines to main.scss and _community_map.scss * fixed name of scss file * Apply suggestions from code review Co-authored-by: Corey White <smortopahri@gmail.com> * added records to geojson * added check for geojson files * added check for geojson files --------- Co-authored-by: Markus Neteler <markus@neteler.org> Co-authored-by: Veronica Andreo <veroandreo@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Corey White <smortopahri@gmail.com>
1 parent 02014d0 commit 34d51b8

15 files changed

Lines changed: 772 additions & 31 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ repos:
3535
)
3636
- id: check-case-conflict
3737
- id: check-json
38+
files: \.(json|geojson)$
39+
types: [text]
3840
- id: check-merge-conflict
3941
- id: check-symlinks
4042
- id: check-toml

config.toml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ priority = 0.5
7373
target = "assets/js/photoswipe/photoswipe-lightbox.esm.js"
7474

7575

76+
[[module.mounts]]
77+
source = "node_modules/ol/dist/ol.js"
78+
target = "assets/js/ol/ol.js"
79+
80+
[[module.mounts]]
81+
source = "node_modules/ol/ol.css"
82+
target = "assets/css/ol/ol.css"
83+
84+
7685
[markup]
7786
defaultMarkdownHandler = "goldmark"
7887

@@ -141,35 +150,41 @@ name = "Governance"
141150
weight = 3
142151
URL = "/about/governance"
143152

153+
[[Languages.en.menu.main]]
154+
parent = "About Us"
155+
name = "Community map"
156+
URL = "/about/community-map"
157+
weight = 4
158+
144159
[[Languages.en.menu.main]]
145160
parent = "About Us"
146161
name = "License"
147162
URL = "/about/license"
148-
weight = 4
163+
weight = 5
149164

150165
[[Languages.en.menu.main]]
151166
parent = "About Us"
152167
name = "History"
153168
URL = "/about/history"
154-
weight = 5
169+
weight = 6
155170

156171
[[Languages.en.menu.main]]
157172
parent = "About Us"
158173
name = "Brand"
159174
URL = "/about/brand"
160-
weight = 6
175+
weight = 7
161176

162177
[[Languages.en.menu.main]]
163178
parent = "About Us"
164179
name = "Credits"
165180
URL = "/about/credits"
166-
weight = 7
181+
weight = 8
167182

168183
[[Languages.en.menu.main]]
169184
parent = "About Us"
170185
name = "Citation"
171186
URL = "/about/citation"
172-
weight = 8
187+
weight = 9
173188

174189
[[Languages.en.menu.main]]
175190
weight = 2

content/about/community-map.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "GRASS community map"
3+
date: 2026-07-14T11:02:05+06:00
4+
layout: "community-map"
5+
---
6+
7+
### Add yourself
8+
9+
To add yourself to the GRASS community map, follow [these instructions](https://github.com/OSGeo/grass-website/blob/master/static/geojson/README.md).

package-lock.json

Lines changed: 183 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"@highlightjs/cdn-assets": "^11.11.1",
1111
"bootstrap": "^5.3.7",
1212
"flag-icons": "^7.5.0",
13-
"photoswipe": "^5.4.4"
13+
"photoswipe": "^5.4.4",
14+
"ol": "^10.9.0"
1415
},
1516
"devDependencies": {
1617
"@babel/cli": "^7.28.6",

0 commit comments

Comments
 (0)