Skip to content

Commit e0b461c

Browse files
committed
no more CDN, closes #167
1 parent 0e6e3e2 commit e0b461c

33 files changed

+3500
-85
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
- **Human-readable sitemap** - New `/pages` endpoint showing organized list of all pages with descriptions, categorized into Main Pages, Data & Technical, Information & Help, User Pages, and Development sections.
1111
- **Custom error pages** - Added styled 404 and 500 error pages matching application design with navigation links and help information directing users to About and Accessibility pages.
1212
- **Map popup enhancement** - Added "View Publication Details" button to map popups linking to work landing pages.
13+
- **Paginated popup for overlapping features** - When multiple publications overlap on the map, a paginated popup allows users to cycle through them with Previous/Next navigation showing "Publication X of Y".
14+
- **Point geometry highlighting** - Map markers (CircleMarkers) now show visual feedback when selected with increased size (10px) and high-contrast gold/orange colors, matching polygon highlighting behavior.
1315
- **Admin unpublish functionality** - Admins can unpublish works, changing status from Published to Draft.
1416
- **RSS/Atom feed harvesting support** - Added support for harvesting publications from RSS/Atom feeds in addition to OAI-PMH.
1517
- **Django management command `harvest_journals`** - Command-line tool for harvesting from real journal sources with progress reporting and statistics.
@@ -31,3 +33,10 @@
3133
### Fixed
3234

3335
- **JavaScript scope error** - Fixed "drawnItems is not defined" error in contribution form by declaring variable in outer scope.
36+
- **GeoJSON geometry detection** - Fixed map click detection for GeoJSON layers by working directly with `layer.feature.geometry` instead of unreliable `instanceof` checks. Implemented proper point-in-polygon (ray casting), point-on-line (distance threshold), and point detection algorithms.
37+
- **Map popup null location error** - Fixed crash when opening paginated popup by reordering operations to close existing popup before setting new location.
38+
- **Highlight persistence after popup close** - Geometries now properly return to default blue style when popups close, removing gold dashed borders and explicit fill colors.
39+
- **Individual popups during pagination** - Individual feature popups no longer open simultaneously with paginated popup, preventing UI conflicts.
40+
- **Close button highlight clearing** - Popup close button (X) and ESC key now properly clear geometry highlights, not just map clicks.
41+
- **First page highlight race condition** - Fixed race condition where first page of paginated popup wasn't highlighted due to premature clearing by `popupclose` event handler.
42+
- **CircleMarker style properties** - Point geometries now use appropriate style properties (`radius` instead of `dashArray`) for proper visual feedback.

publications/static/README.md

Lines changed: 103 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,115 @@
11
# Provenance of dependencies
22

3-
## JS file sources
3+
All external JavaScript and CSS libraries are served locally from this directory to avoid CDN dependencies.
44

5-
```bash
6-
wget https://code.jquery.com/jquery-3.4.1.slim.min.js -P js/
7-
wget https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js -P js/
8-
wget https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js.map -P js/
9-
wget https://unpkg.com/[email protected]/dist/leaflet.js -P js/
10-
wget https://unpkg.com/[email protected]/dist/leaflet.js.map -P js/
11-
```
5+
## Automated Download Script
126

13-
Required for Bootstrap tooltips in REST Framework UI:
7+
Run the download script to update all libraries to their specified versions:
148

159
```bash
16-
wget https://unpkg.com/@popperjs/core@2 -O js/popper.js
10+
cd publications/static
11+
./download_libraries.sh
1712
```
1813

19-
## CSS file sources
14+
This script downloads all dependencies listed below.
2015

21-
```bash
22-
wget https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css -P css/
23-
wget https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css.map -P css/
24-
wget https://unpkg.com/[email protected]/dist/leaflet.css -P css/
25-
26-
wget https://unpkg.com/[email protected]/dist/images/marker-icon.png -P css/images
27-
wget https://unpkg.com/[email protected]/dist/images/marker-icon-2x.png -P css/images
28-
wget https://unpkg.com/[email protected]/dist/images/marker-shadow.png -P css/images
29-
wget https://unpkg.com/[email protected]/dist/images/layers.png -P css/images
30-
wget https://unpkg.com/[email protected]/dist/images/layers-2x.png -P css/images
31-
```
16+
## JS Libraries
17+
18+
### Core Libraries
19+
20+
- **jQuery 3.4.1** - MIT License
21+
- Source: https://code.jquery.com/jquery-3.4.1.slim.min.js
22+
- Files: `js/jquery-3.4.1.slim.min.js`
23+
24+
- **Bootstrap 4.4.1** - MIT License
25+
- Source: https://cdn.jsdelivr.net/npm/[email protected]/dist/js/
26+
- Files: `js/bootstrap.min.js`, `js/bootstrap.min.js.map`
27+
28+
- **Popper.js 2.x** - MIT License (required for Bootstrap tooltips)
29+
- Source: https://unpkg.com/@popperjs/core@2/dist/umd/
30+
- Files: `js/popper.min.js`
31+
32+
### Leaflet and Plugins
33+
34+
- **Leaflet 1.9.4** - BSD-2-Clause License
35+
- Source: https://unpkg.com/[email protected]/dist/
36+
- Files: `js/leaflet.js`, `js/leaflet.js.map`
37+
- Homepage: https://leafletjs.com/
38+
39+
- **Leaflet Draw 1.0.4** - MIT License
40+
- Source: https://unpkg.com/[email protected]/dist/
41+
- Files: `js/leaflet.draw.js`
42+
- Homepage: https://github.com/Leaflet/Leaflet.draw
43+
44+
- **Leaflet Fullscreen 3.0.2** - MIT License
45+
- Source: https://unpkg.com/[email protected]/
46+
- Files: `js/leaflet.fullscreen.js`
47+
- Homepage: https://github.com/brunob/leaflet.fullscreen
48+
49+
### Other Libraries
50+
51+
- **Bootstrap Datepicker 1.9.0** - Apache License 2.0
52+
- Source: https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/
53+
- Files: `js/bootstrap-datepicker.min.js`
54+
- Homepage: https://github.com/uxsolutions/bootstrap-datepicker
55+
56+
## CSS Libraries
57+
58+
### Core Stylesheets
59+
60+
- **Bootstrap 4.4.1** - MIT License
61+
- Source: https://cdn.jsdelivr.net/npm/[email protected]/dist/css/
62+
- Files: `css/bootstrap.min.css`, `css/bootstrap.min.css.map`
63+
64+
- **Leaflet 1.9.4** - BSD-2-Clause License
65+
- Source: https://unpkg.com/[email protected]/dist/
66+
- Files: `css/leaflet.css`
67+
68+
- **Leaflet Draw 1.0.4** - MIT License
69+
- Source: https://unpkg.com/[email protected]/dist/
70+
- Files: `css/leaflet.draw.css`
71+
72+
- **Leaflet Fullscreen 3.0.2** - MIT License
73+
- Source: https://unpkg.com/[email protected]/
74+
- Files: `css/leaflet.fullscreen.css`
75+
76+
- **Bootstrap Datepicker 1.9.0** - Apache License 2.0
77+
- Source: https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/
78+
- Files: `css/bootstrap-datepicker.min.css`
79+
80+
### Fonts
81+
82+
- **Font Awesome 4.7.0** - Font: SIL OFL 1.1, CSS: MIT License
83+
- Source: https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/
84+
- Files: `css/font-awesome.min.css`, `css/fonts/fontawesome-webfont.*`
85+
- Homepage: https://fontawesome.com/
86+
87+
## Images
88+
89+
### Leaflet Marker Icons
90+
91+
- **Default Leaflet Markers** - BSD-2-Clause License
92+
- Source: https://unpkg.com/[email protected]/dist/images/
93+
- Files: `css/images/marker-icon*.png`, `css/images/marker-shadow.png`, `css/images/layers*.png`
94+
95+
- **Leaflet Draw Sprites** - MIT License
96+
- Source: https://unpkg.com/[email protected]/dist/images/
97+
- Files: `css/images/spritesheet*.png`, `css/images/spritesheet.svg`
98+
99+
- **Leaflet Fullscreen Icons** - MIT License
100+
- Source: https://unpkg.com/[email protected]/
101+
- Files: `css/images/fullscreen/icon-fullscreen*.png`
102+
103+
### Colored Markers
32104

33-
## Fonts
105+
- **Leaflet Color Markers** - BSD-2-Clause License
106+
- Source: https://github.com/pointhi/leaflet-color-markers
107+
- Files: `css/images/marker-icon-{color}.png`, `css/images/marker-icon-2x-{color}.png`
108+
- Colors available: red, orange, gold, blue (and others in upstream repo)
109+
- Used for highlighting selected features on the map
110+
- License: https://github.com/pointhi/leaflet-color-markers/blob/master/LICENSE
34111

35-
<https://use.fontawesome.com/releases/v6.2.1/fontawesome-free-6.2.1-web.zip>
112+
## License Compliance
36113

37-
See <https://fontawesome.com/docs/web/setup/host-yourself/webfonts>.
38-
We only use the (free) 'solid' variant of CSS and fonts.
114+
All libraries used are open-source with permissive licenses (MIT, BSD-2-Clause, Apache 2.0, SIL OFL 1.1).
115+
See individual library homepages for full license texts.

0 commit comments

Comments
 (0)