deleted: static/js/fullscreen.js

modified:   static/style.css
	modified:   templates/about.html
	modified:   templates/inactive.html
	modified:   templates/profiles.html
	modified:   templates/quiz.html
	modified:   templates/result.html
This commit is contained in:
xbl
2026-04-27 18:42:24 +02:00
parent c164c592fa
commit 12bed3cbe1
7 changed files with 71 additions and 94 deletions

View File

@ -1,34 +0,0 @@
(function () {
const btn = document.createElement('button');
btn.id = 'fsBtn';
btn.textContent = '⛶';
btn.title = 'Follscreen';
btn.style.cssText = `
position: fixed;
top: 0.75rem;
right: 0.75rem;
z-index: 99999;
background: transparent;
border: none;
color: rgba(255,255,255,0.1337);
font-size: 1.25rem;
cursor: pointer;
padding: 0.25rem 0.5rem;
transition: color 0.2s;
`;
btn.onmouseenter = () => btn.style.color = 'rgba(255,255,255,0.42)';
btn.onmouseleave = () => btn.style.color = 'rgba(255,255,255,0.1337)';
btn.onclick = () => {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen();
btn.textContent = '✕';
} else {
document.exitFullscreen();
btn.textContent = '⛶';
}
};
document.addEventListener('fullscreenchange', () => {
btn.textContent = document.fullscreenElement ? '✕' : '⛶';
});
document.body.appendChild(btn);
})();

View File

@ -685,3 +685,16 @@ canvas.confetti-canvas {
pointer-events: none; /* dont block buttons/links */
z-index: 9999; /* stays above your charts/cards */
}
.video-link {
position: fixed;
top: 0.75rem;
right: 0.75rem;
z-index: 99999;
color: rgba(255,255,255,0.15);
font-size: 1.25rem;
text-decoration: none;
padding: 0.25rem 0.5rem;
transition: color 0.2s;
}
.video-link:hover { color: rgba(255,255,255,0.42); }

View File

@ -38,7 +38,7 @@
</div>
</div>
</div>
<script src="{{ url_for('static', filename='js/fullscreen.js') }}"></script>
<a class="video-link" href="{{ url_for('video') }}"></a>
<script src="{{ url_for('static', filename='js/idle.js') }}"></script>
</body>
</html>

View File

@ -127,15 +127,14 @@
</div>
</div>
</div>
<script>
window.appData = {
profiles: {{ profiles | tojson }},
initialUserData: [39,39,39,39,39,39]
};
</script>
<a class="video-link" href="{{ url_for('video') }}"></a>
<script src="{{ url_for('static', filename='js/inactive.js') }}"></script>
<script src="{{ url_for('static', filename='js/fullscreen.js') }}"></script>
<script src="{{ url_for('static', filename='js/idle.js') }}"></script>
</body>
</html>

View File

@ -54,8 +54,7 @@
{% endfor %}
</div>
</div>
<script>
<script>
const labels = ['Energy', 'Calm', 'Relax', 'Sleep', 'Focus', 'Inspire'];
const profiles = {{ profiles | tojson }};
@ -96,8 +95,8 @@
}
});
});
</script>
<script src="{{ url_for('static', filename='js/fullscreen.js') }}"></script>
</script>
<a class="video-link" href="{{ url_for('video') }}"></a>
<script src="{{ url_for('static', filename='js/idle.js') }}"></script>
</body>
</html>

View File

@ -47,7 +47,7 @@
</div>
</form>
</div>
<script>
<script>
function toggleCard(card, index) {
const input = document.getElementById(`point${index}`);
const values = [20, 40, 80];
@ -62,8 +62,8 @@
if (nextValue === 40) card.classList.add("active");
else if (nextValue === 80) card.classList.add("emphasis");
}
</script>
<script src="{{ url_for('static', filename='js/fullscreen.js') }}"></script>
</script>
<a class="video-link" href="{{ url_for('video') }}"></a>
<script src="{{ url_for('static', filename='js/idle.js') }}"></script>
</body>
</html>

View File

@ -295,7 +295,7 @@
fire(rightOrigin);
});
</script>
<script src="{{ url_for('static', filename='js/idle.js') }}"></script>
<a class="video-link" href="{{ url_for('video') }}"></a>
<script src="{{ url_for('static', filename='js/fullscreen.js') }}"></script>
</body>
</html>