added map
This commit is contained in:
@@ -117,6 +117,9 @@ func callApi(ip string) ipResponse {
|
||||
|
||||
err = json.Unmarshal(body, &values)
|
||||
|
||||
slog.Debug("Api1 res:", "ip", values.IP, "country", values.Country, "continent:", values.ContinentCode,
|
||||
"ISP", values.AsName)
|
||||
|
||||
return values
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -15,9 +15,11 @@ h1 {
|
||||
|
||||
.layout {
|
||||
display: flex;
|
||||
gap: 40px;
|
||||
align-items: flex-start;
|
||||
padding: 0 40px;
|
||||
gap: 40px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.container {
|
||||
@@ -28,6 +30,7 @@ h1 {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
flex-shrink: 0;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.info {
|
||||
|
||||
+1
-1
@@ -45,8 +45,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
||||
<!-- prettier-ignore -->
|
||||
<script>
|
||||
var map = L.map('map', { maxZoom: 10 }).setView([{{.IP2.Lat}}, {{.IP2.Lon}}], 8);
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
|
||||
Reference in New Issue
Block a user