Skip to content

Commit 168b16d

Browse files
committed
Add logo in map
1 parent 79660b5 commit 168b16d

File tree

9 files changed

+39
-19
lines changed

9 files changed

+39
-19
lines changed

images/pybari.svg

Lines changed: 1 addition & 0 deletions
Loading

images/pymarche.svg

Lines changed: 1 addition & 0 deletions
Loading

images/pypg.png

8.2 KB
Loading

images/pythoncatania.svg

Lines changed: 1 addition & 0 deletions
Loading

images/pythonfirenze.jpg

2.92 KB
Loading

images/pythontorino.svg

Lines changed: 1 addition & 0 deletions
Loading

images/pythonvarese.jpg

6.31 KB
Loading

images/pytrento.jpg

2.46 KB
Loading

mappa/index.html

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
height: 100%;
1616
margin: 0;
1717
}
18-
1918
#map {
2019
height: 100%;
2120
width: 100%;
2221
}
22+
figcaption {
23+
text-align: center;
24+
}
2325
</style>
2426
</head>
2527
<body>
@@ -30,7 +32,8 @@
3032
{
3133
"type": "Feature",
3234
"properties": {
33-
"name": "Pescara",
35+
"logo_url": "../images/pythonpescara.svg",
36+
"name": "Python Pescara",
3437
"url": "https://pescara.python.it"
3538
},
3639
"geometry": {
@@ -42,7 +45,8 @@
4245
{
4346
"type": "Feature",
4447
"properties": {
45-
"name": "Milano",
48+
"logo_url": "https://milano.python.it/assets/img/pymi.png",
49+
"name": "PyMI",
4650
"url": "https://milano.python.it"
4751
},
4852
"geometry": {
@@ -54,7 +58,8 @@
5458
{
5559
"type": "Feature",
5660
"properties": {
57-
"name": "Trento",
61+
"logo_url": "../images//pytrento.jpg",
62+
"name": "PyTrento",
5863
"url": "https://trento.python.it"
5964
},
6065
"geometry": {
@@ -66,7 +71,8 @@
6671
{
6772
"type": "Feature",
6873
"properties": {
69-
"name": "Catania",
74+
"logo_url": "../images/pythoncatania.svg",
75+
"name": "Python Catania",
7076
"url": "https://t.me/pythoncatania"
7177
},
7278
"geometry": {
@@ -78,7 +84,8 @@
7884
{
7985
"type": "Feature",
8086
"properties": {
81-
"name": "Roma",
87+
"logo_url": "https://roma.python.it/img/logo.svg",
88+
"name": "PyRoma",
8289
"url": "https://roma.python.it"
8390
},
8491
"geometry": {
@@ -90,7 +97,8 @@
9097
{
9198
"type": "Feature",
9299
"properties": {
93-
"name": "Bari",
100+
"logo_url": "../images/pybari.svg",
101+
"name": "PyBari",
94102
"url": "https://bari.python.it"
95103
},
96104
"geometry": {
@@ -102,8 +110,9 @@
102110
{
103111
"type": "Feature",
104112
"properties": {
105-
"name": "Biella",
106-
"url": "https://linktr.ee/pythonbiellagroup"
113+
"logo_url": "https://ugc.production.linktr.ee/wlblsv8hT1q7vmLSqtQv_lQOsG5QtYGL251xJ?io=true&size=avatar-v3_0",
114+
"name": "Python Biella",
115+
"url": "https://pythonbiellagroup.it/"
107116
},
108117
"geometry": {
109118
"coordinates": [8.054143437755044, 45.56637092970453],
@@ -114,7 +123,8 @@
114123
{
115124
"type": "Feature",
116125
"properties": {
117-
"name": "Campania",
126+
"logo_url": "https://www.pycampania.it/theme/images/logo.png",
127+
"name": "PyCampania",
118128
"url": "https://pycampania.it/"
119129
},
120130
"geometry": {
@@ -126,8 +136,9 @@
126136
{
127137
"type": "Feature",
128138
"properties": {
129-
"name": "Firenze",
130-
"url": "https://www.meetup.com/python-firenze"
139+
"logo_url": "../images/pythonfirenze.jpg",
140+
"name": "Python Firenze",
141+
"url": "https://firenze.python.it/"
131142
},
132143
"geometry": {
133144
"coordinates": [11.25546174238653, 43.76964120840046],
@@ -138,7 +149,8 @@
138149
{
139150
"type": "Feature",
140151
"properties": {
141-
"name": "Reggio Emilia",
152+
"logo_url": "https://www.pyre.it/static/landing/images/logo.png",
153+
"name": "PyRe",
142154
"url": "https://www.pyre.it"
143155
},
144156
"geometry": {
@@ -150,8 +162,9 @@
150162
{
151163
"type": "Feature",
152164
"properties": {
153-
"name": "Torino",
154-
"url": "https://www.meetup.com/Python-Torino/"
165+
"logo_url": "../images/pythontorino.svg",
166+
"name": "Python Torino",
167+
"url": "https://torino.python.it/"
155168
},
156169
"geometry": {
157170
"coordinates": [7.6823552003580176, 45.06765259825056],
@@ -162,7 +175,8 @@
162175
{
163176
"type": "Feature",
164177
"properties": {
165-
"name": "Perugia",
178+
"logo_url": "../images/pypg.png",
179+
"name": "PyPg",
166180
"url": "http://www.pypg.org/"
167181
},
168182
"geometry": {
@@ -174,7 +188,8 @@
174188
{
175189
"type": "Feature",
176190
"properties": {
177-
"name": "Varese",
191+
"logo_url": "../images/pythonvarese.jpg",
192+
"name": "PyVarese",
178193
"url": "https://varese.python.it/"
179194
},
180195
"geometry": {
@@ -186,7 +201,8 @@
186201
{
187202
"type": "Feature",
188203
"properties": {
189-
"name": "Marche",
204+
"logo_url": "../images/pymarche.svg",
205+
"name": "PyMarche",
190206
"url": "https://marche.python.it/"
191207
},
192208
"geometry": {
@@ -208,7 +224,7 @@
208224
const markers = JSON.parse(document.getElementById("markers-data").textContent);
209225
let feature = L.geoJSON(markers)
210226
.bindPopup(function (layer) {
211-
return "<a href='" + layer.feature.properties.url + "' target='_blank'>" + layer.feature.properties.name + "</a>";
227+
return "<a href='" + layer.feature.properties.url + "' target='_blank'><figure><img src='" + layer.feature.properties.logo_url + "' width='128px' alt='" + layer.feature.properties.name + " logo'><figcaption>" + layer.feature.properties.name + "</figcaption></figure></a>";
212228
})
213229
.addTo(map);
214230
map.fitBounds(feature.getBounds(), { padding: [100, 100] });

0 commit comments

Comments
 (0)