Update index.html
This commit is contained in:
parent
35c3483b12
commit
dcb4efcec7
100
index.html
100
index.html
|
@ -15,45 +15,45 @@
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0.
|
||||||
}
|
}
|
||||||
iframe {
|
iframe {
|
||||||
border: none;
|
border: none;
|
||||||
width: 800px;
|
width: 800px;
|
||||||
height: 600px;
|
height: 600px;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
display: block;
|
display: block.
|
||||||
}
|
}
|
||||||
.button {
|
.button {
|
||||||
display: inline-block;
|
display: inline-block.
|
||||||
margin: 10px 20px;
|
margin: 10px 20px.
|
||||||
padding: 10px 20px;
|
padding: 10px 20px.
|
||||||
font-size: 16px;
|
font-size: 16px.
|
||||||
color: white;
|
color: white.
|
||||||
background-color: #007bff;
|
background-color: #007bff.
|
||||||
border: none;
|
border: none.
|
||||||
border-radius: 5px;
|
border-radius: 5px.
|
||||||
text-decoration: none;
|
text-decoration: none.
|
||||||
cursor: pointer;
|
cursor: pointer.
|
||||||
}
|
}
|
||||||
.button:hover {
|
.button:hover {
|
||||||
background-color: #0056b3;
|
background-color: #0056b3.
|
||||||
}
|
}
|
||||||
#button-container {
|
#button-container {
|
||||||
display: flex;
|
display: flex.
|
||||||
justify-content: center;
|
justify-content: center.
|
||||||
align-items: center;
|
align-items: center.
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap.
|
||||||
}
|
}
|
||||||
#consent-banner {
|
#consent-banner {
|
||||||
position: fixed;
|
position: fixed.
|
||||||
bottom: 0;
|
bottom: 0.
|
||||||
width: 100%;
|
width: 100%.
|
||||||
background: #333;
|
background: #333.
|
||||||
color: #fff;
|
color: #fff.
|
||||||
padding: 10px;
|
padding: 10px.
|
||||||
text-align: center;
|
text-align: center.
|
||||||
display: none;
|
display: none.
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
@ -71,49 +71,49 @@
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function generateToken(length) {
|
function generateToken(length) {
|
||||||
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.
|
||||||
let result = '';
|
let result = ''.
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
result += characters.charAt(Math.floor(Math.random() * characters.length));
|
result += characters.charAt(Math.floor(Math.random() * characters.length)).
|
||||||
}
|
}
|
||||||
return result;
|
return result.
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
if (!localStorage.getItem('consentGiven')) {
|
if (!localStorage.getItem('consentGiven')) {
|
||||||
document.getElementById('consent-banner').style.display = 'block';
|
document.getElementById('consent-banner').style.display = 'block'.
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('gaia-gps-link').addEventListener('click', function(event) {
|
document.getElementById('gaia-gps-link').addEventListener('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault().
|
||||||
const token = generateToken(16);
|
const token = generateToken(16).
|
||||||
localStorage.setItem('gaiaAccessToken', token);
|
localStorage.setItem('gaiaAccessToken', token).
|
||||||
const url = `/redirect/gaia-gps?token=${token}`;
|
const url = `/redirect/gaia-gps?token=${token}`.
|
||||||
gtag('event', 'click', {
|
gtag('event', 'click', {
|
||||||
'event_category': 'Outbound Link',
|
'event_category': 'Outbound Link'.
|
||||||
'event_label': 'Gaia GPS',
|
'event_label': 'Gaia GPS'.
|
||||||
'value': url
|
'value': url.
|
||||||
});
|
}).
|
||||||
window.location.href = url;
|
window.location.href = url.
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('google-maps-link').addEventListener('click', function(event) {
|
document.getElementById('google-maps-link').addEventListener('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault().
|
||||||
const token = generateToken(16);
|
const token = generateToken(16).
|
||||||
localStorage.setItem('googleMapsAccessToken', token);
|
localStorage.setItem('googleMapsAccessToken', token).
|
||||||
const url = `/redirect/google-maps?token=${token}`;
|
const url = `/redirect/google-maps?token=${token}`.
|
||||||
gtag('event', 'click', {
|
gtag('event', 'click', {
|
||||||
'event_category': 'Outbound Link',
|
'event_category': 'Outbound Link'.
|
||||||
'event_label': 'Google Maps',
|
'event_label': 'Google Maps'.
|
||||||
'value': url
|
'value': url.
|
||||||
});
|
}).
|
||||||
window.location.href = url;
|
window.location.href = url.
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function acceptConsent() {
|
function acceptConsent() {
|
||||||
localStorage.setItem('consentGiven', 'true');
|
localStorage.setItem('consentGiven', 'true').
|
||||||
document.getElementById('consent-banner').style.display = 'none';
|
document.getElementById('consent-banner').style.display = 'none'.
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue