Skip to content

Commit

Permalink
Rework Legacy PNG Icons with Font Awesome SVG
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
hswong3i committed Nov 30, 2021
1 parent 91c9745 commit 27056dc
Show file tree
Hide file tree
Showing 16 changed files with 116 additions and 231 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
package-lock.json
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# See the README for installation instructions.
UGLIFY = node_modules/.bin/uglifyjs
SASS = node_modules/.bin/sass

all: \
$(shell npm install) \
dist/Leaflet.fullscreen.min.js \
.PHONY: all
all: dist/Leaflet.fullscreen.min.js dist/Leaflet.fullscreen.min.css

.PHONY: clean
clean:
rm -f dist/Leaflet.fullscreen.min.js
rm -f dist/Leaflet.fullscreen.min.js dist/Leaflet.fullscreen.min.css

dist/Leaflet.fullscreen.min.js: dist/Leaflet.fullscreen.js
$(UGLIFY) dist/Leaflet.fullscreen.js > dist/Leaflet.fullscreen.min.js
dist/Leaflet.fullscreen.min.js:
$(UGLIFY) src/Leaflet.fullscreen.js > dist/Leaflet.fullscreen.min.js

.PHONY: clean
dist/Leaflet.fullscreen.min.css:
$(SASS) src/Leaflet.fullscreen.scss dist/Leaflet.fullscreen.min.css
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,17 @@ Leaflet.fullscreen is [available through the Mapbox Plugin CDN](https://www.mapb

### Building

npm install && make

__ProTip__ You may want to install `watch` so you can run `watch make`
without needing to execute make on every change.
npm install
npm run test
npm run uglifyjs
npm run sass

### Supported Leaflet Versions

Leaflet 1.0 and later is supported. Earlier versions may work, but are not tested.

### License

ISC

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)
1 change: 1 addition & 0 deletions compress-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/Leaflet.fullscreen.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/Leaflet.fullscreen.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/Leaflet.fullscreen.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed dist/fullscreen.png
Binary file not shown.
Binary file removed dist/[email protected]
Binary file not shown.
40 changes: 0 additions & 40 deletions dist/leaflet.fullscreen.css

This file was deleted.

1 change: 1 addition & 0 deletions expand-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
147 changes: 0 additions & 147 deletions fullscreen.svg

This file was deleted.

Loading

0 comments on commit 27056dc

Please sign in to comment.