Skip to content
This repository was archived by the owner on Aug 3, 2021. It is now read-only.

Commit 551f974

Browse files
committed
vue analytics, created sub directory for images
1 parent f820ce4 commit 551f974

11 files changed

+69
-28
lines changed

package-lock.json

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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"gh-pages": "^3.1.0",
1616
"marker-clusterer-plus": "^2.1.4",
1717
"tailwindcss": "^1.6.2",
18-
"vue": "^2.6.11"
18+
"vue": "^2.6.11",
19+
"vue-analytics": "^5.22.1"
1920
},
2021
"devDependencies": {
2122
"@vue/cli-plugin-babel": "^4.2.0",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/components/Header.vue

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
<div class="flex items-center justify-between h-16">
66
<div class="flex items-center">
77
<div class="flex-shrink-0">
8-
<img class="h-10 w-10" src="@/assets/fttx-logo.png" alt="FTTx.gr logo" />
8+
<img
9+
class="h-10 w-10"
10+
src="@/assets/img/fttx-logo.png"
11+
alt="FTTx.gr logo"
12+
/>
913
</div>
1014
<div class="hidden md:block">
1115
<div class="ml-10 flex items-baseline">
@@ -17,7 +21,8 @@
1721
]"
1822
@click.prevent="currentPage('map')"
1923
class="px-3 py-2 rounded-md text-sm font-medium focus:outline-none focus:text-white focus:bg-gray-700"
20-
>Map</a>
24+
>Map</a
25+
>
2126
<a
2227
:class="[
2328
currPage == 'add' ? 'text-white bg-gray-900' : '',
@@ -26,11 +31,13 @@
2631
@click.prevent="currentPage('add')"
2732
href="/"
2833
class="ml-4 px-3 py-2 rounded-md text-sm font-medium hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700"
29-
>Add Cabinet</a>
34+
>Add Cabinet</a
35+
>
3036
<a
3137
href="https://github.com/fttx-gr"
3238
class="text-gray-300 ml-4 px-3 py-2 rounded-md text-sm font-medium hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700"
33-
>GitHub</a>
39+
>GitHub</a
40+
>
3441
</div>
3542
</div>
3643
</div>
@@ -41,7 +48,12 @@
4148
class="p-1 border-2 border-transparent text-gray-400 rounded-full hover:text-white focus:outline-none focus:text-white focus:bg-gray-700"
4249
aria-label="Notifications"
4350
>
44-
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
51+
<svg
52+
class="h-6 w-6"
53+
stroke="currentColor"
54+
fill="none"
55+
viewBox="0 0 24 24"
56+
>
4557
<path
4658
stroke-linecap="round"
4759
stroke-linejoin="round"
@@ -67,16 +79,16 @@ export default {
6779
profileDropdown: false,
6880
vcoConfig: {
6981
events: ["dblclick", "click"],
70-
isActive: true
71-
}
82+
isActive: true,
83+
},
7284
};
7385
},
7486
methods: {
7587
currentPage(page) {
7688
this.currPage = page;
7789
this.$emit("setPage", page);
78-
}
79-
}
90+
},
91+
},
8092
};
8193
</script>
8294
<style scoped lang="postcss">
@@ -98,4 +110,4 @@ body {
98110
transform: translateY(-50px);
99111
opacity: 0;
100112
}
101-
</style>
113+
</style>

src/components/Map.vue

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,16 @@
4747
<button
4848
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline ml-2"
4949
@click="usePlace"
50-
>Add</button>
50+
>
51+
Add
52+
</button>
5153
</label>
5254
</div>
5355
<div class="relative h-full w-full">
54-
<div class="absolute bottom-0 right-0 h-64 w-48" style="text-align: left;">
56+
<div
57+
class="absolute bottom-0 right-0 h-64 w-48"
58+
style="text-align: left;"
59+
>
5560
<button
5661
@click="
5762
buttons.ote.isOn = !buttons.ote.isOn;
@@ -65,7 +70,9 @@
6570
type="button"
6671
style="position: fixed; z-index: 999; bottom: 600px;"
6772
class="bg-blue-700 hover:bg-blue-500 text-white font-bold py-2 px-4 rounded"
68-
>{{ buttons.ote.text }}</button>
73+
>
74+
{{ buttons.ote.text }}
75+
</button>
6976
<button
7077
@click="
7178
buttons.wind.isOn = !buttons.wind.isOn;
@@ -78,7 +85,9 @@
7885
"
7986
style="position: fixed; z-index: 999; bottom: 550px;"
8087
class="bg-blue-500 hover:bg-blue-400 text-white font-bold py-2 px-4 rounded"
81-
>{{ buttons.wind.text }}</button>
88+
>
89+
{{ buttons.wind.text }}
90+
</button>
8291
<button
8392
@click="
8493
buttons.vf.isOn = !buttons.vf.isOn;
@@ -91,7 +100,9 @@
91100
"
92101
style="position: fixed; z-index: 999; bottom: 500px;"
93102
class="bg-red-700 hover:bg-red-500 text-white font-bold py-2 px-4 rounded"
94-
>{{ buttons.vf.text }}</button>
103+
>
104+
{{ buttons.vf.text }}
105+
</button>
95106
<button
96107
@click="
97108
buttons.rurcon.isOn = !buttons.rurcon.isOn;
@@ -104,7 +115,9 @@
104115
"
105116
style="position: fixed; z-index: 999; bottom: 450px;"
106117
class="bg-orange-800 hover:bg-orange-700 text-white font-bold py-2 px-4 rounded"
107-
>{{ buttons.rurcon.text }}</button>
118+
>
119+
{{ buttons.rurcon.text }}
120+
</button>
108121
</div>
109122
</div>
110123

@@ -223,10 +236,10 @@ export default {
223236
};
224237
225238
const markerIcon = {
226-
Vodafone: require("../assets/vf-marker-minified.png"),
227-
OTE: require("../assets/ote-marker-minified.png"),
228-
WIND: require("../assets/wind-marker-minified.png"),
229-
RURALCONNECT: require("../assets/rurcon-marker-minified.png"),
239+
Vodafone: require("../assets/img/vf-marker-minified.png"),
240+
OTE: require("../assets/img/ote-marker-minified.png"),
241+
WIND: require("../assets/img/wind-marker-minified.png"),
242+
RURALCONNECT: require("../assets/img/rurcon-marker-minified.png"),
230243
};
231244
if (this.buttons[cab].isOn) {
232245
let temp = [];
@@ -261,7 +274,7 @@ export default {
261274
const infowindow = new google.maps.InfoWindow({
262275
content: d.infoText,
263276
});
264-
marker.addListener("click", function () {
277+
marker.addListener("click", function() {
265278
infowindow.open(this.map, marker);
266279
});
267280
this.markers.push(marker);
@@ -394,8 +407,14 @@ export default {
394407
}
395408
396409
return {
397-
lat: this.map.getCenter().lat().toFixed(4),
398-
lng: this.map.getCenter().lng().toFixed(4),
410+
lat: this.map
411+
.getCenter()
412+
.lat()
413+
.toFixed(4),
414+
lng: this.map
415+
.getCenter()
416+
.lng()
417+
.toFixed(4),
399418
};
400419
},
401420
},
@@ -413,13 +432,13 @@ export default {
413432
const marker = new google.maps.Marker({
414433
position: d.position,
415434
map: this.map,
416-
icon: require("../assets/ote-marker-dslam-minified.png"),
435+
icon: require("../assets/img/ote-marker-dslam-minified.png"),
417436
});
418437
marker.db = d;
419438
const infowindow = new google.maps.InfoWindow({
420439
content: d.infoText,
421440
});
422-
marker.addListener("click", function () {
441+
marker.addListener("click", function() {
423442
this.showInfo;
424443
infowindow.open(this.map, marker);
425444
});

0 commit comments

Comments
 (0)