Skip to content

Commit 0678011

Browse files
author
Peter Rushforth
committed
Make w3c community groups icon local / don't bother w3c server
1 parent d97f330 commit 0678011

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

Gruntfile.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ module.exports = function(grunt) {
7777
filter: 'isFile',
7878
src: ['*.png'],
7979
dest: 'dist/images/'
80+
},
81+
{
82+
expand: true,
83+
flatten: true,
84+
filter: 'isFile',
85+
src: ['w3community.ico'],
86+
dest: 'dist/images/'
8087
}
8188
]
8289
},

src/mapml/control/AttributionButton.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { Control, DomUtil, DomEvent, Map } from 'leaflet';
22

33
export var AttributionButton = Control.Attribution.extend({
4-
options: {
5-
prefix:
6-
'<img src="https://www.w3.org/community/wp-content/themes/StoryTeller/favicon.ico" style="position: relative; top: 5px" alt="W3C Community and Business Groups logo"> <a href="https://www.w3.org/community/maps4html/">Maps for HTML Community Group</a> | <img src="data:image/svg+xml;base64,PHN2ZyBhcmlhLWhpZGRlbj0idHJ1ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTIiIGhlaWdodD0iOCI+PHBhdGggZmlsbD0iIzRDN0JFMSIgZD0iTTAgMGgxMnY0SDB6Ii8+PHBhdGggZmlsbD0iI0ZGRDUwMCIgZD0iTTAgNGgxMnYzSDB6Ii8+PHBhdGggZmlsbD0iI0UwQkMwMCIgZD0iTTAgN2gxMnYxSDB6Ii8+PC9zdmc+" style="padding-right: 0.3em;" alt="Slava Ukraini"> <a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a> '
7-
},
84
_getLocale: function () {
95
return this.options.mapEl && this.options.mapEl.locale
106
? this.options.mapEl.locale
@@ -85,6 +81,13 @@ Map.addInitHook(function () {
8581
}
8682
});
8783

88-
export var attributionButton = function (options) {
84+
export var attributionButton = function (opts) {
85+
/* jshint ignore:start */
86+
const w3icon = new URL('images/w3community.ico', import.meta.url)
87+
.href;
88+
/* jshint ignore:end */
89+
const options = Object.assign(opts, {
90+
prefix: `<img src="${w3icon}" style="position: relative; top: 5px" alt="W3C Community and Business Groups logo"> <a href="https://www.w3.org/community/maps4html/">Maps for HTML Community Group</a> | <img src="data:image/svg+xml;base64,PHN2ZyBhcmlhLWhpZGRlbj0idHJ1ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTIiIGhlaWdodD0iOCI+PHBhdGggZmlsbD0iIzRDN0JFMSIgZD0iTTAgMGgxMnY0SDB6Ii8+PHBhdGggZmlsbD0iI0ZGRDUwMCIgZD0iTTAgNGgxMnYzSDB6Ii8+PHBhdGggZmlsbD0iI0UwQkMwMCIgZD0iTTAgN2gxMnYxSDB6Ii8+PC9zdmc+" style="padding-right: 0.3em;" alt="Slava Ukraini"> <a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a> `
91+
});
8992
return new AttributionButton(options);
9093
};

w3community.ico

1.12 KB
Binary file not shown.

0 commit comments

Comments
 (0)