Update index.html

This commit is contained in:
Daniel LaForce 2024-08-01 21:31:39 -06:00
parent dcb4efcec7
commit ce329eeb4a
1 changed files with 52 additions and 52 deletions

View File

@ -15,52 +15,52 @@
font-family: Arial, sans-serif;
text-align: center;
margin: 0;
padding: 0.
padding: 0;
}
iframe {
border: none;
width: 800px;
height: 600px;
margin: 20px auto;
display: block.
display: block;
}
.button {
display: inline-block.
margin: 10px 20px.
padding: 10px 20px.
font-size: 16px.
color: white.
background-color: #007bff.
border: none.
border-radius: 5px.
text-decoration: none.
cursor: pointer.
display: inline-block;
margin: 10px 20px;
padding: 10px 20px;
font-size: 16px;
color: white;
background-color: #007bff;
border: none;
border-radius: 5px;
text-decoration: none;
cursor: pointer;
}
.button:hover {
background-color: #0056b3.
background-color: #0056b3;
}
#button-container {
display: flex.
justify-content: center.
align-items: center.
flex-wrap: wrap.
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
#consent-banner {
position: fixed.
bottom: 0.
width: 100%.
background: #333.
color: #fff.
padding: 10px.
text-align: center.
display: none.
position: fixed;
bottom: 0;
width: 100%;
background: #333;
color: #fff;
padding: 10px;
text-align: center;
display: none;
}
</style>
</head>
<body>
<h1>CSMS Claims and Neighbors</h1>
<iframe src="https://www.google.com/maps/d/embed?mid=1uaJCMW64w_zwERr9nFcVJchrZdocNbA&ll=39.035283304733184%2C-105.2908042761522&z=14"></iframe>
<iframe src="https://www.gaiagps.com/public/VVXcZPvEfvAbvRWi5F0DQPNT/?embed=True"></iframe>
<iframe src="https://csms.argobox.com/redirect/google-maps"></iframe>
<iframe src="https://csms.argobox.com/redirect/gaia-gps"></iframe>
<div id="button-container">
<a href="#" class="button" id="google-maps-link">View in Google Maps</a>
<a href="#" class="button" id="gaia-gps-link">View in Gaia GPS</a>
@ -71,49 +71,49 @@
</div>
<script>
function generateToken(length) {
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.
let result = ''.
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let result = '';
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() {
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) {
event.preventDefault().
const token = generateToken(16).
localStorage.setItem('gaiaAccessToken', token).
const url = `/redirect/gaia-gps?token=${token}`.
event.preventDefault();
const token = generateToken(16);
localStorage.setItem('gaiaAccessToken', token);
const url = `https://csms.argobox.com/redirect/gaia-gps?token=${token}`;
gtag('event', 'click', {
'event_category': 'Outbound Link'.
'event_label': 'Gaia GPS'.
'value': url.
}).
window.location.href = url.
'event_category': 'Outbound Link',
'event_label': 'Gaia GPS',
'value': url
});
window.location.href = url;
});
document.getElementById('google-maps-link').addEventListener('click', function(event) {
event.preventDefault().
const token = generateToken(16).
localStorage.setItem('googleMapsAccessToken', token).
const url = `/redirect/google-maps?token=${token}`.
event.preventDefault();
const token = generateToken(16);
localStorage.setItem('googleMapsAccessToken', token);
const url = `https://csms.argobox.com/redirect/google-maps?token=${token}`;
gtag('event', 'click', {
'event_category': 'Outbound Link'.
'event_label': 'Google Maps'.
'value': url.
}).
window.location.href = url.
'event_category': 'Outbound Link',
'event_label': 'Google Maps',
'value': url
});
window.location.href = url;
});
});
function acceptConsent() {
localStorage.setItem('consentGiven', 'true').
document.getElementById('consent-banner').style.display = 'none'.
localStorage.setItem('consentGiven', 'true');
document.getElementById('consent-banner').style.display = 'none';
}
</script>
</body>