Skip to content

Commit e002bf1

Browse files
committed
Rework Legacy PNG Icons with Font Awesome SVG
Existing implementation handle icon with PNG, with manual positioning with CSS background image. This PR rework icons with Font Awesome SVG: - Locally venor Font Awesome v5.15.4 `expand-solid.svg` and `compress-solid.svg` - Rework styling with SCSS - Fix accessibility (see Leaflet#110) - Test with Leaflet v1.7.1 - Update demo with above changes Fix Leaflet#98 Fix Leaflet#102 Fix Leaflet#103 Fix Leaflet#110 Fix Leaflet#114 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
1 parent 91c9745 commit e002bf1

16 files changed

+105
-231
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
package-lock.json

Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# See the README for installation instructions.
22
UGLIFY = node_modules/.bin/uglifyjs
3+
SASS = node_modules/.bin/sass
34

4-
all: \
5-
$(shell npm install) \
6-
dist/Leaflet.fullscreen.min.js \
5+
.PHONY: all
6+
all: dist/Leaflet.fullscreen.min.js dist/Leaflet.fullscreen.min.css
77

8+
.PHONY: clean
89
clean:
9-
rm -f dist/Leaflet.fullscreen.min.js
10+
rm -f dist/Leaflet.fullscreen.min.js dist/Leaflet.fullscreen.min.css
1011

11-
dist/Leaflet.fullscreen.min.js: dist/Leaflet.fullscreen.js
12-
$(UGLIFY) dist/Leaflet.fullscreen.js > dist/Leaflet.fullscreen.min.js
12+
dist/Leaflet.fullscreen.min.js:
13+
$(UGLIFY) src/Leaflet.fullscreen.js > dist/Leaflet.fullscreen.min.js
1314

14-
.PHONY: clean
15+
dist/Leaflet.fullscreen.min.css:
16+
$(SASS) src/Leaflet.fullscreen.scss dist/Leaflet.fullscreen.min.css

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,17 @@ Leaflet.fullscreen is [available through the Mapbox Plugin CDN](https://www.mapb
5959

6060
### Building
6161

62-
npm install && make
63-
64-
__ProTip__ You may want to install `watch` so you can run `watch make`
65-
without needing to execute make on every change.
62+
npm install
63+
npm run test
64+
npm run uglifyjs
65+
npm run sass
6666

6767
### Supported Leaflet Versions
6868

6969
Leaflet 1.0 and later is supported. Earlier versions may work, but are not tested.
70+
71+
### License
72+
73+
ISC
74+
75+
SVG icons from [Font Awesome v5.15.4](https://github.com/FortAwesome/Font-Awesome/releases/tag/5.15.4): [Creative Commons Attribution 4.0](https://fontawesome.com/license/free)

compress-solid.svg

Lines changed: 1 addition & 0 deletions
Loading

dist/Leaflet.fullscreen.min.css

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

dist/Leaflet.fullscreen.min.css.map

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

dist/Leaflet.fullscreen.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fullscreen.png

-299 Bytes
Binary file not shown.

dist/[email protected]

-420 Bytes
Binary file not shown.

dist/leaflet.fullscreen.css

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)