This commit is contained in:
2026-03-31 02:09:21 +09:00
parent c8805bbe22
commit e5a6206200

View File

@@ -16,36 +16,6 @@
font-size: 48pt;
}
</style>
<script>
(() => {
const el = document.getElementById('version-text');
if (!el) return;
let tapCount = 0, tapTimer = null, lastTouch = 0;
function onTap() {
tapCount++;
if (tapCount >= 3) {
clearTimeout(tapTimer);
tapCount = 0;
location.href = '/qr-code/';
return;
}
clearTimeout(tapTimer);
tapTimer = setTimeout(() => { tapCount = 0; }, 600);
}
el.addEventListener('touchend', (e) => {
e.preventDefault();
lastTouch = Date.now();
onTap();
}, { passive: false });
el.addEventListener('click', () => {
if (Date.now() - lastTouch < 500) return;
onTap();
});
})();
</script>
{% endblock %}
{% block content %}
<p class="text-small text-bold"><a href="/" class="text-no-decoration">← ホーム</a></p>
@@ -55,4 +25,34 @@
<p>サーバーが起動されるたびに<span class="code">git rev-parse --short HEAD</span>を使用して取得しています。</p>
<p>詳しくは<a href="https://gitea.nercone.dev/nercone-dev/website/">このサーバーのソースコード</a></p>
</div>
<script>
(() => {
const el = document.getElementById('version-text');
if (!el) return;
let tapCount = 0, tapTimer = null, lastTouch = 0;
function onTap() {
tapCount++;
if (tapCount >= 3) {
clearTimeout(tapTimer);
tapCount = 0;
location.href = '/qr-code/';
return;
}
clearTimeout(tapTimer);
tapTimer = setTimeout(() => { tapCount = 0; }, 600);
}
el.addEventListener('touchend', (e) => {
e.preventDefault();
lastTouch = Date.now();
onTap();
}, { passive: false });
el.addEventListener('click', () => {
if (Date.now() - lastTouch < 500) return;
onTap();
});
})();
</script>
{% endblock %}