Skip to content

Commit 543d562

Browse files
committed
feat: add tos and privacy policy
1 parent 7eb0cba commit 543d562

1 file changed

Lines changed: 177 additions & 1 deletion

File tree

static/index.html

Lines changed: 177 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,100 @@
565565
.footer a {
566566
color: #868686;
567567
text-decoration: underline;
568+
cursor: pointer;
569+
}
570+
571+
/* Modals */
572+
.modal-overlay {
573+
position: fixed;
574+
top: 0;
575+
left: 0;
576+
width: 100%;
577+
height: 100%;
578+
background: rgba(0, 0, 0, 0.6);
579+
backdrop-filter: blur(8px);
580+
opacity: 0;
581+
pointer-events: none;
582+
transition: opacity 0.3s ease;
583+
z-index: 999;
584+
}
585+
586+
.modal-overlay.active {
587+
opacity: 1;
588+
pointer-events: auto;
589+
}
590+
591+
.modal {
592+
position: fixed;
593+
top: 50%;
594+
left: 50%;
595+
transform: translate(-50%, -50%) scale(0.95);
596+
width: 90%;
597+
max-width: 500px;
598+
background: #1f1f1f;
599+
border: 1px solid #333333;
600+
border-radius: 12px;
601+
box-shadow: 0 20px 50px rgba(0,0,0,0.5);
602+
z-index: 1000;
603+
opacity: 0;
604+
pointer-events: none;
605+
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
606+
display: flex;
607+
flex-direction: column;
608+
max-height: 85vh;
609+
}
610+
611+
.modal.active {
612+
opacity: 1;
613+
pointer-events: auto;
614+
transform: translate(-50%, -50%) scale(1);
615+
}
616+
617+
.modal-header {
618+
padding: 20px 24px;
619+
border-bottom: 1px solid #333;
620+
display: flex;
621+
justify-content: space-between;
622+
align-items: center;
623+
}
624+
625+
.modal-title {
626+
margin: 0;
627+
font-size: 18px;
628+
font-weight: 600;
629+
color: #fff;
630+
}
631+
632+
.modal-close {
633+
background: transparent;
634+
border: none;
635+
color: #868686;
636+
font-size: 24px;
637+
cursor: pointer;
638+
padding: 0;
639+
line-height: 1;
640+
transition: color 0.2s;
641+
}
642+
643+
.modal-close:hover {
644+
color: #fff;
645+
}
646+
647+
.modal-body {
648+
padding: 24px;
649+
color: #cccccc;
650+
font-size: 14px;
651+
overflow-y: auto;
652+
line-height: 1.6;
653+
}
654+
655+
.modal-body p {
656+
margin-top: 0;
657+
margin-bottom: 16px;
658+
}
659+
660+
.modal-body p:last-child {
661+
margin-bottom: 0;
568662
}
569663

570664
@media (max-width: 900px) {
@@ -840,12 +934,47 @@ <h3 class="call2action-title">Jump right in!</h3>
840934
<!-- FOOTER -->
841935
<footer class="footer">
842936
<p>Made by <b>26855</b> in collaboration with <b>6547</b></p>
843-
<p>Vanguard v1.0 &bull; <a href="https://ftcvanguard.org">ftcvanguard.org</a> &bull; <a href="https://github.com/SMERobotics/ftcvanguard" target="_blank">GitHub</a></p>
937+
<p>
938+
Vanguard v1.0 &bull;
939+
<a href="https://github.com/SMERobotics/ftcvanguard" target="_blank">GitHub</a> &bull;
940+
<a href="#" id="open-tos">Terms</a> &bull;
941+
<a href="#" id="open-privacy">Privacy</a>
942+
</p>
844943
</footer>
845944
</div>
846945

946+
<!-- Modals -->
947+
<div id="modal-overlay" class="modal-overlay"></div>
948+
949+
<div id="modal-tos" class="modal">
950+
<div class="modal-header">
951+
<h3 class="modal-title">Terms of Service</h3>
952+
<button class="modal-close">&times;</button>
953+
</div>
954+
<div class="modal-body">
955+
<p>(We're just two high schoolers tryna do some cool stuff, we're not lawyers so everything is subject to our judgment)</p>
956+
<p>Just follow GP and FIRST values and we're chill</p>
957+
<p>By using this service you agree to absolve FTCVanguard and its contributors of any liability and damages</p>
958+
<p>Completely unrelated if anything does happen you agree to arbitration and we control everything</p>
959+
<p>All we do is provide this data for you we didn't do anything wrong</p>
960+
<p>If you're not being GP we reserve the right to completely nuke your account and delete all of your data without any notice or warning and you have zero legal recourse heheheha</p>
961+
</div>
962+
</div>
963+
964+
<div id="modal-privacy" class="modal">
965+
<div class="modal-header">
966+
<h3 class="modal-title">Privacy Policy</h3>
967+
<button class="modal-close">&times;</button>
968+
</div>
969+
<div class="modal-body">
970+
<p>Unlike Palantir, we don't sell your data and we (try not) to kill people using your data</p>
971+
<p>We don't use or share your data beyond the features in our app. You can read all the code to figure everything out</p>
972+
</div>
973+
</div>
974+
847975
<script>
848976
document.addEventListener("DOMContentLoaded", function() {
977+
// Chart initialization
849978
const ctx = document.getElementById('hero-donut-chart');
850979
if (ctx) {
851980
new Chart(ctx, {
@@ -881,6 +1010,53 @@ <h3 class="call2action-title">Jump right in!</h3>
8811010
}
8821011
});
8831012
}
1013+
1014+
// Modal Logic
1015+
const overlay = document.getElementById('modal-overlay');
1016+
const tosModal = document.getElementById('modal-tos');
1017+
const privacyModal = document.getElementById('modal-privacy');
1018+
const openTosBtn = document.getElementById('open-tos');
1019+
const openPrivacyBtn = document.getElementById('open-privacy');
1020+
const closeBtns = document.querySelectorAll('.modal-close');
1021+
1022+
function openModal(modal) {
1023+
overlay.classList.add('active');
1024+
modal.classList.add('active');
1025+
document.body.style.overflow = 'hidden'; // Prevent background scrolling
1026+
}
1027+
1028+
function closeModal() {
1029+
overlay.classList.remove('active');
1030+
document.querySelectorAll('.modal.active').forEach(m => m.classList.remove('active'));
1031+
document.body.style.overflow = '';
1032+
}
1033+
1034+
if(openTosBtn) {
1035+
openTosBtn.addEventListener('click', (e) => {
1036+
e.preventDefault();
1037+
openModal(tosModal);
1038+
});
1039+
}
1040+
1041+
if(openPrivacyBtn) {
1042+
openPrivacyBtn.addEventListener('click', (e) => {
1043+
e.preventDefault();
1044+
openModal(privacyModal);
1045+
});
1046+
}
1047+
1048+
closeBtns.forEach(btn => {
1049+
btn.addEventListener('click', closeModal);
1050+
});
1051+
1052+
if(overlay) {
1053+
overlay.addEventListener('click', closeModal);
1054+
}
1055+
1056+
// Close on Escape key
1057+
document.addEventListener('keydown', (e) => {
1058+
if (e.key === 'Escape') closeModal();
1059+
});
8841060
});
8851061
</script>
8861062
</body>

0 commit comments

Comments
 (0)