fix mobile css issues
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,10 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta
|
<meta name="viewport"
|
||||||
name="viewport"
|
content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
||||||
content="width=device-width, initial-scale=1, viewport-fit=cover"
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
/>
|
|
||||||
<title>{{block "title" .}}RideAware{{end}}</title>
|
<title>{{block "title" .}}RideAware{{end}}</title>
|
||||||
|
|
||||||
<!-- Icons/Fonts -->
|
<!-- Icons/Fonts -->
|
||||||
@@ -29,23 +28,17 @@
|
|||||||
sizes="32x32"
|
sizes="32x32"
|
||||||
href="/static/assets/32x32.png"
|
href="/static/assets/32x32.png"
|
||||||
/>
|
/>
|
||||||
<link
|
|
||||||
rel="alternate icon"
|
|
||||||
type="image/png"
|
|
||||||
sizes="32x32"
|
|
||||||
href="/static/assets/32x32.png"
|
|
||||||
/>
|
|
||||||
<link
|
<link
|
||||||
rel="apple-touch-icon"
|
rel="apple-touch-icon"
|
||||||
sizes="180x180"
|
sizes="180x180"
|
||||||
href="/static/assets/apple-touch-icon.png"
|
href="/static/assets/apple-touch-icon.png"
|
||||||
/>
|
/>
|
||||||
<link rel="manifest" href="/static/assets/site.webmanifest" />
|
<link rel="manifest" href="/static/assets/site.webmanifest" />
|
||||||
<meta name="theme-color" content="#0f172a" />
|
<meta name="theme-color" content="#1e4e9c" />
|
||||||
|
|
||||||
{{block "extra_head" .}}{{end}}
|
{{block "extra_head" .}}{{end}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav class="navbar">
|
<nav class="navbar">
|
||||||
<div class="nav-container">
|
<div class="nav-container">
|
||||||
<a href="/" class="logo" aria-label="RideAware home">
|
<a href="/" class="logo" aria-label="RideAware home">
|
||||||
@@ -53,8 +46,8 @@
|
|||||||
src="/static/assets/logo.png"
|
src="/static/assets/logo.png"
|
||||||
alt="RideAware"
|
alt="RideAware"
|
||||||
class="logo-img"
|
class="logo-img"
|
||||||
width="140"
|
width="120"
|
||||||
height="28"
|
height="24"
|
||||||
decoding="async"
|
decoding="async"
|
||||||
fetchpriority="high"
|
fetchpriority="high"
|
||||||
/>
|
/>
|
||||||
@@ -70,7 +63,7 @@
|
|||||||
<button
|
<button
|
||||||
class="nav-toggle"
|
class="nav-toggle"
|
||||||
id="nav-toggle"
|
id="nav-toggle"
|
||||||
aria-label="Toggle navigation"
|
aria-label="Toggle navigation menu"
|
||||||
aria-controls="primary-nav"
|
aria-controls="primary-nav"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
>
|
>
|
||||||
@@ -100,40 +93,36 @@
|
|||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<!-- Core JS -->
|
<!-- Core JS -->
|
||||||
<script
|
<script defer src="/static/js/main.min.js" crossorigin="anonymous"></script>
|
||||||
defer
|
|
||||||
src="https://cdn.statically.io/gl/rideaware/landing/06d19988c7df53636277f945f9ed853bda76471b/static/js/main.min.js"
|
|
||||||
crossorigin="anonymous"
|
|
||||||
></script>
|
|
||||||
|
|
||||||
{{block "extra_scripts" .}}
|
{{block "extra_scripts" .}}
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function() {
|
||||||
const btn = document.getElementById("nav-toggle");
|
const btn = document.getElementById('nav-toggle');
|
||||||
const menu = document.getElementById("primary-nav");
|
const menu = document.getElementById('primary-nav');
|
||||||
if (!btn || !menu) return;
|
if (!btn || !menu) return;
|
||||||
|
|
||||||
function closeMenu() {
|
function closeMenu() {
|
||||||
btn.classList.remove("active");
|
btn.classList.remove('active');
|
||||||
btn.setAttribute("aria-expanded", "false");
|
btn.setAttribute('aria-expanded', 'false');
|
||||||
menu.classList.remove("open");
|
menu.classList.remove('open');
|
||||||
}
|
}
|
||||||
|
|
||||||
btn.addEventListener("click", () => {
|
btn.addEventListener('click', () => {
|
||||||
const open = btn.classList.toggle("active");
|
const isOpen = btn.classList.toggle('active');
|
||||||
btn.setAttribute("aria-expanded", String(open));
|
btn.setAttribute('aria-expanded', String(isOpen));
|
||||||
menu.classList.toggle("open", open);
|
menu.classList.toggle('open', isOpen);
|
||||||
});
|
});
|
||||||
|
|
||||||
menu.addEventListener("click", (e) => {
|
menu.addEventListener('click', (e) => {
|
||||||
if (e.target.tagName === "A") closeMenu();
|
if (e.target.tagName === 'A') closeMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener("keydown", (e) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
if (e.key === "Escape") closeMenu();
|
if (e.key === 'Escape') closeMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener("click", (e) => {
|
document.addEventListener('click', (e) => {
|
||||||
if (!menu.contains(e.target) && !btn.contains(e.target)) {
|
if (!menu.contains(e.target) && !btn.contains(e.target)) {
|
||||||
closeMenu();
|
closeMenu();
|
||||||
}
|
}
|
||||||
@@ -141,5 +130,5 @@
|
|||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
{{end}}
|
{{end}}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user