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

Replace PNG and GIF files with SVG URIs #298

Merged
merged 9 commits into from
Nov 22, 2020
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
4 changes: 2 additions & 2 deletions Control.Geocoder.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
height: 26px;
border: none;
background-color: white;
background-image: url(images/geocoder.png);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.2 13l3.4 6.6c.6 1.1 2.5-.4 2-1.2l-4-6.2z'/%3E%3Ccircle cx='10.8' cy='8.9' r='3.9' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: center;
cursor: pointer;
Expand All @@ -60,7 +60,7 @@
}

.leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon {
background-image: url(images/throbber.gif);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='%23000' stroke-linecap='round' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Cdefs/%3E%3Cg%3E%3Cpath stroke-opacity='.1' d='M14 8.4l3-5'/%3E%3Cpath stroke-opacity='.2' d='M15.6 10l5-3'/%3E%3Cpath stroke-opacity='.3' d='M16.2 12H22'/%3E%3Cpath stroke-opacity='.4' d='M15.6 14l5 3m-6.5-1.4l2.9 5'/%3E%3Cpath stroke-opacity='.5' d='M12 16.2V22m-2-6.4l-3 5'/%3E%3Cpath stroke-opacity='.6' d='M8.4 14l-5 3'/%3E%3Cpath stroke-opacity='.7' d='M7.8 12H2'/%3E%3Cpath stroke-opacity='.8' d='M8.4 10l-5-3'/%3E%3Cpath stroke-opacity='.9' d='M10 8.4l-3-5'/%3E%3Cpath d='M12 7.8V2'/%3E%3CanimateTransform attributeName='transform' calcMode='discrete' dur='1s' repeatCount='indefinite' type='rotate' values='0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12'/%3E%3C/g%3E%3C/svg%3E");
}

.leaflet-control-geocoder-form-no-error {
Expand Down
7 changes: 1 addition & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
"homepage": "https://github.com/perliedman/leaflet-control-geocoder",
"authors": ["Per Liedman <per@liedman.net>"],
"description": "Extendable geocoder with builtin OSM/Nominatim support",
"main": [
"dist/Control.Geocoder.js",
"dist/Control.Geocoder.css",
"images/geocoder.png",
"images/throbber.gif"
],
"main": ["dist/Control.Geocoder.js", "dist/Control.Geocoder.css"],
"moduleType": ["amd", "globals"],
"keywords": [
"leaflet",
Expand Down
Binary file removed images/geocoder.png
Binary file not shown.
Binary file removed images/throbber.gif
Binary file not shown.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
"module": "src/index.js",
"scripts": {
"prepare": "npm run build",
"build": "npm run build:js && npm run build:css && npm run build:img && npm run build:demo-esbuild && npm run build:demo-rollup && npm run build:demo-webpack",
"build": "npm run build:js && npm run build:css && npm run build:demo-esbuild && npm run build:demo-rollup && npm run build:demo-webpack",
"build:js": "rollup -c",
"build:css": "cpr Control.Geocoder.css dist/Control.Geocoder.css --overwrite",
"build:img": "cpr images/ dist/images/ --overwrite",
"build:demo-esbuild": "cd demo-esbuild && npm install && npm run build",
"build:demo-rollup": "cd demo-rollup && npm install && npm run build",
"build:demo-webpack": "cd demo-rollup && npm install && npm run build",
Expand Down