1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-02 03:39:28 +00:00

Fix ios safari

This commit is contained in:
2022-04-22 03:07:54 +00:00
parent d5cdf70705
commit 62cfe7b643
9 changed files with 28 additions and 15 deletions

View File

@@ -2,6 +2,9 @@
<html lang='en'>
{{> head title=title }}
<body>
<script>
const touchEvent = 'ontouchstart' in window ? 'touchstart' : 'click';
</script>
{{> adminHeader }}
{{> adminNav current=current name=name }}
<main class='adminContent'>
@@ -12,7 +15,7 @@
const toggle = document.querySelector('.adminNav-toggle');
const nav = document.querySelector('.adminNav');
toggle.addEventListener('click', () => {
toggle.addEventListener(touchEvent, () => {
nav.style.display =
(nav.style.display === 'flex')
? 'none'